grpc / grpc-web

gRPC for Web Clients
https://grpc.io
Apache License 2.0
8.46k stars 762 forks source link

GRPC example Hello World getting error calling envoy #1270

Closed Skebard closed 2 weeks ago

Skebard commented 1 year ago

I have cloned the repo and I wanted to try the example. It seems that due to the version of npm I can not execut npx webpack and therefore I have decided to use BloomRPC as client.

When calling the service directly at localhost:9090 it works:

image

But when trying to call through the envoy proxy at http://localhost:8080 I get the following error:

{ "error": "full url: http://localhost:8080/helloworld.Greeter/SayHello, code: 14, err: Http response at 400 or 500 level" }

image

Any idea of what is happening?

sampajano commented 1 year ago

hi.

i'm not familiar with BloomRPC but i suspect it's not using grpc-web protocol?

grpc-web speaks a different protocol (based on http/1.1 over Envoy) than grpc (based on http/2), and hence maybe the difference what you're seeing?

maja42 commented 9 months ago

Bloom has a toggle-button in the upper right corner to switch between grpc and grpc-web. You need to select grpc-web when talking via envoy.

sampajano commented 2 weeks ago

Hi :) I'm closing this because it's likely unrelated to the grpc-web library in specific.

Feel free to re-open or start another https://github.com/grpc/grpc-web/discussions if needed. Thanks! :)