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

IDB InvalidStateError due to timing issues with lazy-updates in database #407

Open
nolanlawson opened this issue Mar 11, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@nolanlawson
Copy link
Owner

nolanlawson commented Mar 11, 2024

It's possible to get IDB (or at least fake-indexeddb) to throw this error:

InvalidStateError: An operation was called on an object on which it is not allowed
or at a time when it is not allowed. Also occurs if a request is made on a source
object that has been deleted or removed. Use TransactionInactiveError or
ReadOnlyError when possible, as they are more specific variations of InvalidStateError.

I have a repro forthcoming; it's in the unit tests.

@nolanlawson nolanlawson added the bug Something isn't working label Mar 11, 2024
@nolanlawson
Copy link
Owner Author

Repro: comment out this line:

await db2._lazyUpdate // TODO [#407] Skipping this causes an InvalidStateError in IDB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant