angularprogressive-web-appsquotaangular-service-worker

QuotaExceededError: Failed to OpenBackingStore on iOS


We have a more or less big Web-Application. It builds up on Angular and PWA via the Angular tools are activated. It works all very well and the offline mode also works as it should.

The application has a big library that is cached (as we are using PDFTron-Webviewer). The PDFTron-Webviewer must be available in Offline-Mode, so it is cached by the Service-Worker.

Every time after a view updates (especially when we deliver a new Version of the WebViewer-Library), the following error(s) occur: Error: Uncaught (in promise): QuotaExceededError: Failed to OpenBackingStore in database because not enough space for domain.

Error Message from Safari Devtools Error Message from Safari Devtools

In the Application there is also functionality to save files (PDFs/DOCs/...) offline for use in offline Mode. These files are stored in the IndexedDB.

But I have no idea how to get rid of this error. The current workaround is to delete the PWA from the device and reinstall it.


Solution

  • For everyone who ran into a similar problem.

    It seems like iOS is holding the old Versions of the PWA for a specific amount of time (and therefore fills up the available Space for PWAs). If do a lots of testing and have a bunch of "new" Versions in my test system i ran into this error.

    In the production system on the other side i did not have this problem until now. Also turns out, that a restart of the iOS-Device often helps to solve the problem.