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

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

Closed

Description

@amiller-gh

Environment details

  • OS: Mac OS Catalina
  • Node.js version: 12.13.0
  • npm version: 6.12.0
  • google-gax version: >=1.0.0
  • Electron version: 8.2.5

Steps to reproduce

With the above environment, and using @google-cloud/firestore>=2.0.0 (via firebase-admin>=8.0.0) calls to Firebase that fetch multiple updated documents from a collection:

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

fail 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 tracked the issue down to one of the commits introduced to @google-cloud/firestore between 1.3.0 and 2.0.0:

Three things of consequence happened between 1.3.0 and 2.0.0:

  • Two long-lived listener fixes
  • A 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/[email protected] depends on, WORKS!

There were a number of substantial commits between [email protected] 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-cloud/firestore. 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!

Activity

  1. added
    priority: p2Moderately-important priority. Fix may not be included in next release.
    and removed
    triage meI really want to be triaged.
    on May 20, 2020
  2. hkdevandla commented on May 20, 2020

    @hkdevandla

    @alexander-fenster , can you please take a look? thanks!

  3. alexander-fenster commented on May 20, 2020

    @alexander-fenster
    Contributor

    @amiller-gh The main difference between gax 0.26.0 (man that's an old one) and the current one is the version of @grpc/grpc-js used. A lot has happened between @grpc/grpc-js v0.3.0 and v1.0.3.

    @murgatroid99 do you have any idea about the stream.push() after EOF error in the stack above?

  4. murgatroid99 commented on May 20, 2020

    @murgatroid99
    Contributor

    This looks a lot like grpc/grpc-node#752, but I thought I fixed that with grpc/grpc-node#766, which was published in @grpc/grpc-js version 0.3.6. That code has since been rewritten, though, so it is possible that there has been a regression.

  5. murgatroid99 commented on Jun 3, 2020

    @murgatroid99
    Contributor

    I have published @grpc/grpc-js version 1.0.5 with a change that seems to fix this issue.

  6. alexander-fenster commented on Jun 3, 2020

    @alexander-fenster
    Contributor

    @amiller-gh Can you verify that the latest @grpc/grpc-js helps? (it's a direct dependency of google-gax, you can just reinstall the packages without using a lock file and make sure that npm ls @grpc/grpc-js shows version 1.0.5)

  7. amiller-gh commented on Jun 4, 2020

    @amiller-gh
    Author

    Can confirm that 1.0.5 fixes my issues! Thanks all 👍

  8. alexander-fenster commented on Jun 4, 2020

    @alexander-fenster
    Contributor

    Thanks @amiller-gh for checking!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions