Closed JuliusKoronci closed 3 years ago
@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.
@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.
@JuliusKoronci @CoachRDeveloper I am having the same issue with one specific method, all others work fine. Recompiling doesn't help. How did you get rid of the error?
protoc is version 3.14.0 grpc-web-gen is 1.2.1
@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.
This fixed the issue for me. Downgraded to 3.13.0, which was released before protoc-gen-grpc 1.2.1
I got the same error with gRPC Web because I copied the example without realizing getMessage()
was not part of the framework API, but a message
string field in the example Protobuf definition.
Try using response directly (or serializing it with toObject()
)
var stream = echoService.serverStreamingEcho(streamRequest, metadata);
stream.on('data', function(response) {
console.log(response.toObject());
});
I got the same error with gRPC Web because I copied the example without realizing
getMessage()
was not part of the framework API, but amessage
string field in the example Protobuf definition.Try using response directly (or serializing it with
toObject()
)var stream = echoService.serverStreamingEcho(streamRequest, metadata); stream.on('data', function(response) { console.log(response.toObject()); });
This worked for me!
Hi, We are trying to use streams with a net core backend but getting deserialize error
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