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.

Website not available net::ERR_FAILED

See original GitHub issue

Bug description: The first time I open my app the website loads correctly in the WebView. Then I go to the homescreen and after a while I return to the app and gets the following error:

Website not available
The website at https://www.mydomain.com?param=value could not be loaded because:
net::ERR_FAILED

Has anyone seen this error before?

Here is some logs from Android Studio that may or my not be related/useful.

2019-06-24 10:59:11.233 16101-16166/? W/cr_ChildProcLH: Create a new ChildConnectionAllocator with package name = com.android.chrome, sandboxed = true
2019-06-24 10:59:11.237 16101-16101/? I/cr_BrowserStartup: Initializing chromium process, singleProcess=false
2019-06-24 10:59:11.239 16101-16101/? W/ResourceType: Failure getting entry for 0x7f130537 (t=18 e=1335) (error -2147483647)

2019-06-24 10:59:11.241 16169-16169/? E//system/bin/webview_zygote32: failed to make and chown /acct/uid_99051: Permission denied
2019-06-24 10:59:11.241 16169-16169/? E/Zygote: createProcessGroup(99051, 0) failed: Permission denied

2019-06-24 10:59:11.244 16169-16169/? W//system/bin/webview_zygote32: Using default instruction set features for ARM CPU variant (cortex-a9) using conservative defaults
2019-06-24 10:59:11.248 1700-6616/? I/ActivityManager: Start proc 16169:com.android.chrome:sandboxed_process0/u0i51 for webview_service dk.MYAPPNAME.app/org.chromium.content.app.SandboxedProcessService0
2019-06-24 10:59:11.264 1991-1991/? I/chatty: uid=10016(u0_a16) com.android.systemui identical 1 line
2019-06-24 10:59:11.265 16169-16169/? I/SamplingProfilerIntegration: Profiling disabled.
2019-06-24 10:59:11.289 16197-16197/? E/asset: setgid: Operation not permitted

To Reproduce: I have only been able to reproduce this error in release - not in debug. This error happens after loading the app the first time, then leaving it and return to the app after a few hours. Maybe it is related to cache.

The problem persist when I force quit the app. If I reinstall the app it is working for a while. This URL is loading fine in the phones native browser (Google Chrome).

Expected behavior: Website should fully load.

Screenshots/Videos: error

Environment:

  • OS: Android (Huawei P20 Pro and multiple other Android phones)
  • OS version: Android 8
  • Browser: Google Chrome 75.0.3770.101 (code 377010137)
  • react-native version: 59.3
  • react-native-webview version: 5.6.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11

github_iconTop GitHub Comments

7reactions
balsloevcommented, Jun 27, 2019

@hkanizawa okay I found a temporary fix for this issue!

It looks like a broken service worker stalled the website. I solved it by using the injectedJavascript prop in my WebView to inject the following lines of code:

navigator.serviceWorker.getRegistrations().then(function(registrations) {
   for (let registration of registrations) {
       registration.unregister();
   }
});

I will deploy to production now and see if it solves the issue for our customers as well.

3reactions
rakshans1commented, Jun 26, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

Receiving "Webpage not available" net: ERR_FAILED
Receiving this message when trying to Share Content on a Poly x50/TC8 system. Any solutions?
Read more >
How To Fix “Webpage Not Available” Error in Your Browser
In this guide, you'll learn how to fix the "Webpage not available" error on your browser. These solutions are for Chrome, Edge, and...
Read more >
What can cause Chrome to give an net::ERR_FAILED on ...
One possible reason is that your AppCache Manifest does not allow it. I suppose there may be many other reasons as well (CORS?)...
Read more >
TileBoard and Fully Kiosk Browser - net::ERR_FAILED
Not sure why, but when I load my hassio URL (https) in Fully Kiosk Browser, I just get a “Webpage Not Available” with...
Read more >
How To Fix Web page not available Error in Android Mobile ...
Hello Everyone Today We Are Going To Talk About How To Fix Web Page Not Available Error On Android.On your Device, Click and...
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