Skip to content

Commit

Permalink
fix: crash while loading webview (#33867)
Browse files Browse the repository at this point in the history
Summary:
This will fix a crash on Motorola devices on Android 7, where WebView fails to load due to initialisation issues in the WebViewChromiumFactoryProvider (Caused by org.chromium.base.library_loader.ProcessInitException).

## Changelog

[Android][Fix] - Exception with `Cannot load WebView` message will initialising WebView (along with existing checks)

Pull Request resolved: #33867

Test Plan: <img width="1368" alt="Screenshot 2022-05-19 at 02 21 57" src="https://user-images.githubusercontent.com/933314/169154293-c442a54f-96f5-4309-a6ce-c8f9c4beeb17.png">

Reviewed By: javache

Differential Revision: D36517673

Pulled By: cortinico

fbshipit-source-id: 4fa5b903529eb04d01ed8fa540cbd883224e8e62
  • Loading branch information
Rachit Mishra authored and facebook-github-bot committed May 20, 2022
1 parent 0605880 commit 9e0d869
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ protected void doInBackgroundGuarded(Void... params) {
if (exception.getClass().getCanonicalName().contains("MissingWebViewPackageException")
|| (message != null
&& (message.contains("WebView provider")
|| message.contains("No WebView installed")))) {
|| message.contains("No WebView installed")
|| message.contains("Cannot load WebView")))) {
return null;
} else {
throw exception;
Expand Down

0 comments on commit 9e0d869

Please sign in to comment.