Safari issue with db.addCollections method when using replication + worker storage
Issue explanation We've faced with an issue related to Safari. In our application it constantly reproduces on almost each device. I've modified rxdb graphql example to provide a way to reproduce it, but it's harder to catch than in our project. It also looks like it somehow depends on the device's overall performance and load.
Devices + Safari versions where the issue reproduced: MacBook Apple M1 Pro 16 inch, Safari Version 17.1.2 (19616.2.9.11.12) MacBook Apple M4 Pro 16 inch, Safari Version 18.6 (20621.3.11.11.3) - reproduced only on low power mode in battery system settings of macos
Rxdb setup: IndexedDb storage wrapped into SharedWorker + GraphQL replication
How to reproduce:
- Clone my rxdb fork: https://github.com/epodgaysky/rxdb (it contains no logic changes for original library, just some logs) checkout to develop branch
- Run npm i --legacy-peer-deps in the root folder
- Go to the test example folder cd examples/graphql
- Open package.json file and paste your accessToken for rxdb-premium
- Run npm run preinstall && npm install --legacy-peer-deps
- Run npm run build
- Run npm run server
- Run npm run build:serve
- Open 127.0.0.1:8888 in safari, you should be available to add new heroes. No any errors should appear
- When all the steps done and you have couple heroes - refresh the page many times until Creating database.. message hangs infinitely on the page.
- Bug reproduced. Database won't ever get created from this state until you kill safari process.
Video proof how the issue reproduced on MacBook Apple M1 Pro 16 inch, Safari Version 17.1.2 (19616.2.9.11.12) https://www.youtube.com/watch?v=EQQjhJygI1Y
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!
Can you check if you can reproduce the same problem with the dexie storage?
@pubkey Yes, just reproduced it on dexie.