Skip to content

On Mobile Safari the fetch process would sometimes fail. #44

@lhr0909

Description

@lhr0909

Please save me some time and use the following template. In 90% of all issues I can't reproduce the problem because I don't know what exactly you are doing, in which environment, or which y-* version is responsible. Just use the following template even if you think the problem is obvious.

Checklist

Describe the bug
I am currently on latest mobile Safari on iOS and the sync process would fail with the following message:

UnknownError: Connection to Indexed Database server lost. Refresh the page to try again

This error is unhandled so it breaks the entire page from loading, since there isn't an error event to subscribe to, it is impossible to catch.

To Reproduce
Steps to reproduce the behavior:

Should be able to see the error on mobile iOS Safari with the simple example and refresh a few times. Going to provide an example.

Expected behavior

in the fetchUpdates function, there should be a callback for handling errors, and the promise chain should have a .catch() block to handle any promise rejections with the error callback. There should be an error event being emitted for the users to handle from the outside.

Screenshots
If applicable, add screenshots to help explain your problem.

Image

Environment Information

  • Mobile iOS Safari (version 18.6.1)
  • yjs v13.6.27
  • y-indexeddb v9.0.12

Additional context
Add any other context about the problem here.

  • I'm a sponsor 💖
  • This issue is a blocker for my project.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions