Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QuotaExceededError using Ionic Storage with a few strings #828

Open
ManigandanRaamanathan opened this issue Jun 14, 2018 · 11 comments
Open

Comments

@ManigandanRaamanathan
Copy link

Ionic Storage Issue for less memory space
I'm having this issue with Ionic Storage, this is the complete stack trace:

core.es5.js:1084 ERROR Error: Uncaught (in promise): QuotaExceededError:
at c (polyfills.js:3)
at c (polyfills.js:3)
at polyfills.js:3
at t.invokeTask (polyfills.js:3)
at Object.onInvokeTask (core.es5.js:4140)
at t.invokeTask (polyfills.js:3)
at r.runTask (polyfills.js:3)
at o (polyfills.js:3)
at IDBTransaction.invoke (polyfills.js:3)

This happen both in mobile and computer with low internal storage. If the device storage is below 1GB then this storage module freezes entirely and wont respond until freeing space more than 1GB. We need immediate attention and fix for this problem.

@tofumatt
Copy link
Member

You're using Ionic, but for which platform? Having only 1GB of storage left, especially on a PC, doesn't surprise me that a quota error is encountered. What kind of mobile device are you encountering the error on? What kind of data are you attempting to save when you encounter the error?

This sounds like it's working as intended 🤷‍♂️

@ManigandanRaamanathan
Copy link
Author

ManigandanRaamanathan commented Jun 14, 2018

Facing this issue on android platform. Tried on Samsung J7 and note 5 with left of 900MB device internal storage. Both of them not working if the device storage is below 1GB. After clearing space out >=1GB then only it works

@ManigandanRaamanathan
Copy link
Author

Any update on how to fix this issue?

@thgreasi
Copy link
Member

First of all let's clarify which storage driver is used. Since you mentioned J7 I would guess that would be IndexedDB (except if you pack your Ionic app as an apk?)

@ManigandanRaamanathan
Copy link
Author

How to identify the storage that the app using in the actual device?

@thgreasi
Copy link
Member

You can run localforage.driver(), ideally inside the error handler of the failed storage method.
Please also clarify whether the error originates from a browser instance of your app or if you are providing it as a store app.

@ManigandanRaamanathan
Copy link
Author

The below screenshot is taken from chrome inspect tool while debugging in my Samsung j7 android device which is currently having 800MB. It shows the storage driver is " asyncStorage" and shows that error. If I clear up some space around more than 1GB then it will work fine. It never really use sqlite or other drivers here. Is that could be the issue?

capture

@thgreasi
Copy link
Member

thgreasi commented Jun 22, 2018

If you are packaging you ionic app as an apk, then you can use the cordovaSQLiteDriver, which should give more disk space to your app. If you are just providing a web app, then cordova is obviously not an option.

@ManigandanRaamanathan
Copy link
Author

Is there any other alternative solution to fix within the existing storage plugin?

@ManigandanRaamanathan
Copy link
Author

Wait. Did you mean i have to download and add ionic cordova sqlite on top of the default storage for the sqlite to kick in when deploying apk in the actual device? Is that correct?

@thgreasi
Copy link
Member

Yes that's what I meant but you never answered on whether you are packing an apk or serve as a web app. I thought that ionic storage should add use the Cordova sqlite plugging out of the box. How do you call the storage methods in your code? (Eg localforage.setItem())

bs3vcenk added a commit to bs3vcenk/Netrix that referenced this issue Dec 4, 2019
According to localForage/localForage#828 (comment)
this is thrown when >1GB space is available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants