How are quota errors with IndexedDB supposed to work? Seems like it might be broken.

465 views
Skip to first unread message

Jeremy Scheff

unread,
Feb 13, 2015, 9:50:04 PM2/13/15
to chromiu...@chromium.org
I noticed some weirdness with quota errors so I tried my best to reproduce it. I created a relatively small VM, installed Chrome, and threw a ton of data in IndexedDB. Eventually, it hit the quota limit. At that point I thought it was supposed to start giving me QuotaExceededError. But it seems to instead do one of two things. If it's adding data to an existing object store, it fails silently. If it's adding data during an onupgradeneeded handler (such as when creating a new database), it gives an AbortError ("Version change transaction was aborted in upgradeneeded event handler").

How are you guys handling quota errors? Is anybody doing this successfully? Is there a better way to test and debug these errors than what I did?

I would love a way to tell my users that they should delete some old data, rather than the current behavior of my app which is to silently fail in weird ways when the quota is exceeded.

Shachar Zohar

unread,
Feb 14, 2015, 1:28:28 PM2/14/15
to chromiu...@chromium.org
Probably will help to answer and reproduce if you can specify whether you're using temporary or persistent storage

Jeremy Scheff

unread,
Feb 14, 2015, 1:58:33 PM2/14/15
to Shachar Zohar, chromiu...@chromium.org
Temporary storage. I didn't even know that IndexedDB could use persistent storage yet!


--
Jeremy Scheff

--
You received this message because you are subscribed to a topic in the Google Groups "Chromium HTML5" group.
To unsubscribe from this topic, visit https://groups.google.com/a/chromium.org/d/topic/chromium-html5/LMV_7BiVFok/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chromium-html...@chromium.org.
To post to this group, send email to chromiu...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-html5/.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.

Kinuko Yasuda

unread,
Feb 15, 2015, 9:30:55 PM2/15/15
to Jeremy Scheff, Shachar Zohar, Chromium HTML5, Joshua Bell
+Joshua, you might be able to give an answer?

--
You received this message because you are subscribed to the Google Groups "Chromium HTML5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-html...@chromium.org.

Joshua Bell

unread,
Feb 17, 2015, 2:21:29 PM2/17/15
to Kinuko Yasuda, Jeremy Scheff, Shachar Zohar, Chromium HTML5
It sounds like you're hitting crbug.com/329628


David Grogan

unread,
Feb 25, 2015, 12:05:16 PM2/25/15
to Jeremy Scheff, Chromium HTML5
On Fri, Feb 13, 2015 at 6:50 PM, Jeremy Scheff <jdsc...@gmail.com> wrote:
I noticed some weirdness with quota errors so I tried my best to reproduce it. I created a relatively small VM, installed Chrome, and threw a ton of data in IndexedDB. Eventually, it hit the quota limit. At that point I thought it was supposed to start giving me QuotaExceededError. But it seems to instead do one of two things. If it's adding data to an existing object store, it fails silently.

What does "fail silently" mean? Your transaction gets a complete event but the data isn't there? If that's the case it would be a serious transgression; please file a new issue with your code and repro steps.
 
If it's adding data during an onupgradeneeded handler (such as when creating a new database), it gives an AbortError ("Version change transaction was aborted in upgradeneeded event handler").

How are you guys handling quota errors? Is anybody doing this successfully? Is there a better way to test and debug these errors than what I did?

I would love a way to tell my users that they should delete some old data, rather than the current behavior of my app which is to silently fail in weird ways when the quota is exceeded.

--
Reply all
Reply to author
Forward
0 new messages