question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fatal Exception: Failed to load WebView provider: No WebView installed

See original GitHub issue

Description

Crash on Android when Android System WebView is disabled.

Here is a PR that fix the issue: https://github.com/facebook/react-native/pull/29089

Fatal Exception: android.util.AndroidRuntimeException: android.webkit.WebViewFactory$MissingWebViewPackageException: Failed to load WebView provider: No WebView installed
       at android.webkit.WebViewFactory.getProviderClass(WebViewFactory.java:435)
       at android.webkit.WebViewFactory.getProvider(WebViewFactory.java:252)
       at android.webkit.CookieManager.getInstance(CookieManager.java:47)
       at com.facebook.react.modules.network.ForwardingCookieHandler.getCookieManager(ForwardingCookieHandler.java:180)
       at com.facebook.react.modules.network.ForwardingCookieHandler.get(ForwardingCookieHandler.java:58)
       at okhttp3.JavaNetCookieJar.loadForRequest(JavaNetCookieJar.java:61)
       at com.facebook.react.modules.network.ReactCookieJarContainer.loadForRequest(ReactCookieJarContainer.java:44)
       at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:84)
       at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
       at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:127)
       at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
       at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
       at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:257)
       at okhttp3.RealCall$AsyncCall.execute(RealCall.java:201)
       at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run(Thread.java:919)

React Native version:

System:
    OS: macOS 11.2.3
    CPU: (8) x64 Apple M1
    Memory: 382.56 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.16.0 - /usr/local/bin/node
    Yarn: Not Found
    npm: 7.6.3 - /usr/local/bin/npm
    Watchman: 4.9.0 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
    Android SDK:
      API Levels: 28, 29, 30
      Build Tools: 28.0.3, 29.0.2, 30.0.3
      System Images: android-30 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.7042882
    Xcode: 12.4/12D4e - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_282 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1
    react-native: ~0.63.4 => 0.63.4
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

  1. Go to Settings in your phone (Android)
  2. Application manager (or apps)
  3. Downloaded / all apps
  4. Search for Android System WebView and just disable it.
  5. Open your react-native app
  6. Your app will crash

Expected Results

No crash

Snack, code example, screenshot, or link to a repository:

Here is a PR that fix the issue: https://github.com/facebook/react-native/pull/29089

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:6
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
kyunkakatacommented, Apr 1, 2021

We need this pull request. Hope that it will be merged soon.

0reactions
williamgurzonicommented, May 19, 2022

@exploIF Thank you for answering, but it’s happening with user’s phone, so I can’t really enforce it. And actually in my personal phone (Asus), it was disabled by default and no issues. I’m wondering whether it’s just for samsung phones.

Read more comments on GitHub >

github_iconTop Results From Across the Web

android Failed to load WebView provider: No WebView installed
My exception is android.webkit.WebViewFactory$MissingWebViewPackageException Failed to load WebView provider: No WebView installed.
Read more >
No WebView installed android.webkit.WebViewFactory ...
Just a crash report from crashlytics. Caused by android.webkit.WebViewFactory$MissingWebViewPackageException: Failed to load WebView provider: ...
Read more >
A crash happen when use the WebView(61.0.3163.98) on ...
This file means that you can only use com.android.webview as a WebView provider. This is fine. However, the command output above says that...
Read more >
android Failed to load WebView provider - YouTube
Android : android Failed to load WebView provider : No WebView installed [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] ...
Read more >
WebView not found? Time to crash everything! : r/androiddev
WebView's distribution has been decoupled from the OS which leads to issues such as: "Failed to load WebView provider: No WebView installed" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found