-
Notifications
You must be signed in to change notification settings - Fork 19
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
Bug: recursive use of an object detected which would lead to unsafe aliasing in rust #87
Comments
It turns out, it is related to this issue: https://stackoverflow.com/questions/61296252/failed-to-execute-put-on-idbobjectstore-the-transaction-has-finished IndexDB doesn't really like multiple asynchronous requests. Once I wrapped query in mutex, it worked: import { Mutex } from 'mutex-ts';
const mutex = new Mutex();
const query = db.query;
db.query = async <T extends unknown[]>(
...args: [string | PreparedQuery, Record<string, unknown> | undefined]
) => {
const release = await mutex.obtain();
try {
return await (query.apply(db, args) as Promise<T>);
} finally {
release();
}
}; mutex-ts is my library. |
I am also still getting it sometimes, but not sure how to fix it on my end |
Facing the same issue here on surrealdb.js: 1.0.0-beta.14, surrealdb.wasm: 1.0.0-beta.14. |
Just re-test in |
@limcheekin, you may try using my approach above for the time being |
@orimay Thanks, I am aware about your approach, but I am using surrealdb.wasm in a Flutter Web application. |
+1 |
I tested the latest release of the surrealdb.wasm 1.0.1 for few days, it seems the issue had been resolved by the PR. @orimay do you have time to test it out? |
Describe the bug
I keep getting the same error, can't track the root of where it's coming from.
Steps to reproduce
Not sure if this is enough (the project is big), but here's my setup:
Expected behaviour
Should not error out
SurrealDB version
surrealdb.js: 1.0.0-beta.9, surrealdb.wasm: 1.0.0-beta.12
Contact Details
[email protected]
Is there an existing issue for this?
Code of Conduct
The text was updated successfully, but these errors were encountered: