pwa
pwa copied to clipboard
Failed to load service-worker.js
I have an error after a fresh install. Here is the steps:
- init a PWA project
- host it on a https server
- reach it
- refresh 2 times to be sure that all stuff is in cache
- check the offline mode
- got this error
An unknown error occurred when fetching the script.
Failed to load resource: net::ERR_INTERNET_DISCONNECTED service-worker.js
I'm just discovering PWA and service-worker, but is this normal ?
I've spent all of today trying to fix this :-(
Do you have clues/lines of research?
EDIT 14 Nov 2017 : Problem still persist :weary:
What browser extensions are you using?
I'm not sure to understand, you mean on Chrome ? Nothing special, JSON Formatter, uBlock Origin, Vue.js devtools, and schedule synchro
I found this:
Note: In Chrome, you may see a console error indicating that the service worker could not be fetched: An unknown error occurred when fetching the script. service-worker.js Failed to load resource: net::ERR_CONNECTION_REFUSED. This error is shown because the browser couldn't fetch the service worker script (because the site is offline), but that's expected because we can't use the service worker to cache itself. Otherwise the user's browser would be stuck with the same service worker forever!
https://google-developer-training.gitbooks.io/progressive-web-apps-ilt-codelabs/content/docs/lab_workbox.html
Just remove existing registered service workers. The method depends on the browser you developed on.