Grpc-web: Response deserialize error

Created on 17 Nov 2020  路  4Comments  路  Source: grpc/grpc-web

Hi,
We are trying to use streams with a net core backend but getting deserialize error
```"grpc":{2 items
"method":string"###"
"error":{2 items
"code":int2
"message":string"Error in response deserializer function."
}
}
````
protoc is version 3.14.0
grpc-web-gen is 1.2.1

command to generate the client is:
protoc -I=./protos ./protos/*.proto --js_out=import_style=commonjs,binary:./dist --grpc-web_out=import_style=commonjs+dts,mode=grpcwebtext:./dist

We successfully connect to the endpoint and retrieve the data and the call fails on tying to use response.getMessage()
Since there is no other error message and debugging is not very straightforward any insight on what could cause this error would be welcome :)

thank you

Most helpful comment

@JuliusKoronci Did you find out why the error was occurring?

I am having the same error via grpc-web, but calling the same method with the same parameters via grpcurl, it works.

image

All 4 comments

@JuliusKoronci Did you find out why the error was occurring?

I am having the same error via grpc-web, but calling the same method with the same parameters via grpcurl, it works.

image

@povesteam the issue is a mismatch between the contracts and the returned data..but since it fails even before the data can be inspected it is impossible to debug. Since the tooling is not mature enough we dropped grpc-web as we run into this issue again and we cant afford to spend days on debugging :)

@JuliusKoronci I got the same issue. Downgrade the Protoc compiler to the release version before the latest of the grpc-web can solves your problem.

Stopping the development server and calling npm start again (recompile js) solved the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NiNJAD3vel0per picture NiNJAD3vel0per  路  3Comments

jmzwcn picture jmzwcn  路  6Comments

graup picture graup  路  4Comments

clovis818 picture clovis818  路  4Comments

verihelp-vaibhav picture verihelp-vaibhav  路  5Comments