Skip to content
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

Fix missing webview provider crash on Android #1

Closed
wants to merge 1 commit into from

Conversation

RodolfoGS
Copy link
Owner

Summary

I applied the changes requested in this PR: facebook#29089

We upgraded to RN 0.62.2 on our latest release and started to see again the "Failed to load WebView provider: No WebView installed" (see below for Crashlytics screenshot)

image

This crash had been fixed by facebook#24533 but facebook#26189 (added in 0.62) reverted the fix

Indeed the exception raised in Crashlytics is actually a AndroidRuntimeException and MissingWebViewPackageException is only part of the message.

For instance, in the screenshot above, the exception message is android.webkit.WebViewFactory$MissingWebViewPackageException: Failed to load WebView provider: No WebView installed

Now these crashes are quite tricky to reproduce, so to be on the safe side, I'm filtering out all exceptions containing WebView as suggested by @thorbenprimke on the original fix.

If my reasoning is correct, it should fix @siddhantsoni 's issue as well, since WebView is included in MissingWebViewPackageException
But following that reasoning, I am not sure facebook#26189 fixed @siddhantsoni 's issue, so @siddhantsoni if you could check that this PR also fixes your issue, that would be great!

Changelog

[Android] [Fixed] - Fix missing WebView provider crash in ForwardingCookieHandler

Test Plan

I created a version of react native with this patch applied

"react-native": "almouro/react-native#release/062-2-fix-missing-webview-provider"

Before the fix ~0.1% of our users were impacted on Android, no new crashes have occurred after the update.

This is putting back what was already in place and working for us, but making the check wider to catch more errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant