Skip to content
Browse files

Adds Logic To Catch MissingWebViewPackageException (#24533)

We are seeing crash reports that the webview is missing. In this case
it should fail gracefully so that a missing webview does not block
from using an app built with React Native.

The contains could also be changed to check for "webview" in general
to catch all webview related exception. It's currently checking on
for the specific string that I'm seeing in our app's crashreporting tool.

<img width="1507" alt="Screen Shot 2019-04-19 at 11 26 19 AM" src="">

<img width="935" alt="Screen Shot 2019-04-19 at 11 32 58 AM" src="">

[Android] [Fixed] - The ReactCookieJarContainer/ForwardingCookieHandler now handles the missing WebView  gracefully.
Pull Request resolved: #24533

Differential Revision: D15062824

Pulled By: cpojer

fbshipit-source-id: 80805a47494f0d924b7ee029ce8ca0504eaeee57
  • Loading branch information...
thorbenprimke authored and facebook-github-bot committed Apr 24, 2019
1 parent de12b98 commit 954f715b25d3c47c35b5a23ae23770a93bc58cee
@@ -182,6 +182,17 @@ protected void doInBackgroundGuarded(Void... params) {
} catch (IllegalArgumentException ex) {
return null;
} catch (Exception exception) {
String message = exception.getMessage();
// We cannot catch MissingWebViewPackageException as it is in a private / system API
// class. This validates the exception's message to ensure we are only handling this
// specific exception.
if (message != null && message.contains("No WebView installed")) {
return null;
} else {
throw exception;


0 comments on commit 954f715

Please sign in to comment.
You can’t perform that action at this time.