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
- Upgrade Firefox to 27 to test #70 — committed to localForage/localForage by tofumatt 10 years ago
- Merge pull request #71 from mozilla/firefox-27-state Upgrade Firefox to 27 to test #70 — committed to localForage/localForage by deleted user 10 years ago
- fix: invalidStateError in firefox private browsing Fixes https://github.com/mozilla/localForage/issues/70 — committed to scotttrinh/angular-localForage by ocombe 10 years ago
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 withopenreq.error
rather than the error passed in to the handler?