-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
Issue with promises: "A request was placed against a transaction which is currently not active, or which is finished." #70
Comments
@ebryn I had to do the setTimeout trick coz of the way transactions were specified - some transactions like versionChange, where I create an objectStore is async - I did not want the transaction to finish before the next request is placed there - hence the queue mechanism. This has been a source of a lot of inconsistancies, and I plan to rewrite that piece soon. |
How soon? This is something I would like to have a solution for in the next week. I'd be happy to help with the rewrite. |
Ping |
@ebryn Sorry for not getting back - was at phonegap day last weekend. Will look at it today, and tell you how much time I can spend. We could see if we can also break up the work and spend some time. |
@axemclion I would like to use EasyIndexedDB which relies on your IndexedDBShim for browser compatibility. Any idea when you'd have a chance to address this issue? |
@taras Sorry for the delay. I have been really busy on this other project - http://github.com/axemclion/grunt-telementry. I was hoping that mobile browsers soon start supporting this with their new releases, but looks like that aint happening. Also, a lot of people have asked for this, so I should start working on this soon . |
@axemclion I know how hard it can be to switch from one project to another, especially when the other project is not as immediately relevant to what you're doing at the moment. I appreciate the effort that you put into the library and hope you'll find time to continue with it. It would be great to get this sorted out then we can use IndexedDB across all browsers. What are the changes that you'd be able look into this in the near future? |
This issue has been fixed in the latest version. Please give it a try and let us know if there are any problems. Thanks! |
I'm working on a library to wrap IndexedDB with a promise-aware API: https://github.com/ebryn/EasyIndexedDB. I am running into an issue with IndexedDBShim transactions giving me the error: "A request was placed against a transaction which is currently not active, or which is finished." You can see this issue here: http://erikbryn.com/bugs-reports/IndexedDBShim/EasyIndexedDB/test/index.html
From my research, it seems this may be related to assumptions being made inside IndexedDBShim about user code executing within a single event loop of the browser. I noticed that transactions seem to be using setTimeout to schedule themselves to execute on next tick, but the promise library I'm using, RSVP, ensures that promises will resolve asynchronously as well.
The text was updated successfully, but these errors were encountered: