Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backbone-indexeddb connection error #288

Closed
jcrben opened this issue Oct 24, 2015 · 1 comment
Closed

backbone-indexeddb connection error #288

jcrben opened this issue Oct 24, 2015 · 1 comment

Comments

@jcrben
Copy link
Contributor

jcrben commented Oct 24, 2015

I got the following message from backbone-indexeddb sometimes: Couldn't not connect to the database (seems like that library needs to fix its double negative). Digging in a bit more, e.srcElement.error.message has this: The requested version (6) is less than the existing version (7). It's a VersionError (seems to be an official IndexedDB thing).

This might be a niche development problem. It came as I was doing some git reset --hard to git bisect a problem with tags. It seems that the schema in app/scripts/migrations/note.js goes up to version 6 in the current version but I must have grabbed a higher version later.

I was able to get it working again (I think) by manually deleting the database: first listed dbs per this and then ran indexedDB.deleteDatabase('notes-db'); from the console. But maybe the application could fixed to recover from these types of errors on its own.

@wwebfor wwebfor added the bug label Dec 6, 2015
@wwebfor wwebfor added this to the 1. Refactor and fix bugs milestone Dec 6, 2015
@wwebfor
Copy link
Member

wwebfor commented Dec 24, 2015

You're right. We solved this by switching to localForage. It doesn't depend on database versions.

@wwebfor wwebfor closed this as completed Dec 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants