indexeddbshim / IndexedDBShim

A polyfill for IndexedDB using WebSql
Other
968 stars 191 forks source link

Transaction is inactivated while still in progress when used with IDB. #361

Closed wishawa closed 3 years ago

wishawa commented 3 years ago

I'm trying to use IDB on top of this library in an environment where only WebSQL is available (React Native and SQLite).

When calling cursor.continue(), DOMException: A request was placed against a transaction which is currently not active, or which is finished is thrown.

The error does not happen if I use IDB in with normal LocalStorage in both Firefox and Chrome.

I've created a demo here, with source code here. (shimIndexedDB.__useShim(); is used to simulate the environment, so you probably need Chrome for this demo to work).

wishawa commented 3 years ago

Apologies. I did not read https://github.com/indexeddbshim/IndexedDBShim#taskmicro-task-timing. Seems like this is a known issue. Closing.