Open huangsir0 opened 1 year ago
👋 @huangsir0
NOTE: This comment is auto-generated.
Are you sure you have already searched for the same problem?
Some people open new issues but they didn't search for something similar or for the same issue. Please, search for it using the GitHub issue search box or on the official inappwebview.dev website, or, also, using Google, StackOverflow, etc. before posting a new one. You may already find an answer to your problem!
If this is really a new issue, then thank you for raising it. I will investigate it and get back to you as soon as possible. Please, make sure you have given me as much context as possible! Also, if you didn't already, post a code example that can replicate this issue.
In the meantime, you can already search for some possible solutions online! Because this plugin uses native WebView, you can search online for the same issue adding android WebView [MY ERROR HERE]
or ios WKWebView [MY ERROR HERE]
keywords.
Following these steps can save you, me, and other people a lot of time, thanks!
I'm having the exact same problem! Been stuck with for a week, is there any solution ?
onRenderProcessGone
method should be implemented by all webviews in the app, otherwise once webview process crashes, it will crash the app
https://developer.android.com/reference/android/webkit/WebViewClient#onRenderProcessGone(android.webkit.WebView,%20android.webkit.RenderProcessGoneDetail)
@huangsir0 Are you have any solution?
@androideveloper Thanks for the hint on the onRenderProcessGone
override.
I have implemented this method via androidOnRenderProcessGone
in this plugin (on v5, I think it has changed in v6). Where I try to recreate the InAppWebView
via a new Key
.
However, I still see crashes with the error: [FATAL:crashpad_client_linux.cc(732)] Render process (2370)'s crash wasn't handled by all associated webviews, triggering application crash.
in the Play Console.
Example implementation:
String inAppWebViewKeyString = Uuid().v4().toString();
Uri? currentUri; // tracked via the controller
final webview = InAppWebView(
key: Key(inAppWebViewKeyString),
initialUrlRequest: URLRequest(
url: currentUri,
),
initialOptions: InAppWebViewGroupOptions(
android: AndroidInAppWebViewOptions(
useOnRenderProcessGone: true,
),
),
androidOnRenderProcessGone: (controller, details) {
// reload the creashed webview
setState(() {
inAppWebViewKeyString = Uuid().v4().toString();
});
},
);
Any ideas? I'd really appreciate any pointers anyone might have :)
Your crashing webview might come from another internal dependency/sdk that you don't control.
Environment
Stacktrace/Logcat
Possible Cause
https://www.jianshu.com/p/29a8dce65634