-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[webview_flutter_wkwebview] Crash when restarting in debug mode on iOS – Host platform returned null value for non-null return value #168306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@ljanecek |
iOS Version: 18.3.1 Same issue: |
Hi @darshankawar, thank you for your reply. I'm using: I don’t see any relation to #162437 |
@ljanecek |
It looks like WKWebViewConfiguration.defaultWebpagePreferences is actually an implicitly unwrapped optional. Meaning it shouldn't be null, but there is a chance it could be. This can be fixed by setting the value just in case. |
Actually I was able to reproduce the error with @ljanecek When using |
Steps to reproduce
Expected results
No crash occurs. The WebViewController should safely initialize and configure JavaScript mode, even if the widget is still being built.
Actual results
PlatformException (PlatformException(null-error, Host platform returned null value for non-null return value., null, null))
WKWebViewConfiguration.getDefaultWebpagePreferences (package:webview_flutter_wkwebview/src/common/web_kit.g.dart:3611:7)
WebKitWebViewController.setJavaScriptMode (package:webview_flutter_wkwebview/src/webkit_webview_controller.dart:598:11)
Code sample
Code sample
Screenshots or Video
No response
Logs
Logs
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: