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

Probably Corrupted DB #2959

Open
prismvineeth opened this issue Apr 18, 2024 · 4 comments
Open

Probably Corrupted DB #2959

prismvineeth opened this issue Apr 18, 2024 · 4 comments
Labels
backend-web-wasm bug Something isn't working

Comments

@prismvineeth
Copy link

Probably Corrupted DB

An error ocurred trying to fetch elements from key "0". Error: Invalid argument(s): Invalid typed array length: -1548288
unparsed                                                                at new Uint8Array (<anonymous>)
drift_worker.js 880:36                                              Object.bv
drift_worker.js 12615:19                                            <fn>
drift_worker.js 1724:63                                             qD.a
drift_worker.js 6515:14                                             qD.$2
drift_worker.js 6509:21                                             qk.$1
drift_worker.js 7475:31                                             kq.bf
drift_worker.js 6849:11                                             oZ.$0
drift_worker.js 1836:39                                             Object.e0
drift_worker.js 6783:3                                              q.bq
===== asynchronous gap ===========================
dart-sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart 945:28  get current
packages/drift/src/remote/communication.dart 113:66                 request
packages/drift/src/remote/client_impl.dart 157:10                   ensureOpen
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54  runBody
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 127:5  _async
packages/drift/src/remote/client_impl.dart 149:26                   ensureOpen
packages/drift/src/utils/lazy_database.dart 61:49                   <fn>

I am getting this message intermitedly once in a while while working with flutter web - drift: ^2.16.0

Any clue why this is happening ? Sometimes it goes away after clearing all cache and data.

@simolus3 simolus3 added bug Something isn't working backend-web-wasm labels Apr 18, 2024
@simolus3
Copy link
Owner

Thanks for the report. Are you also using the 2.16 version of drift_worker.js?

@prismvineeth
Copy link
Author

Yes correct.

@prismvineeth
Copy link
Author

Sometimes I also get

An error ocurred trying to fetch elements from key “0”. Error: SqliteException(1): while preparing statement, no such table: inquiry_table, SQL logic error (code 1)
  Causing statement: SELECT * FROM “inquiry_table” WHERE “branch_id” = ? AND “inquiry_type” = ? ORDER BY “client_name” ASC LIMIT 10 OFFSET 0;

I do have a migration strategy etc in place

@prismvineeth
Copy link
Author

I tried clean and regenerate the db files and then tried after clearning cache

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

No branches or pull requests

2 participants