QuotaExceededError with small data

On the initial page that loads, I have a button that stores a string using ionic storage. However, as soon as I click it, it I get the error

“Uncaught (in promise): QuotaExceededError”

This only happens on my computer when I serve to chrome, but the browser builds I create have this error as well. I had someone else serve it with the same code and they didn’t get the error.

Again, this works on android and iOS fine and doesn’t run into this error.

Here are my dependencies. I’m unsure if it has something to do with these or not.

"dependencies": {
    "@angular/common": "4.0.2",
    "@angular/compiler": "4.0.2",
    "@angular/compiler-cli": "4.0.2",
    "@angular/core": "4.0.2",
    "@angular/forms": "4.0.2",
    "@angular/http": "4.0.2",
    "@angular/platform-browser": "4.0.2",
    "@angular/platform-browser-dynamic": "4.0.2",
    "@angular/platform-server": "2.2.1",
    "@ionic-native/core": "3.4.2",
    "@ionic-native/geolocation": "^3.6.1",
    "@ionic-native/keyboard": "^3.4.4",
    "@ionic-native/splash-screen": "3.4.2",
    "@ionic-native/status-bar": "3.4.2",
    "@ionic/cloud-angular": "^0.12.0",
    "@ionic/storage": "^2.0.1",
    "firebase": "^3.6.4",
    "font-awesome": "^4.7.0",
    "ionic-angular": "3.1.0",
    "ionic-native": "2.2.11",
    "ionicons": "3.0.0",
    "rxjs": "5.1.1",
    "sw-toolbox": "3.4.0",
    "zone.js": "^0.8.5"
  }
2 Likes

Are you storing data in localstorage?
A quick google search on the error showed that it could be related to local storage.

It’s not using localstorage. I’m using the IonicStorageModule in my app.module.ts which allows me to import Storage to use. Furth investigation shows me that it’s specifically my chrome browser that’s causing the issue.

is https://ionicframework.com/docs/storage/ which can also use localstorage, depending on how it is set up. Are you using this here?

It’s using IndexedDB

… which also causes this error: https://www.w3.org/TR/IndexedDB/
So at least we know that this error matches what you are using.

Having the same problem - on Chrome with IndexedDB - with JSON stringified array that is only several bytes. Safari is working fine.

Yeah because IndexDB is a deprecated method with Chrome Browser since beginning April’17. Are you using Ionic 2 or Ionic 3 guys?

“ionic-angular”: “3.1.1”,

I’m guessing I should set my Ionic Storage defaults verbosely:

IonicStorageModule.forRoot({
name: ‘__mydb’,
driverOrder: [‘sqlite’, ‘websql’, ‘indexeddb’]
})

9 Likes

If it uses the new Chromium rules, sure (and as sqllite is the new default for Chrome it seems, yes so it should work well if you write to SQLlite instead of indexDB).

First I’ve heard of this. Do you have a source I can check out?

@rapropos I guess it’s a rhetorical question, as they seem to have turned IndexDB as WebDB. (https://groups.google.com/a/chromium.org/forum/#!topic/chromium-html5/MrriX3jC7Tg).

I am not seeing anything in that thread indicating that IndexedDB is deprecated at all, and furthermore it is from 5 years ago, whereas you claim this is effective “beginning April '17”. Absent further information, I recommend people ignore @FrancoisIonic’s comments in this thread.

@rapropos Maybe you don’t manage website with some traffic, but it was clearly stated from January to March, a console warning stating “IndexDB is deprecated” in all windows google chrome versions of my visitors. After, IndexDB and WebStorage is now the same thing, it’s transparent now.

That link you provided does not say that IndexedDB is deprecated. It directly implies the opposite of that, in fact.

You can StorageQuota to check your quota from within your app’s code.

1 Like

@doron with no warning in live Chrome in Windows?

I’m sorry, but I did not see anything like that in the link you provided. Do you have any other documentation I can check out?

BTW: not sure if related, but I highly recommend OP get rid of “ionic-native” from their package.json and update all @ionic-native/*** to the same version. Specifically, if you have any native plugins >=3.6.0, your app will break unless @ionic-native/core is also >=3,6,0.

1 Like

I’ve been using IndexedDB in many places for years and never saw such a warning.

When I say “using IndexedDB”, I mean directly - the API as defined here – not via Ionic or other libraries, just straight Javascript – never saw a warning about deprecation.

1 Like

@rapropos no sorry, but this way a warning outside of the builds and Ionic, let’s say you have a website using IndexDB (mycase) and it was pulling warnings. It’s not the case any more.

What does this mean? IndexedDB is a browser-side feature; as far as I know it has absolutely nothing whatsoever to do with the server side.