Marlon
Marlon

Reputation: 1897

AndroidRuntimeException: android.webkit.WebViewFactory$MissingWebViewPackageException: Failed to find donor package: com.android.chrome

Crashlytics is giving me this new exception, so far the only on Xiaomi Pocophone F1 (POCO F1).

I think it has something to do with MIUI

I'm just getting a cookie for a Url, this is the problem line:

String rawCookies = CookieManager.getInstance().getCookie(url.toString());

Stacktrace:

Fatal Exception: android.util.AndroidRuntimeException: android.webkit.WebViewFactory$MissingWebViewPackageException: Failed to find donor package: com.android.chrome
   at android.webkit.WebViewFactory.getProviderClass(WebViewFactory.java:423)
   at android.webkit.WebViewFactory.getProvider(WebViewFactory.java:194)
   at android.webkit.CookieManager.getInstance(CookieManager.java:39)

I think its trying to find chrome?

Then how do we handle the cookies?

Upvotes: 2

Views: 2598

Answers (1)

Prudhvi
Prudhvi

Reputation: 2343

This is a known issue which happens when the Android System WebView is being updated at the same time your app is trying to use it. It is being tracked here

Upvotes: 3

Related Questions