localForage: InvalidStateError in Firefox

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?

About this issue

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

Commits related to this issue

Most upvoted comments

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?