-
Notifications
You must be signed in to change notification settings - Fork 564
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
No grpc reponse from Javascript client request #9452
Comments
"Is your Javascript client assuming dynamic resolution of the proto file?"
port 8071 is the proxy. The query also works via port 8061 the helidon webserver port since |
@DaveO-Home Could provide more info about the JS client part? The library and the JS client code that gets a |
You can find the code at: |
Related to issue #9454 |
Thanks, - Question, why does the request work and the response fails. Doesn't the request require reflection? |
I added a health Check and it's response seems to work:
Executed
The reponse data was set in the |
I was also able to run the Health Check from a remote
Results: No proto file required.....Too bad I can't run this is a browser.
|
@DaveO-Home Finally found some time to look at this. I've set up an env to test this e2e with Envoy etc. The behavior I'm seeing is a bit different than yours: I see an HTTP2 problem when Envoy connects to the Helidon endpoint. I'm currently investigating, but Envoy is basically reporting an "HTTP violation. How did you configure your Envoy yaml file for the upstream Helidon endpoint? This requires setting up TLS |
@spericas From what I understand
The query gets to the helidon server but the response gets lost. ?? Here's my Helidon Server Code: Notice, the main application uses Helidon MP and gRPC uses Helidon SE. I couldn't get gRPC to work with MP.
|
@DaveO-Home I am seeing a problem in the Envoy log, but in my case, it is happening early in the request process so the gRPC endpoint is never called. Details below. Is there any chance you can turn on logging for Envoy to see what it reports in your environment? I'm running it outside of Docker, so if you are using Docker, you'd need to update the corresponding Dockerfile:
Here are the details of the error that I'm seeing:
Issue seems to be "Violation in HTTP messaging". |
The section where I call the server using the javascript client:
|
@spericas What version of envoy are you using? I'm using: |
If you already haven't reviewed, here's a link: |
envoy version: e3b4a6e9570da15ac1caffdded17a8bebdc7dfc9/1.32.1/Clean/RELEASE/BoringSSL |
@DaveO-Home There's a clear difference in behavior between these two versions. Looks like the one you're using is from 21. We should work with the latest 1.32.1 to fix any problems. |
I managed to get past the issue I reported, I'm now seeing the same behavior you describe. There's now a parsing/RPC error reported in the JS code. Using the latest envoy. |
If you already haven't reviewed, here's a link: |
@spericas If you debug the response in the browser(I use firefox) you will see that the response is |
|
The response back from Envoy to JS has data chunks: |
I noticed that you are using the Echo endpoint. Grpc Web only supports unary and server side streaming. |
There's a single unary Can Envoy pass along the payload without interpreting it? I'm assuming so unless it needs to do some sort of conversion. I can see that the message reply from the service is actually present in the payload, but the JS code fails to parse the message body in my case.
|
@spericas Notice that the reponse in java is like this(my handicap example)
The reponse is a pojo+ generated from |
It finds the protobuf marshaller for that class and calls it. If Helidon did something terrible wrong, it would not work with |
I just got my linux working - I have a |
@spericas Here's a simple
The package.json has more than you need
|
@spericas Here's interesting documentation: https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-WEB.md |
No, I compared the cases when using Node and Helidon as servers: it appears there's a |
Here's the debug for Quarkus that works:
For Helidon:
|
You seem to be missing |
Yes, I had the 200 status, just screwed up doing the copy. So, can the headers be set before sending the response? |
@DaveO-Home I figured it out, the problem is related to encoding (see the Wireshark screenshot above and This use case is properly supported by This was a really really difficult one to find ... it literally was down to one bit |
@spericas Glad to have you digging into the bits. Thanks for staying with this, I'll wait for the fix. |
The
Helidon gRPC
correctly accepts the Javascript gRPC request. However, there is no or just null response from the server.Environment Details
build.date 2023-08-03 16:19:35 UTC
build.version 3.0.6
build.revision 0c0d6790
project.version 1.0.0
project.helidon.version 4.1.2
project.flavor MP
latest.helidon.version 4.1.3
default.helidon.version 4.1.3
Java(TM) SE Runtime Environment Oracle GraalVM 21.0.2+13.1 (build 21.0.2+13-LTS-jvmci-23.1-b30)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.2+13.1 (build 21.0.2+13-LTS-jvmci-23.1-b30, mixed mode, sharing)
Sample Code:
The proto:
The data the
Helidon
server accepts:Data the Server responses with:
Note: There is an
Envoy
proxy between the client/server. Does CORS and HTTP: 2The text was updated successfully, but these errors were encountered: