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 #32165

Closed

Conversation

RodolfoGS
Copy link
Contributor

Summary

I applied the changes requested in this PR: #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 #24533 but #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 #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.

@facebook-github-bot
Copy link
Contributor

Hi @RodolfoGS!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 8, 2021
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: a950634

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,964,751 +7,403
android hermes armeabi-v7a 8,496,906 +6,279
android hermes x86 9,390,978 +13,411
android hermes x86_64 9,358,441 +15,554
android jsc arm64-v8a 10,628,105 -11,487
android jsc armeabi-v7a 9,549,450 -10,940
android jsc x86 10,641,345 -12,745
android jsc x86_64 11,252,519 -10,572

Base commit: a950634

@sota000 sota000 self-assigned this Sep 9, 2021
@facebook-github-bot
Copy link
Contributor

@sota000 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@sota000 merged this pull request in d40cb0e.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Sep 9, 2021
@RodolfoGS RodolfoGS deleted the fix/missing-webview-provider branch September 17, 2024 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants