Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grpc-web not return exactly grpc status always response 2 Incomplete response #1417

Open
KP-story opened this issue Mar 29, 2024 · 4 comments

Comments

@KP-story
Copy link

I gen code using a command protoc -I=./src/proto
--js_out=import_style=commonjs,binary:./src/generated
--grpc-web_out=import_style=typescript,mode=grpcweb:./src/generated
$(find ./src/proto -iname "*.proto")
When I sent request that was not valid, Grpc web always response 2 incomplete response , even though my response headers contained the 'grpc-status' and 'grpc-message' fields."
Screenshot 2024-03-29 at 23 37 12

@sampajano
Copy link
Collaborator

sampajano commented Mar 29, 2024

@KP-story Thanks for the report!

Do you mind following this following Typescript example, and check how things are looking different between that and what you have?
https://github.com/grpc/grpc-web/blob/master/net/grpc/gateway/examples/echo/ts-example/README.md

Without knowing your whole setup, it's hard to know what's wrong. So it would be easier if you compare the wire data against the demo we have.

@KP-story
Copy link
Author

@KP-story Thanks for the report!

Do you mind following this following Typescript example, and check how things are looking different between that and what you have? https://github.com/grpc/grpc-web/blob/master/net/grpc/gateway/examples/echo/ts-example/README.md

Without knowing your whole setup, it's hard to know what's wrong. So it would be easier if you compare the wire data against the demo we have.

HI, My backend was written by rust tonic web. I always response null with grpc-status and grpc-message in metadata. Is it valid ?

@dnprogramming
Copy link

@KP-story As I see you are using CloudFlare might I recommend checking if you have access to the CloudFlare Dashboard for that website, go to the Network tab, and scroll to the bottom and make sure gRPC is enabled so it knows to proxy the gRPC API connection. https://developers.cloudflare.com/network/grpc-connections/

@KP-story
Copy link
Author

KP-story commented Apr 1, 2024

@KP-story As I see you are using CloudFlare might I recommend checking if you have access to the CloudFlare Dashboard for that website, go to the Network tab, and scroll to the bottom and make sure gRPC is enabled so it knows to proxy the gRPC API connection. https://developers.cloudflare.com/network/grpc-connections/

Hi, I have just updated the configuration in Cloudflare, but it's still showing an error.
I wonder whether the response Content-Length being equal to zero is the cause of the error.

Screenshot 2024-04-01 at 07 55 03 Screenshot 2024-04-01 at 07 55 14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants