Raphael Rafatpanah
Raphael Rafatpanah

Reputation: 19967

Firestore persistence (web) issue

I'm working locally with Firestore for the web (Firebase version 9.8.2) and am trying to enable persistence. This works fine on initial page load, and also on refreshes, but once the source code is changed (even a trivial change like changing the text content of a DOM node), I receive the following error after calling enableIndexedDbPersistence:

Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using experimentalForceOwningTab:true, make sure that only one tab has persistence enabled at any given time.

This same error occurs in the same way even if experimentalForceOwningTab:true is set.

Upvotes: 0

Views: 1468

Answers (1)

Raphael Rafatpanah
Raphael Rafatpanah

Reputation: 19967

According to the API Reference docs for enableIndexedDbPersistence, the property is now called forceOwnership (not experimentalForceOwningTab). This works!

Upvotes: 2

Related Questions