You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 19, 2026. It is now read-only.
Repository navigation
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
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:
awaitdb.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:
I force upgraded @google-cloud/firestore to 2.0.0 and ran it with [email protected] (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.
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!
@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?
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.
@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)
Activity
hkdevandla commentedon May 20, 2020
@alexander-fenster , can you please take a look? thanks!
alexander-fenster commentedon May 20, 2020
@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-jsused. A lot has happened between@grpc/grpc-jsv0.3.0 and v1.0.3.@murgatroid99 do you have any idea about the
stream.push() after EOFerror in the stack above?murgatroid99 commentedon May 20, 2020
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-jsversion 0.3.6. That code has since been rewritten, though, so it is possible that there has been a regression.murgatroid99 commentedon Jun 3, 2020
I have published
@grpc/grpc-jsversion 1.0.5 with a change that seems to fix this issue.alexander-fenster commentedon Jun 3, 2020
@amiller-gh Can you verify that the latest
@grpc/grpc-jshelps? (it's a direct dependency ofgoogle-gax, you can just reinstall the packages without using a lock file and make sure thatnpm ls @grpc/grpc-jsshows version 1.0.5)amiller-gh commentedon Jun 4, 2020
Can confirm that 1.0.5 fixes my issues! Thanks all 👍
alexander-fenster commentedon Jun 4, 2020
Thanks @amiller-gh for checking!
fix: prevent unhandled rejections by avoid .catch (#404)
test: increase asserted bundle size (#404)
test: increase asserted bundle size (#404)