question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

InvalidStateError in Firefox

See original GitHub issue

In FF v27.0.1 occurs error:

asyncStorage: can't open database: InvalidStateError
InvalidStateError

in this code:

var openreq = indexedDB.open(DBNAME, DBVERSION);

In Chrome v32.0.1700.107 m everything works fine. Could you help me?

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:24 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
elyobocommented, Jan 22, 2017

Thanks @thgreasi that is working for me in your example pen and by testing your branch in my own application. I had tried .stopPropagation() (didn’t work) but got dragged away before trying out .preventDefault(). Thank you for investigating and resolving this!

I can’t see any other side effects to this. Also, it sounds like FF’s behaviour here is the “right” behavior with regards to propagating the errors to window.onerror (see “Integrate with window.onerror” in the w3c/IndexedDB spec) so it does look like this is the right thing to do.

Not directly related, but why does the .onerror handler reject with openreq.error rather than the error passed in to the handler?

0reactions
elyobocommented, Jan 23, 2017

I didn’t, but most browsers don’t fail there 😃 I don’t have a large suite available for testing sorry. My colleague reported to me that .ready resolves rather than rejects in Safari private browsing mode though, even though there are no valid engines available.

I’m not sure that they’re the same object; if multiple errors occur then it would only be the most recent one, so possibly can’t be relied on. Not sure whether that’s possible or not when opening a DB though, I suppose the first error aborts it and so no more occur. Not on a computer to check equality right now, but I did have an error calling preventDefault on the openreq.error object rather than the passed in error, so they may not be the same in FF (although that does seem weird, so maybe the error was mine).

On Mon, 23 Jan 2017, 12:20 Thodoris Greasidis notifications@github.com wrote:

Did you got any weird results on other browsers?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/localForage/localForage/issues/70#issuecomment-274402797, or mute the thread https://github.com/notifications/unsubscribe-auth/AAY4_lVzr2BcKC-qqgM9Qy3EjrmTWBkQks5rVDitgaJpZM4BixHg .

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript console? | Firefox Support Forum
The error was: InvalidStateError. A mutation operation was attempted on a database that did not allow mutations. uh... what?
Read more >
Firefox. InvalidStateError: An attempt was made to use an ...
Code raise exception "InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable" in Firefox on...
Read more >
InvalidStateError on Firefox · Issue #312 · dexie/Dexie.js · GitHub
Hi, For some time now, I've seen a recurring error: InvalidStateError InvalidStateError occurred when opening database database_name.
Read more >
Firefox: InvalidStateError - Saxon-CE - Saxonica - Planio
Hello,. I have a Saxon-CE problem in displaying xml on the fly via Firefox (40.0.2) and Internet Explorer (11) under Windows 7 Professional...
Read more >
HTML : Invalid state Error in Firefox for Indexed Db - YouTube
HTML : Invalid state Error in Firefox for Indexed Db [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] HTML : Invalid state Error in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found