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 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
01
The app uses single-tab persistence
“Defaults to single-tab persistence if no tab manager is specified.” Firebase, Access data offline (web)
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() }), });02
The code still calls enableIndexedDbPersistence
“The app is already open in another browser tab.” Firebase, enableIndexedDbPersistence (failed-precondition)
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.
03
Old and new settings are mixed
“Calling this function when FirestoreSettings.localCache is already specified will throw an exception.” Firebase, enableIndexedDbPersistence
Calling enableIndexedDbPersistence or enableMultiTabIndexedDbPersistence after setting localCache throws. Keep only the localCache setting.
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 : Firebase docs: Access data offline; Firebase JS reference: firestore.
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- from $450App Fix TicketOne reproducible bug in an existing mobile or web app, diagnosed and fixed.See scope and start
- from $450AI-Built App RescueA 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
“Very responsive, attentive to fixing bugs, and completed the project as needed! Thank you!”
Related: Firestore client is offline · Firestore deadline exceeded · Firestore quota exceeded · Cloud Firestore API disabled