Description
Operating System
Latest Windows 10/11 (probably all os)
Browser Version
Latest Chrome/Edge (probably all browsers)
Firebase SDK Version
10.12.2
Firebase SDK Product:
Firestore
Describe your project's tooling
Angular 18 app via newest tooling
Describe the problem
When using multi-tab persistence and realtime listeners via onSnapshot and includeMetadataChanges: true, the queries in secondary tabs never report metadata.fromCache=false, so I cannot detect correct online state for queries when having multiple tabs...
This works fine with 10.12.0, and I tracked down a PR included in 10.12.1 related to a multi-tab issue (#8247) which probably causes this issue. This PR says it fixes that queries in secondary tabs include empty snapshots, but it SHOULD report empty snapshots with changed metadata when includeMetadataChanges=true, or else we cannot determine online state of queries...
Steps and code to reproduce issue
- create app with multi-tab persistence that opens a realtime listener via onSnapshot and with includeMetadataChanges: true (
initializeFirestore(getApp(), { localCache: persistentLocalCache({ tabManager: persistentMultipleTabManager() }) });
) - Open app in multiple tabs in browser, and observe the the queries in the secondary tabs never report metadata.fromCache=false