Skip to content
Browse files
Added check to handle all cases of MissingWebViewPackageException (#2…

We have been experiencing the below crashes in our Flipkart Android app:


Stack overflow thread for the issue that is causing this crash: [](

The change I have done is an enhancement on the following PR which got merged to master: [#24533

The exception handling for this crash already exists but it relies on having a specific string in the error message ("Webview not installed"). But the error message for the crashes above does not include this string.

I have added a check for all the crashes involving the `MissingWebViewPackageException`.
Refer the file: [](

## Changelog

[ANDROID] [Fixed] - The ReactCookieJarContainer/ForwardingCookieHandler now handles all the cases of missing WebView exceptions gracefully.
Pull Request resolved: #26189

Test Plan:
No new tests have been added.
CI should pass.

This fix was made based on the exception stacktrace. I have not spent the time to acquire one of the devices that it is happening on.

Differential Revision: D17258881

Pulled By: cpojer

fbshipit-source-id: 3abb061e345329214025ebab2b3a908f9cce434d
  • Loading branch information
siddhantsoni authored and facebook-github-bot committed Sep 11, 2019
1 parent 021cbcc commit 314eba98b2f2755cb26ed7a268d3fe83a7626efa
Showing 1 changed file with 6 additions and 2 deletions.
@@ -184,8 +184,12 @@ protected void doInBackgroundGuarded(Void... params) {
// 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")) {
if (message != null
&& exception
.equals("android.webkit.WebViewFactory.MissingWebViewPackageException")) {
return null;
} else {
throw exception;

0 comments on commit 314eba9

Please sign in to comment.