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

enablePersistence not working on Safari v15 #5716

Closed
cmditch opened this issue Nov 10, 2021 · 1 comment · Fixed by #5717
Closed

enablePersistence not working on Safari v15 #5716

cmditch opened this issue Nov 10, 2021 · 1 comment · Fixed by #5717
Assignees

Comments

@cmditch
Copy link
Contributor

cmditch commented Nov 10, 2021

[REQUIRED] Describe your environment

  • Operating System version: macOS 11.6
  • Browser version: 5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Safari/605.1.15
  • Firebase SDK version: 9.4.0
  • Firebase Product: firestore

[REQUIRED] Describe the problem

Very similar in nature to #4076, if not the exact same issue.

Steps to reproduce:

  1. Open app w/ firebase.firestore().enablePersistence({ synchronizeTabs: true }) (synchronizeTabs option doesn't seem to make a difference).
  2. Manually change the address bar to a different path in your app.
  3. App reloads but doesn't make it very far at all in the load process.

App does not make it past the "Opening database" step:
image

Relevant Code:

It looks like a workaround for this issue was merged in #5166 by changing the cleanup behavior for Safari 14. I changed this from navigator.appVersion.match('Version/14') to navigator.appVersion.match(/Version\/1[45]/) to have the patch work for Safari 14 and 15 and my app now loads correctly.

@ehsannas
Copy link
Contributor

Thanks @cmditch for reporting this and for your contribution to the code. We'll review the PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants