grpc / grpc/grpc-node

Failed to parse server response when using jstype = JS_STRING

Open
#789 2 comments 1 reaction 0 assignees View on GitHub
package: grpc-tools
Dominant language
TypeScript
Stars
4.8k
Forks
716
Avg merge
2d 3h
Merged PRs (30d)
10

Description

### Problem description
When setting `jstype = JS_STRING` in the proto definition for a `unit64` field, making grpc calls where the server response uses that field results in an `INTERNAL` error of `failed to parse server response.` Removing the `jstype = JS_STRING` attribute and regenerating the static protobuf definitions makes the error go away.

### Reproduction steps
Set `jstype = JS_STRING` on a `unit64` field within a response message definition. Make a grpc call that includes this field in the response.

### Environment
- Occurs in multiple operating systems, mac, Ubuntu 18.04, and Windows 10.
- Node 10.15.1 (also observed on older versions)
- Multiple installation methods, on Windows using downloaded msi file.
- gRPC 1.18.0 or 1.19.0. grpc-tools 1.7.1 for the static protobuf file generation.

NOTE that this error was not observed with grpc 1.13.1 and grpc-tools 1.6.0. It seems to have been introduced in more recent versions.

EDIT: I've narrowed this down to the `grpc-tools` npm package. If I downgrade from 1.7.1 to 1.6.0 and regenerate the proto files, the error goes away. The `grpc` version does not seem to matter.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.