firebase-js-sdk icon indicating copy to clipboard operation
firebase-js-sdk copied to clipboard

Firestore Error After Upgrading to Firebase JS SDK v12.6.0 — “Change version backslides”

Open MedAmineAzaiez opened this issue 2 weeks ago • 6 comments

Operating System

Windows 11, MacOS

Environment

Framework: Angular 21, Node.js version: 20.11.1, Package Manager: npm 10.2+, Browser versions observed: Chrome 131, Safari 18, Firefox 132

Firebase SDK Version

12.6.0

Firebase SDK Product(s)

Firestore

Project Tooling

•	Framework: Angular 21 (standalone components, zoneless change detection)
•	Build System: Angular CLI using esbuild for bundling
•	TypeScript: v5.5+
•	Package Manager: npm (v10.x)
•	Node.js: v20.11.1

Detailed Problem Description

We recently upgraded our application from Firebase JS SDK 12.5.0 → 12.6.0. After the upgrade, we began seeing new intermittent Firestore errors in production that never occurred before. Our goal was simply to stay up-to-date with the latest SDK release—no Firestore logic, listeners, or backend behavior changed on our side.

What we were trying to achieve • Maintain current Firebase versions. • Continue using Firestore snapshot listeners as usual. • No functional changes were made to our Firestore implementation.

What actually happened Immediately after upgrading to v12.6.0, we started receiving intermittent Firestore internal errors in production. These errors appear to be thrown during Firestore’s streaming / watch pipeline (snapshot listeners). The application continues functioning, but logs indicate unexpected internal state inconsistencies within Firestore.

Reverting to v12.5.0 makes the issue disappear completely.

Unexpected behavior / Error message Example error:

Change version backslides. StreamingTargetHandle: 6 Current version: 1765101794777310 Change version: 1765101794776157

Example stack trace:

s@https://www.acro-companion.com/chunk-5DLN5Q7L.js:48:1720 ht@https://www.acro-companion.com/chunk-5DLN5Q7L.js:58:11910 0@https://www.acro-companion.com/chunk-5DLN5Q7L.js:61:12110 Ste@https://www.acro-companion.com/chunk-5DLN5Q7L.js:61:12129 onNext@https://www.acro-companion.com/chunk-5DLN5Q7L.js:66:36719 0@https://www.acro-companion.com/chunk-5DLN5Q7L.js:70:35472 0@https://www.acro-companion.com/chunk-5DLN5Q7L.js:70:35888

This repeats with different StreamingTargetHandle values, but the same pattern.

Additional Notes • These errors began exactly after upgrading to v12.6.0. • They do not appear in v12.5.0 or earlier. • No application behavior changed around Firestore logic during the upgrade. • Errors occur in production under normal usage patterns with multiple active snapshot listeners.

Steps and code to reproduce issue

Since the issue is intermittent, no deterministic reproduction steps yet. Error appears during: • Firestore listeners • Possibly internal state updates

MedAmineAzaiez avatar Dec 07 '25 11:12 MedAmineAzaiez