Service Worker "Quota exceeded" can break all JS (ERR_FAILED)
See original GitHub issueπ bug report
Affected Package
The issue is caused by package @angular/service-workerIs this a regression?
Not sureDescription
The service worker fails to load core JS files with DOMException: Quota exceeded.
This results in just a white page being shown, with a broken app.
Angular 9.0.4 Chromium 80
Iβve migrated from a custom workbox based serviceworker to the angular native service worker and now running into this.
Force reloading (ctrl+f5
) makes everything load, but the error returns on the next normal load.
After using DevTools to debug it, I found that the error is DOMException: Quota exceeded.
and occurs in this block:
π¬ Minimal Reproduction
Hard to reproduce unfortunately, needs low disk space or a big app being cached.
π₯ Exception or Error
The FetchEvent for ".../runtime-es2015.91c3f469886b8efa1fca.js" resulted in a network error response: the promise was rejected.
Promise.then (async)
onFetch @ ngsw-worker.js:1993
(anonymous) @ ngsw-worker.js:1928
π Your Environment
Angular Version:
9.0.4
Anything else relevant?
Might be related to #21412 and #33793 which both appear fixed.
Iβm not sure what the right fix here would be, I think fallback to network might be appropriate rather than completely failing the request.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:12 (12 by maintainers)
@andreialecu If you have ngsw in business-critical applications, i can suggest removing it or sticking to workbox. Itβs not the first ngsw error that cripples the whole application. Most common ones are fixed, but you can never be sure until ALL
CacheStorage
write calls are wrapped.+1 for this