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
After we upgrade @grpc/grpc-js from 1.7.3 to 1.8.7, we start to see server crash frequently with this error:
TypeError: Cannot read properties of undefined (reading 'state')
at RetryingCall.sendMessageWithContext (/workspace/node_modules/@grpc/grpc-js/build/src/retrying-call.js:542:22)
at /workspace/node_modules/@grpc/grpc-js/build/src/resolving-call.js:106:19
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Problem description
After we upgrade
@grpc/grpc-js
from 1.7.3 to 1.8.7, we start to see server crash frequently with this error:This map to this line 597
call.state === 'ACTIVE'
grpc-node/packages/grpc-js/src/retrying-call.ts
Lines 593 to 598 in d209a34
Reproduction steps
Sorry I can't give a precise step to reproduce for now, however maybe it's possible to find the issue by code review?
I suspect it's because
this.commitedCallIndex
is-1
becausethis.underlyingCalls
is an empty array.grpc-node/packages/grpc-js/src/retrying-call.ts
Lines 267 to 275 in d209a34
Or committedCallIndex is null because
this.state
isCOMMITED
orCOMPLETED
but we force nullish! here.grpc-node/packages/grpc-js/src/retrying-call.ts
Line 595 in d209a34
Or one of element of underlyingCalls maybe undefined so we should use optional chaining like this one here: (I think this one is unlikely)
grpc-node/packages/grpc-js/src/retrying-call.ts
Line 624 in d209a34
The only dependency we use
@grpc/grpc-js
is opentelemetry@opentelemetry/exporter-trace-otlp-grpc
0.34.0.Environment
Additional context
The text was updated successfully, but these errors were encountered: