Skip to content

enablePersistence not working on Safari v15 #5716

Closed
@cmditch

Description

@cmditch

[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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions