Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

Error [ERR_STREAM_PUSH_AFTER_EOF]: stream.push() after EOF #1083

@amiller-gh

Description

@amiller-gh

Environment details

  • OS: Mac OS Catalina
  • Node.js version: 12.13.0
  • npm version: 6.12.0
  • @google-cloud/firestore version: >2.0.0
  • Electron version: 8.2.5

Steps to reproduce

With the above environment, calls to Firebase that fetch multiple updated documents from a collection:

await db.collection('audiences').get()

fails with:

[23:51:38.659] [error] Error [ERR_STREAM_PUSH_AFTER_EOF]: stream.push() after EOF
    at readableAddChunk (_stream_readable.js:277:32)
    at ClientReadableStreamImpl.Readable.push (_stream_readable.js:223:10)
    at Object.onReceiveMessage (/project/path/node_modules/@grpc/grpc-js/build/src/client.js:317:28)
    at Object.onReceiveMessage (/project/path/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:287:182)
    at /project/path/node_modules/@grpc/grpc-js/build/src/call-stream.js:164:74
    at processTicksAndRejections (internal/process/task_queues.js:75:11)

It is important to note that this error is only triggered when there is more than one document returned by the query. If only a single document is returned it executes without issue.

I have tracked the issue down to one of the commits introduced between 1.3.0 and 2.0.0:

  • I installed firebase-admin@7.4.0, which brings along @google-cloud/firestore@1.3.0 and my collection query ran without issue.
  • I force upgraded @google-cloud/firestore to 2.0.0 and ran it with firebase-admin@7.4.0 (public API is the same, runs without issue) and my collection query threw the above error.
  • For completeness, I also ran with the following combinations – all versions of @google-cloud/firestore above 2.0.0 failed.
    • firebase-admin@8.0.0 + @google-cloud/firestore@2.0.0
    • firebase-admin@8.0.0 + @google-cloud/firestore@2.6.1
    • firebase-admin@8.12.1 + @google-cloud/firestore@3.0.0
    • firebase-admin@8.12.1 + @google-cloud/firestore@3.8.0 (latest)

Three things of consequence happened between 1.3.0 and 2.0.0:

  • Two long-lived listener fixes
  • Version bump for google-gax

On that hunch, I both force upgraded and downgraded google-gax.

  • Upgrading to 2.3.1 still failed.
  • Downgrading to 0.26.0, which @google-cloud/firestore@1.3.0 depends on, WORKS!

There were a number of substantial commits between google-gax@0.26.0 and the 1.0.0 release. I'm not sure which could have cause this.

I'm opening this issue along with a companion issue in google-gax since this is preventing me from bumping @google-cloud/firestore (and firebase-admin) to latest.

Please let me know if I can provide any more context!

Metadata

Metadata

Labels

🚨This issue needs some love.api: firestoreIssues related to the googleapis/nodejs-firestore API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions