Error when losing/retrieving network connection
Operating System
macOS 10.15.7 Catalina desktop Apple
Environment (if applicable)
Chrome 138.0.0.0
Firebase SDK Version
11.10.0
Firebase SDK Product(s)
Firestore
Project Tooling
angular + angularFire
Detailed Problem Description
the user seemed to lose/regain network connection when it happened
Steps and code to reproduce issue
We have communicated about this error message before here: https://github.com/firebase/firebase-js-sdk/issues/8856 I'm creating a new ticket, because the issue isn't during logout, but when the user is losing network connection
message: FIRESTORE (11.10.0) INTERNAL ASSERTION FAILED: Unexpected state (ID: ca9) CONTEXT: {"ve":-1}
stacktrace:
Error: FIRESTORE (11.10.0) INTERNAL ASSERTION FAILED: Unexpected state (ID: b815) CONTEXT: {"hc":"Error: FIRESTORE (11.10.0) INTERNAL ASSERTION FAILED: Unexpected state (ID: ca9) CONTEXT: {"ve":-1}\n at u$ (https://www.acro-companion.com/chunk-JGHCOMLU.js:25:10937)\n at Kt (https://www.acro-companion.com/chunk-JGHCOMLU.js:25:11026)\n at Hy.Ue (https://www.acro-companion.com/chunk-JGHCOMLU.js:28:4938)\n at https://www.acro-companion.com/chunk-JGHCOMLU.js:28:5371\n at Array.forEach (
facing this same issue for many months. What is the fix? This error does not come if we don't do this
const db = initializeFirestore(app, {
localCache: persistentLocalCache()
});
and do this instead
const db = getFirestore(app);
But I want offline capability.
I tried with 12.0.0 even here i am getting same error:
[2025-08-04T04:13:31.773Z] @firebase/firestore: Firestore (12.0.0): INTERNAL UNHANDLED ERROR: DataCloneError: Failed to execute 'put' on 'IDBObjectStore': #<Object> could not be cloned.
still stuck. anyone any solution or work around to this?
Sorry for the delayed response. Can you describe what happens after this error, does the SDK stopped functioning since that point?
Is it possible to get:
- debug log from the SDK
- A minimum reproduction app
@wu-hui See also another user reporting the same issue: https://github.com/firebase/firebase-js-sdk/issues/8383
see also my proposal here what would help us get this sort of debug logging: https://github.com/firebase/firebase-js-sdk/issues/7590#issuecomment-3172745204
We are still blocked, unable to upgrade to latest version of firestore.