-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Issue with 'could not requestRemote' during migration from v14 -> v15 (indexedDb RxStorage) #5565
Comments
Hi @alex-hladun The call to .cleanup() is optional and for a quick fix you might just want to copy the migration plugin code and remove that line. |
Are you using the same |
@pubkey Thanks! I'm serving the v14 worker inside the public folder, I thought v15 provided the indexeddb.worker.js link from within the rxdb-premium repo? |
No you still have to copy the worker over to somewhere your webserver can serve it. So you should copy it also to the public folder. |
How does getRxStorageIndexedDB() v15 know which worker file to reference? I don't see that option in the args |
You have to specify the different worker url in the remote storage. |
Ah I see. So in your example you not only migrate v14 to v15, but also the worker storage to the non-worker plain indexeddb storage. |
@pubkey No, my intention was to stick with the worker storage. Fixed that, pushed it up, still seeing the cleanup crash. |
@alex-hladun I cannot see the change in the repo, are you sure you pushed it? |
Ah, there is a |
Thank you for your example code. I could reproduce the problem also on newest RxDB 15.5.0. For fixing, I wrapped ii in a try catch to fix the error. Calling .cleanup() during migration is optional so that fixes the migration. Im an not sure if .cleanup() should be called anyway because it reduces migration performance. |
Great, thanks for taking a look! |
Hello, was recently working on upgrading our prod db instance from v14 to v15. Running into an error which occurs during the migration process.
rx-storage-remote.ts:220 Uncaught (in promise) Error: could not requestRemote: { "methodName": "cleanup", "params": [ 0 ], "error": { "name": "NotFoundError", "message": "Failed to execute 'index' on 'IDBObjectStore': The specified index was not found.", "code": 8, "stack": "Error: Failed to execute 'index' on 'IDBObjectStore': The specified index was not found. \n at t.cleanup (http://localhost:8888/indexeddb.worker.js:1:84335) \n at async Object.next (http://localhost:8888/indexeddb.worker.js:1:90902)"
I was unable to make a unit test, due to the complex nature of the migration:
getRxStorageWorker
andRxStorageIndexedDBStatics
in order to re-create the storage for v14.Note: The data still migrates succesffully after refresh. However, in our prod app, not all data migrates and we get the same error during 'cleanup'
The text was updated successfully, but these errors were encountered: