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

Python backend #93

Closed
jonasblixt opened this issue Oct 13, 2017 · 1 comment
Closed

Python backend #93

jonasblixt opened this issue Oct 13, 2017 · 1 comment

Comments

@jonasblixt
Copy link

I'm trying to use grpc-web with a python backend. I keep getting the following output from the grpc-web-client:

status 13 Response closed without headers

Perhaps someone can point me in the right direction

Debug output from the grpc-server:
localhost:4200..User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36..Access-Control-Request-Headers: content-type,x-grpc-web..Accept: */*..Referer: http://localhost:4200/login..Accept-Encoding: gzip, deflate, br..Accept-Language: en-US,en;q=0.8,en-GB;q=0.6,sv;q=0.4....' D1013 11:20:41.749662000 123145419489280 chttp2_transport.c:2546] set connectivity_state=4 D1013 11:20:41.749700000 123145419489280 connectivity_state.c:171] SET: 0x7fa8f5072850 server_transport: READY --> SHUTDOWN [close_transport] error=0x7fa8f4e89030 {"created":"@1507886441.749660000","description":"Failed parsing HTTP/2","file":"src/core/ext/transport/chttp2/transport/chttp2_transport.c","file_line":2342,"grpc_status":14,"referenced_errors":[{"created":"@1507886441.749656000","description":"Connect string mismatch: expected 'P' (80) got 'O' (79) at byte 0","file":"src/core/ext/transport/chttp2/transport/parsing.c","file_line":104}]}

//Jonas

@MarcusLongmuir
Copy link
Contributor

MarcusLongmuir commented Oct 13, 2017

Hey @jonpe960

grpc-web-client requires that the gRPC server supports the compatibility wrapper that this repo contains. There is a golang wrapper that you can use if you're writing your gRPC server in golang, otherwise you can use the grpcwebproxy in front of a gRPC server written in another language.

The reason you're seeing this error is because the server is ending the body that contains the messages and then attempts to send the trailers (that include the status of the response) as a headers frame after the body. Currently browsers don't support receiving this additional headers frame so the client can't determine the status of the response. This the issue that the server wrappers work around.

Please reopen the issue if I've misunderstood your issue.

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

No branches or pull requests

2 participants