Skip to content

Safari issue with db.addCollections method when using replication + worker storage #7360

@epodgaysky

Description

@epodgaysky

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:

  1. Clone my rxdb fork: https://github.com/epodgaysky/rxdb (it contains no logic changes for original library, just some logs)
    checkout to develop branch
  2. Run npm i --legacy-peer-deps in the root folder
  3. Go to the test example folder cd examples/graphql
  4. Open package.json file and paste your accessToken for rxdb-premium
  5. Run npm run preinstall && npm install --legacy-peer-deps
  6. Run npm run build
  7. Run npm run server
  8. Run npm run build:serve
  9. Open 127.0.0.1:8888 in safari, you should be available to add new heroes. No any errors should appear
  10. When all the steps done and you have couple heroes - refresh the page many times until Creating database.. message hangs infinitely on the page.
  11. 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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions