Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firestore: Received WebStorage notification for local change. Another client might have garbage-collected our state

I'm getting the following error coming from Firestore.

"Firestore (7.24.0): Received WebStorage notification for local change.
Another client might have garbage-collected our state",

The issue seems to be coming from this exact line in Firestore JS SDK: https://github.com/firebase/firebase-js-sdk/blob/master/packages/firestore/src/local/shared_client_state.ts#L759

I do have persistence support (offline support) enabled with:

firebase.firestore.enablePersistence({ synchronizeTabs: true });

I'm not too familiar with the internal implementation of the SDK, so it would be nice to know:

  • What's a likely scenario for this to happen?
  • What's the recommended action to recover from this error?

The UX in the app is just a hanged app that seems to fail in its read/write operations until the app itself is killed and restored.

like image 474
cSn Avatar asked Nov 24 '20 13:11

cSn


People also ask

Does an update to a Cloud Firestore document generate an event?

An update to a Cloud Firestore document, where data is unchanged (a no-op write), will not generate an update or write event. It is not possible to add events to specific fields.

What is FireStore function in Firebase SDK?

Cloud Firestore function triggers The Cloud Functions for Firebase SDK exports a functions.firestore object that allows you to create handlers tied to specific Cloud Firestore events. Note: Cloud Firestore events will trigger only on document changes.

How do I use the get function in Cloud Firestore?

Alternatively, you can use the get function to access specific fields: Each function invocation is associated with a specific document in your Cloud Firestore database. You can access that document as a DocumentReference in the ref property of the snapshot returned to your function.

How is Cloud Firestore different from Realtime Database?

Like Realtime Database, Cloud Firestore uses data synchronization to update data on any connected device. However, it's also designed to make simple, one-time fetch queries efficiently.


1 Answers

It seems that this is a known issue and Firebase Engineering Team is working on solving it.

I created an issue with Google Issue Tracker for you.

However there is no ETA and all future updates will be provided on that thread.

Please “star” the issue to receive comments and status updates.

#EDIT:

I was informed by the Firestore Engineering Team that this log message doesn't affect the SDK functionality and you can ignore this message. However we prioritize the issue in order to fix the root cause.

like image 74
marian.vladoi Avatar answered Oct 12 '22 02:10

marian.vladoi