You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[webview_flutter] Calling setOnConsoleMessage multiple times throws #180914
The JavaScript channel is an implementation detail, on one specific platform. It's not part of the API surface, so a way to unregister the channel as public API doesn't really make sense.
Rather than jumping to a specific proposed solution, what is the actual thing you want to be able to do? Is it just for setOnConsoleMessage to be callable multiple times?
changed the title [-]Add a way to unregister the JavaScript channel created by the method setOnConsoleMessage[/-][+][webview_flutter] Calling `setOnConsoleMessage` multiple times throws[/+]on Jan 14, 2026
Updated title and labels to clarify that this is actually a bug report, rather than a feature request.
(In the future, please report bugs—such as unexpected exceptions being thrown—as bugs, rather than filing a proposed fix for the bug as a feature request.)
Just a bit of extra information. I think the idea would be to be able to call setOnConsoleMessage multiple times but without getting multiple messages at the same time (that's why I mentioned it would be ideal to have a way to "unregister" the callback)
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
stuartmorgan-g commentedon Jan 14, 2026
The JavaScript channel is an implementation detail, on one specific platform. It's not part of the API surface, so a way to unregister the channel as public API doesn't really make sense.
Rather than jumping to a specific proposed solution, what is the actual thing you want to be able to do? Is it just for
setOnConsoleMessageto be callable multiple times?limonadev commentedon Jan 14, 2026
Yes, it's to be able to call
setOnConsoleMessageon the same controller multiple times without throwing an exception[-]Add a way to unregister the JavaScript channel created by the method setOnConsoleMessage[/-][+][webview_flutter] Calling `setOnConsoleMessage` multiple times throws[/+]stuartmorgan-g commentedon Jan 14, 2026
Updated title and labels to clarify that this is actually a bug report, rather than a feature request.
(In the future, please report bugs—such as unexpected exceptions being thrown—as bugs, rather than filing a proposed fix for the bug as a feature request.)
limonadev commentedon Jan 21, 2026
Just a bit of extra information. I think the idea would be to be able to call
setOnConsoleMessagemultiple times but without getting multiple messages at the same time (that's why I mentioned it would be ideal to have a way to "unregister" the callback)rickhohler commentedon Jan 29, 2026
I'll take a look at this.
rickhohler commentedon Jan 29, 2026
I have submitted a fix for this issue in flutter/packages#10922
[webview_flutter_wkwebview] Fix crash when calling setOnConsoleMessag…
github-actions commentedon Mar 7, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.[webview_flutter_wkwebview] Fix crash when calling setOnConsoleMessag…
[webview_flutter_wkwebview] Fix crash when calling setOnConsoleMessag…
[webview_flutter_wkwebview] Fix crash when calling setOnConsoleMessag…