Was there recently a change in Android Chrome's quota management for IndexedDB? I'm using PouchDB with adapter IndexedDB in an Ionic 3 Cordova app. It went pretty smooth for the last 6 months. But within the last 5 days, I received a significant increase in complaints about data not loading correctly in the app. My app requires only 3-4 MB of data. Here's what I know so far:
- Problem only occurs in situations with low disk space on the internal storage (even if the app is installed on an SD card)
- Affected devices almost always have only 16GB of internal disk space and seem to be constantly full
- Freeing disk space resolves the problem
- There seems to be a sharp cut-off for the granted quota for IndexedDB when the device runs below 150-250MB or so. If an additional 100-200MB are freed, the granted quota suddenly jumps up to 50MB or more
- It seems that there was a recent change to either Chrome or Android that introduced this problem, because my app didn't receive an update recently and it even affects new users with only a few KB of data.
I also suspected that maybe people took more photos in the last days, because the weather was pretty good, resulting in less free disk space and thus, a spike in reported errors. But I'd still find this an odd explanation.
Anyone else noticed similar problems in their apps? Any solutions besides switching to Cordova-SQLite?
Update 2018-05-03:
I figured a few more things:
- Devices almost always require more an 1 GB of free internal storage. 500MB isn't enough anymore
- If you plan to move to SQLite with PouchDB, read the comments of this question. There might be problems with attachments.
- If you're using Ionic Storage (based on LocalForage), it will automatically switch to SQLite after you installed the plugin. In my case, this resulted in database errors and I had to switch
drivers
for Ionic's Storage:driverOrder: ['localstorage', 'indexeddb', 'sqlite', 'websql']
There really is a bug. It was fixed and merged, but it wasn't released yet (https://chromium.googlesource.com/chromium/src/+/73b18e372a83137f1198a350973225c4c145ceb6%5E%21/).
For a serious bug like this one it should be fixed and released almost immediately. There is no other beta release for May and M67 it will be released on May 29th (https://www.chromium.org/developers/calendar).
In the Chrome bug tracker as:
https://bugs.chromium.org/p/chromium/issues/detail?id=838816
来源:https://stackoverflow.com/questions/50019306/chrome-on-android-granted-quota-for-indexeddb-suddenly-almost-0