-
Notifications
You must be signed in to change notification settings - Fork 331
Bug: Toolbox does not handle quote exceeded errors #277
Comments
+1. I'm getting Quota Exceeded errors since I updated to Chrome 63 (something changed in it's behaviour?) on a regular basis. It crashes the SW so the whole thing doesn't work anymore (my notifications, among them). |
Additional: I'm seeing quite a few new "Cache Storage"-related issues on the Chromium bugtracker. This one seems relevant, as SW and CS are behaving weirdly and report an ever growing amount of data stored: |
+1, could be useful to have a way to handle it, and do a cleaning if we can. It happens a lot on computers with low space, especially chromebooks. |
+1, it occurs quite rare, but there is no way how to deal with this issue except cache.maxEntries |
We ended up turning off the while serviceworker script bc of this. |
+1, like @gierschv said, we need a way to handle it. Turning off the SW its not an option for us. |
This is affecting me as well. Even if I manually delete all of the caches like so
The cache usage is not reduced and my SW continues to crash with quota exceeded. The cache is growing with each reload of the page. It grows into the multiple GB before quota exceeded error. I don't understand how deleting all of the caches does not reduce the cache. Maybe a bug in chrome? Regardless sw-toolbox should handle the quota exceeded error. Edit: Regardless, sw-toolbox can still crash with quota exceeded if for example you cache a lot of data in an incognito tab. |
Hello folks—Thanks for your patience. There were a few Chrome-related bugs, along with some changes in policy starting with Chrome 63, that led to an uptick of these types of failures. But it's definitely something that could crop up, given enough cache storage usage, on any browser. I've made some changes in a branch focused on trying to avoid scenarios in which you end up not getting a valid I'd be very grateful if folks who can consistently reproduce these failures try importScripts('https://rawgit.com/GoogleChromeLabs/sw-toolbox/catch-quota-errors/sw-toolbox.js'); to pull in the updated code, and let us know how it behaves. You should see a friendly error message logged when a I think that's the extend of the change we could make at this point. |
The way the chrome bug affected me and what I am concerned about solving is the case where users end up "stuck" with an old version of the application. This was happening to me (using sw-precache-webpack-plugin) when the quota was exceeded. The SW would fail to cache the new assets and that left the user stuck with the old cached version essentially permanently. This situation is really bad because users are stuck with old app versions which may not function correctly anymore and there is no way for them to know what happened or how to resolve it. |
Btw, I think a similar issue is present in workbox-sw. I haven't been able to check and make sure because I have no data usb-c cable I can plug into my phone and desktop has 19gb quota so that's taking a while to hit the max. I have experienced issues with wb-sw on android twice now, though, and clearing site data for the domain fixed it (just like it does for sw-toolbox). Should I create an issue on the wb-sw tracker with this limited info or..? |
@rejhgadellaa, there's an existing issue on GoogleChrome/workbox#1308 to track the Workbox story. Feel free to chime in there. @AndrewMorsillo, thanks for filing GoogleChromeLabs/sw-precache#345 to talk about the For anyone looking for ways to trigger quota issues, you should know that a Chrome Incognito window is capped at ~120mb of total storage quota (regardless of how much space is available on your device), and that storing an opaque response will take up ~7mb of quota. I'd really love to hear from folks who have encountered quota issues with assets cached at runtime using |
@AndrewMorsillo did your problem still persist? importScripts('https://rawgit.com/GoogleChromeLabs/sw-toolbox/catch-quota-errors/sw-toolbox.js'); |
@jeffposnick I ended up migrating to workbox and changed some parameters to reduce the overall storage size. |
If a user has too little space on their harddrive or runs chrome on a partition that is space constrained in other ways, then the serviceworker may start up, but then crash with a cryptic message in the error log:
IMHO, this is a clear bug. SW-toolbox should at least be able let the client run but with the files uncached. As it is, other sites work, but our site just hangs...
Here's my sw.js:
The text was updated successfully, but these errors were encountered: