You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Firestore emulator: snapshotsInSync() fires before all listeners effected by a WriteBatch have fired after enableNetwork() #11625
Start ClientA that is listening to QuerySnapshot events for CollectionA and CollectionB. ClientA is also listening to onSnapshotsInSync
Start ClientB
Take ClientA offline by calling disableNetwork()
Have ClientB write to CollectionA and CollectionB in a single batch and commit the batch
Take ClientA online by calling enableNetwork()
Observe that when onSnapshotsInSync fires in ClientA the listener for CollectionA has received the update from ClientB, but the listener for CollectionB has not
Retry against a real Firebase backend and observe that onSnapshotsInSync now only fires after both listeners have received the update from ClientB
The snapshots-in-sync event indicates that all listeners affected by a given change have fired, even if a single server-generated change affects multiple listeners.
So in the above case onSnapshotsInSync should not fire if one of the listeners has received an even that was written as a batch, but other listeners affected by that batch have not received the event yet.
[REQUIRED] Actual behavior
onSnapshotsInSync event fires before all effected listeners have received all events from the batch. Note this only happens when using the emulator.
changed the title [-]Firestore emulator: snapshotsInSync() fires between the two halves of one WriteBatch after enableNetwork()[/-][+]Firestore emulator: snapshotsInSync() fires before all listeners effected by a WriteBatch have fired after enableNetwork()[/+]on Dec 2, 2026
Activity
[-]Firestore emulator: snapshotsInSync() fires between the two halves of one WriteBatch after enableNetwork()[/-][+]Firestore emulator: snapshotsInSync() fires before all listeners effected by a WriteBatch have fired after enableNetwork()[/+]