Skip to content

Error: 13 INTERNAL: <message> reported for exceptions thrown by user-provided stream call handler #1661

@kskalski

Description

@kskalski

Problem description

My grpc-js client is receiving a streaming response, but seems to fail parsing it for this particular message/case, even though it works well on a wide variety of other messages.
The error is

Error: 13 INTERNAL: Response message parsing error: Cannot read property 'Topics' of undefined
    at Object.callErrorFromStatus (D:\rep\Kogut\src\ElectronUI\node_modules\@grpc\grpc-js\build\src\call.js:31:26)
    at Object.onReceiveStatus (D:\rep\Kogut\src\ElectronUI\node_modules\@grpc\grpc-js\build\src\client.js:327:49)
    at Object.onReceiveStatus (D:\rep\Kogut\src\ElectronUI\node_modules\@grpc\grpc-js\build\src\client-interceptors.js:294:181)
    at D:\rep\Kogut\src\ElectronUI\node_modules\@grpc\grpc-js\build\src\call-stream.js:130:78
    at processTicksAndRejections (internal/process/task_queues.js:75:11) {
  code: 13,
  details: "Response message parsing error: Cannot read property 'Topics' of undefined",
  metadata: Metadata { internalRepr: Map(0) {}, options: {} }
}

Reproduction steps

This is happening consistently for me on this message being sent to the client from server. I narrowed down that:

  • the message is correctly delivered from server to client - I logged this on server (app code):
 Writing collated size 1375 base64 ...

on the client (added some logging to call-stream.js):

2021-01-11T18:19:38.192Z | call_stream | [2] receive HTTP/2 data frame of length 1380
2021-01-11T18:19:38.193Z | call_stream | [2] parsed message of length 1380
2021-01-11T18:19:38.193Z | call_stream | [2] filterReceivedMessage of length 1380
2021-01-11T18:19:38.193Z | call_stream | [2] pushing to reader message of length 1375
2021-01-11T18:19:38.193Z | call_stream | [2] msg base64 ... (MATCHING BASE64 SAME AS IN SERVER)
2021-01-11T18:19:38.194Z | call_stream | [2] cancelWithStatus code: 13 details: "Response message parsing error: Cannot read property 'Topics' of undefined"
2021-01-11T18:19:38.194Z | call_stream | [2] ended with status: code=13 details="Response message parsing error: Cannot read property 'Topics' of undefined"
  • this is not a parser bug, I used the same grpc.GrpcObject, to get out the responseDeserialize method and feed it with the same base64 data buffer and it parses it correctly
  • thus it seems to be happening only in context of stream-call, which got me stuck in debugging at this point

Environment

  • OS name, version and architecture: Windows 10, x64
  • Node version: Electron 12.beta6
  • Node installation method: Electron
  • Package name and version: "@grpc/grpc-js": "1.2.3", "@grpc/proto-loader": "0.5.5",

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions