-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
CordovaWebViewImpl showWebPage can crash Android >= 7 devices #473
Comments
@akinzie, This is exactly what I am experiencing right now, and I have also just came to the same conclusion as yourself. In my setup, this is crashing when the error url is attempted to be navigated to as that flow uses Reproduction Steps:
If you add proper |
…to the webview, return from the internal webview load.
Merge pull request #487 from joeljeske/bugfix/473-crash-on-android-7
Thanks for fixing this! |
I found out about the crash from the Google play console for my app, so I don't have all the information about reproducing it. However, I have inspected the code indicated by the stack trace and have noticed two potential issues with CordovaWebViewImpl's showWebPage method.
If openExternal is false, it will attempt to load the url in the internal webview and also will start an intent to view it externally (as long as it matches the whitelist). See this if block. Previously it returned inside that if block, but this commit removed the return statement - possibly by mistake I speculate.
Passing a file url outside an app is no longer allowed as of Android 7, but that is being done here.
2 is what actually causes the crash, although by inspecting the stack trace I'm pretty sure openExternal is false, so fixing 1 would avoid the crash in my case.
This is the stack trace:
The text was updated successfully, but these errors were encountered: