-
Notifications
You must be signed in to change notification settings - Fork 828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Precaching is in a bad state following a failed activation in Firefox #1783
Comments
Here pictures of the log output
Other info:
|
Thanks for the very detailed writeup; I'll try to reproduce the issue locally. One question for you: you mentioned that you're seeing this in Firefox 63. Can you also reproduce that behavior in other browsers, like Chrome? That message in this screenshot about the service worker attempting to pull in what I'd imagine is the old precache manifest via |
Hey, yes you are right thats the old precache manifest and the fallback response from the server. Chrome, as far as i know, did not retry to load the old manifest and cached it. I can confirm with the access.log that on every page reload Chrome only requests the service-worker.js and Firefox additionally requests the precache manifest and 4 files in /workbox-v3.6.3/, (So what you said with the aggressive checking for updates in Firefox.) Maybe the precache manifest file could be included in itself to overcome this issue. For now i just set a public max age 1 year cache header for this file to overcome this error. .... The main issue is still there. I could not reproduce it in chrome. I made some side by side images On the left Firefox on the right Chrome. (btw in Firefox its reproducible like 80% of the times.) |
(CC: @josephliccini who brought up what looks to be the root cause in w3c/ServiceWorker#1372, and @wanderview whom I've been bugging about this as an FYI.) Thanks again for all those debugging steps. I think I have a decent handle on what you're seeing in Firefox. Based on this screenshot, what looks like is happening is that the So, for whatever reason, the The problem here is that the first thing the Workbox does not expect to be in a state where there's anything useful in the temporary cache at this point; it expects that if there's a new ...but for reasons that have to do with how we keep track of revision information in IndexedDB, that assumption will lead to the behavior you're seeing in Firefox if we get an unexpected I believe that the workaround is Workbox just not to delete the temporary cache at the start of the As far as I can tell, that's a low-risk change, but it's likely something we'd make against the |
It might not be the best bug report in the world, but I tried to capture the steps that led to Firefox failing to activate the updated service worker at https://bugzilla.mozilla.org/show_bug.cgi?id=1514030 We still want to address this from a Workbox perspective, but at the same time, if Firefox appears to get into a bad state where it fails to activate a new service worker, that's hopefully something that can be resolved too. |
This is addressed in Workbox v4, where the only thing |
Library Affected:
workbox-v3.6.3
Browser & Platform:
Firefox 63.0.3 Windows
Issue or Feature Request Description:
Basically the same as #1528, but it would be cool if the problem would be solved in the library itself.
I am using the InjectManifest plugin (its the same with GenerateSW).
After a deploy the service woker claims to have updates. When closing the browser and opening it again one js file is deleted form the cache. The index.html is still on the old version that depends on this js file. So the page can't load anymore.
Here the config (i am using https://www.npmjs.com/package/@vue/cli-plugin-pwa)
vue.config.js
__dirname + '/public/service-worker.js'
The server is configured to not serve 404, but to fallback to index.html instead.
The text was updated successfully, but these errors were encountered: