# Firestore: “Failed to obtain exclusive access to the persistence layer”

> Firestore says Failed to obtain exclusive access to the persistence layer when a second tab opens. Turn on multi-tab persistence with persistentLocalCache.

Canonical: https://app369.com/fix/firestore-failed-to-obtain-exclusive-access/
Last updated: 2026-11-09

Failed to obtain exclusive access is the Firestore web error when a second tab opens an app that uses single-tab persistence. Only one tab can own the IndexedDB cache in that mode, so the other tab logs this error and falls back to a memory cache with no offline data.

**Short answer**

Initialize Firestore with persistentLocalCache and persistentMultipleTabManager so every tab shares the cache. Replace enableIndexedDbPersistence, which is obsolete, and use the same settings in every tab. Call initializeFirestore once, before any other Firestore call.

Rather not fix it yourself? [**App Fix Ticket**](https://app369.com/fixed-price/flutter-firebase-bug-fix/) starts with a fixed-price diagnosis, then a fixed price for the fix before any fix work.

## **Why the second tab can’t get the cache, and the fix**

1. 01 ### **The app uses single-tab persistence**
  > “Defaults to single-tab persistence if no tab manager is specified.” [**Firebase, Access data offline (web)**](https://firebase.google.com/docs/firestore/manage-data/enable-offline) persistentLocalCache with no tab manager is single-tab. The second tab keeps working, but without offline data, and its cache isn’t shared. Pass persistentMultipleTabManager so all tabs share the cache.```
import { initializeFirestore, persistentLocalCache, persistentMultipleTabManager } from 'firebase/firestore';

const db = initializeFirestore(app, {
  localCache: persistentLocalCache({ tabManager: persistentMultipleTabManager() }),
});
```
2. 02 ### **The code still calls enableIndexedDbPersistence**
  > “The app is already open in another browser tab.” [**Firebase, enableIndexedDbPersistence (failed-precondition)**](https://firebase.google.com/docs/reference/js/firestore_.md) The older call is single-tab and rejects with failed-precondition when the app is already open in another tab. Firebase marks it obsolete; move to localCache in initializeFirestore.
3. 03 ### **Old and new settings are mixed**
  > “Calling this function when FirestoreSettings.localCache is already specified will throw an exception.” [**Firebase, enableIndexedDbPersistence**](https://firebase.google.com/docs/reference/js/firestore_.md) Calling enableIndexedDbPersistence or enableMultiTabIndexedDbPersistence after setting localCache throws. Keep only the localCache setting.
4. 04 ### **Tabs use different persistence settings** Also check: the full message mentions experimentalForceOwningTab, the older option that makes one tab take the cache without checking (persistentSingleTabManager with forceOwnership in the new API). With it, only one tab may have persistence on at a time. Remove it and use persistentMultipleTabManager in every tab.

Checked against the vendor’s docs on November 9, 2026: [Firebase docs: Access data offline](https://firebase.google.com/docs/firestore/manage-data/enable-offline); [Firebase JS reference: firestore](https://firebase.google.com/docs/reference/js/firestore_.md).

## **Rather hand it over?**

Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.

- [from $450**App Fix Ticket**One reproducible bug in an existing mobile or web app, diagnosed and fixed.**See scope and start**](https://app369.com/fixed-price/flutter-firebase-bug-fix/)
- [from $450**AI-Built App Rescue**A Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.****No issues worth fixing, no charge.**** If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.**See scope and start**](https://app369.com/fixed-price/ai-app-rescue/)

[**All 127 Fiverr reviews**](https://app369.com/reviews/)

Related: [**Firestore client is offline**](https://app369.com/fix/firestore-client-is-offline/) · [**Firestore deadline exceeded**](https://app369.com/fix/firestore-deadline-exceeded/) · [**Firestore quota exceeded**](https://app369.com/fix/firestore-quota-exceeded/) · [**Cloud Firestore API disabled**](https://app369.com/fix/firestore-api-not-used-or-disabled/)

Questions

## **More on this error**

<details>

<summary>**Is offline persistence on by default on the web? **+</summary>

No. On the web Firestore uses a memory cache unless you set persistentLocalCache. Android and Apple apps have persistence on by default.

</details>

<details>

<summary>**Does persistence work in every browser? **+</summary>

No. Firebase says web persistence works only in Chrome, Safari and Firefox. Elsewhere it fails with unimplemented, and Firestore keeps working without the offline cache.

</details>

<details>

<summary>**Can you fix it for me? **+</summary>

If one bug is the whole problem, the App Fix Ticket covers it: a written diagnosis first, then the fix. If the app has more going on, the Launch Check is a written check of the whole app. Each issue found is rated critical, high, medium or low, with where it is and how it was confirmed. No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.

</details>

A different error?

## **Describe it and get a written quote**

Send the error and what you were doing. You get a written scope, a fixed price and a timeline; Simon replies by email, usually within one business day.

[**Describe your problem **→](https://app369.com/contact/) [**All fixes**](https://app369.com/fix/)