-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
PrematureCommitError: Transaction committed too early on addCollections() #6008
Comments
To add more informations while debugging (I am working with @Mike-FR ) The code that emit exception start here: https://github.com/pubkey/rxdb/blob/master/src/rx-database.ts#L351 The bulkWrite funciton is called first time with The devMode is True. The scopeFuncIsAsync is True. The transaction code run without issue but when it try to commit it directly send to: https://github.com/dexie/Dexie.js/blob/a5519e58e407c518cb47c10673fc8c2fe585a389/src/classes/dexie/transaction-helpers.ts#L99 So IMO there is something between https://github.com/pubkey/rxdb/blob/master/src/plugins/storage-dexie/rx-storage-instance-dexie.ts#L148 and https://github.com/pubkey/rxdb/blob/master/src/plugins/storage-dexie/rx-storage-instance-dexie.ts#L202 that do not respect Dexie rule: https://dexie.org/docs/DexieErrors/Dexie.PrematureCommitError.html |
By looking more the issue probably come from incrementExpectedAwaits or decrementExpectedAwaits. Meaning that we may have some other dependecy changing the default behavior of async/await. |
I identified that the problem comes from the |
Look like: #6011 Is that mean we need to wait for faro to update dependencies of zone js ? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed soon. Please update it or it may be closed to keep our repository organized. The best way is to add some more information or make a pull request with a test case. Also you might get help in fixing it at the RxDB Community Chat If you know you will continue working on this, just write any message to the issue (like "ping") to remove the stale tag. |
ping |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed soon. Please update it or it may be closed to keep our repository organized. The best way is to add some more information or make a pull request with a test case. Also you might get help in fixing it at the RxDB Community Chat If you know you will continue working on this, just write any message to the issue (like "ping") to remove the stale tag. |
Hello,
I was using rxdb 14 on a Vue 2.7 project without problems. I updated rxdb to version 15 and since then I'm facing a PrematureCommitError" error when doing addCollections().
I tried several things without success so I redid a basic implementation on an internal test repository which runs on Vue 3. Same error.
Here is the code on my test repo.
my package.json if it helps
The error inside the console that appears immediately
The IndexexDB look likes
Do you see an implementation error? Thanks for your help.
The text was updated successfully, but these errors were encountered: