Skip to content
This repository has been archived by the owner on Aug 13, 2022. It is now read-only.

MissingWebViewPackageException: Failed to load WebView provider #93

Open
lekeope opened this issue Apr 19, 2019 · 10 comments
Open

MissingWebViewPackageException: Failed to load WebView provider #93

lekeope opened this issue Apr 19, 2019 · 10 comments

Comments

@lekeope
Copy link

lekeope commented Apr 19, 2019

Caused by android.webkit.WebViewFactory$MissingWebViewPackageException
Failed to load WebView provider: No WebView installed

7 Crashes affecting 2 users, using Samsung SM-J701M with Android 7.0 Installed

@Izzyjm
Copy link

Izzyjm commented Jun 3, 2019

More info about this here Google should really fix this SDK seems like a rather easy fix https://stackoverflow.com/questions/46048912/android-failed-to-load-webview-provider-no-webview-installed

@Izzyjm
Copy link

Izzyjm commented Jun 3, 2019

whats the full stacktrace ?

@lekeope
Copy link
Author

lekeope commented Jul 16, 2019

Fatal Exception: android.util.AndroidRuntimeException: android.webkit.WebViewFactory$MissingWebViewPackageException: Failed to load WebView provider: No WebView installed at android.webkit.WebViewFactory.getProviderClass + 371(WebViewFactory.java:371) at android.webkit.WebViewFactory.getProvider + 194(WebViewFactory.java:194) at android.webkit.WebView.getFactory + 2569(WebView.java:2569) at android.webkit.WebView.ensureProviderCreated + 2564(WebView.java:2564) at android.webkit.WebView.setOverScrollMode + 2629(WebView.java:2629) at android.view.View.(View.java:4043) at android.view.View.(View.java:4170) at android.view.ViewGroup.(ViewGroup.java:603)

@Izzyjm
Copy link

Izzyjm commented Jul 16, 2019

have you figured out the cause yet ?

@lekeope
Copy link
Author

lekeope commented Jul 18, 2019

The problem comes from Android 7 because WebView is not working correctly.

@Izzyjm
Copy link

Izzyjm commented Jul 18, 2019

The exception says that webview package is missing, I wonder how this could be possible ? I don’t have a Android 7.0 device but I can try to reproduce on simulator maybe it will work ?

@witoldgoralski
Copy link

Did you checked proguard configuration in file proguard-rules.pro for consent-library? Please for testing add and check if it fix your issue:
-keep class com.google.ads.consent.* { *; }

@lekeope
Copy link
Author

lekeope commented Jul 18, 2019

@witoldgoralski the issue is peculiar to android 7, so that's not the issue

@Izzyjm
Copy link

Izzyjm commented Jul 20, 2019

@edge-developer I did some research and found out this happens because the "Android System WebView" started being installed as its own application from Android 5.0 and greater and this code happens to be running while "Android System WebView" is being updated. While its being updated the package doesn't exist so it causes this exception. People on the bug tracker said chrome and android were not going to fix this because it's normal behavior and up to developer to handle it. I think now you could close out this issue.

Possible solution
try { }catch (Exception e) { }

References
https://stackoverflow.com/questions/46278681/android-webkit-webviewfactorymissingwebviewpackageexception-from-android-7-0

https://stackoverflow.com/questions/46048912/android-failed-to-load-webview-provider-no-webview-installed

https://stackoverflow.com/questions/29575313/namenotfoundexception-webview

https://bugs.chromium.org/p/chromium/issues/detail?id=506369

https://issuetracker.google.com/issues/37048374

@Izzyjm
Copy link

Izzyjm commented Jul 20, 2019

@edge-developer as that as far as your stack-trace goes ? so we could see what method from the consent SDK was the one that called it. As you can see in his stack trace(https://github.com/googleads/googleads-consent-sdk-android/issues/95) which is similar to yours it starts with "com.google.ads.consent.ConsentForm$Builder.build(ConsentForm.java:210)" so maybe where ever this method gets called put that in the try block how they did on the stack overflow posts

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants