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.

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-worker

Is this a regression?

Not sure

Description

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

image

image

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:

image

πŸ”¬ 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:open
  • Created 4 years ago
  • Reactions:1
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
apocalyp0syscommented, Mar 17, 2020

@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.

0reactions
naveedahmed1commented, Jun 11, 2020

+1 for this

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't cache simple html file with service-worker - Stack Overflow
I already deleted all caches and it says "Quota exceeded", any idea? Thanks. javascript Β· service-worker.
Read more >
Diff - 409b9c0094..77bf1926a9 - chromium/src - Git at Google
This should only occur when the - // device has been idle on the Welcome screen. - // The device will auto-enroll into...
Read more >
How to Fix the HTTP 429 Too Many Requests Error - Kinsta
The HTTP 429 error is returned when too many requests are made to a page within a short period of time. Find out...
Read more >
A service worker's life - Chrome Developers
Their inner workings will seem opaque, even arbitrary. It helps to remember thatβ€”like any other browser APIβ€”service worker behaviors are well-Β ...
Read more >
chromium | buildbucket/cr-buildbucket.appspot.com ...
Any tasks queued will check whether a destroy is pending upon starting, ... 2018 +0000 service worker: Add documentation about UseCounter to README....
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