firebase / firebase/firebase-js-sdk

@firebase/firestore: Firestore (9.23.0): FIRESTORE (9.23.0) INTERNAL ASSERTION FAILED: Unexpected state

Open
#7,712 10 comments 0 reactions 2 assignees Claimed by @hsubox76 View on GitHub
api: firestore needs-attention question stack:Angular
Dominant language
TypeScript
Stars
5.1k
Forks
1k
Avg merge
2d 21h
Merged PRs (30d)
37

Description

### Operating System

Mac OS X 13.6

### Browser Version

Headless

### Firebase SDK Version

9.23

### Firebase SDK Product:

Firestore

### Describe your project's tooling

I am using Angular wth NX workspace that is running JEST to execute test. I am using @angular/fire 7.6.1

### Describe the problem

I am unable to execute a test that is failing on
```
[2023-10-20T09:08:32.007Z] @firebase/firestore: Firestore (9.23.0): FIRESTORE (9.23.0) INTERNAL ASSERTION FAILED: Unexpected state

at Logger.defaultLogHandler [as _logHandler] (node_modules/@firebase/logger/src/logger.ts:115:57)
at Logger.Object..Logger.error (node_modules/@firebase/logger/src/logger.ts:210:5)
at logError (node_modules/@firebase/firestore/src/util/log.ts:59:15)
at fail (node_modules/@firebase/firestore/src/util/assert.ts:35:3)
at hardAssert (node_modules/@firebase/firestore/src/util/assert.ts:54:5)
at fromBytes (node_modules/@firebase/firestore/src/remote/serializer.ts:264:5)
at fromWatchChange (node_modules/@firebase/firestore/src/remote/serializer.ts:502:25)
at PersistentListenStream.onMessage (node_modules/@firebase/firestore/src/r

```
I saw many similar issues over here but unfortunatelly I have no idea how to fix it in this setup. One more thing that I need to say, when I run a test to create a document it works, but when I try to retrieve it this is where I get this error.

### Steps and code to reproduce issue

I have created the repo to test. Please follow quict instruction in the REDME. Thank you

https://github.com/fkolar/firebase-test

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.