deeplay-io / nice-grpc

A TypeScript gRPC library that is nice to you
MIT License
409 stars 32 forks source link

Problem with grpc-status, grpc-message #505

Open Linker-123 opened 8 months ago

Linker-123 commented 8 months ago

My server uses tonic, I have a gRPC call where the server streams some bytes to the client (that is using nice-grpc-web). However I'm getting the following error in my browser console:

ClientError: /images.Images/GetNationalId UNKNOWN: Response stream closed without gRPC status. This may indicate a misconfigured CORS policy on the server: Access-Control-Expose-Headers must include "grpc-status" and "grpc-message".

However the header names are specified in the required properties: image

I've noticed that the error only appears after reading of the stream is completes. I'm not sure what is the solution to this.

aikoven commented 8 months ago

Thanks for the report @Linker-123.

Do you use any proxy for grpc-web? Or does tonic support grpc-web protocol natively?