Open francovp opened 4 years ago
Are you calling a function that returns a promise? If so, are you handling the promise rejection?
I'm not using this library directly, I think it is a dependency of the googleapis
or firebase-admin
libraries and it started appearing in my logs after updating those libraries. Maybe I should open an Issue in those repositories? Or you think it's a promise rejection that I not handling in my logic? I don't know why I'm not getting the right stacktrace in my logs. I'm using Sentry service to capture exceptions.
Yes, I'm suggesting that this is a promise rejection that you are not handling. The gRPC library itself does not use promises, and it does not throw these errors. The stacktrace seems to come from where the error was constructed, and those other libraries just propagate the error object.
We see this error on GCP. We use many google API libraries and I am convinced that this is coming from one or more of them. We do not use firebase.
We also see such an error in our scheduled cloud functions on GCP. Is there any update?
Seeing this too.
The error is being thrown from client.js. This code:
call.on('status', (status) => {
/* We assume that call emits status after it emits end, and that it
* accounts for any cancelWithStatus calls up until it emits status.
* Therefore, considering the above event handlers, status.code should be
* OK if and only if we have a non-null responseMessage */
if (status.code === constants_1.Status.OK) {
callback(null, responseMessage);
}
else {
const error = Object.assign(new Error(status.details), status);
callback(error);
}
});
That's the code that creates an error from the call's status. As you can see, that error is just passed to a callback. If that error is getting thrown it is by whatever code is handling the callback.
Problem description
Getting lots of errors like this:
Error at Http2CallStream.<anonymous> (/usr/src/app/node_modules/@grpc/grpc-js/build/src/client.js:96:45) at Http2CallStream.emit (events.js:205:15) at Http2CallStream.EventEmitter.emit (domain.js:471:20) at /usr/src/app/node_modules/@grpc/grpc-js/build/src/call-stream.js:71:22 at processTicksAndRejections (internal/process/task_queues.js:82:9) { code: 14, details: '', metadata: Metadata { options: undefined, internalRepr: Map {} } }
Exception:
What does this means?
Reproduction steps
This begins happens when I updated
firebase-admin
to8.4.0
andgoogleapis
to42.0.0
Environment
node@latest
Docker container.