-
Notifications
You must be signed in to change notification settings - Fork 21
Description
Environment details
- OS: Mac OS Catalina
- Node.js version: 12.13.0
- npm version: 6.12.0
google-gaxversion: >=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:
- I installed
firebase-admin@7.4.0, which brings along@google-cloud/firestore@1.3.0and my collection query ran without issue. - I force upgraded
@google-cloud/firestoreto2.0.0and ran it withfirebase-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/firestoreabove 2.0.0 failed.firebase-admin@8.0.0+@google-cloud/firestore@2.0.0firebase-admin@8.0.0+@google-cloud/firestore@2.6.1firebase-admin@8.12.1+@google-cloud/firestore@3.0.0firebase-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
- A version bump for
google-gax
On that hunch, I both force upgraded and downgraded google-gax.
- Upgrading to
2.3.1still failed. - Downgrading to
0.26.0, which@google-cloud/firestore@1.3.0depends 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-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!