Skip to content

grpc-web + envoy does not work #118

@ritchieanesco

Description

@ritchieanesco

Proposal

I've setup a client-side app with react which uses connectrpc's transport for grpc-web protocol and sends requests to envoy over HTTP/1.1 and gets proxied to wiremock server.

The wiremock stubs contains "grpc-status-name" : "OK" response header however it seems no headers get added when looking at envoy proxy logs. See excerpt from log:

2024-10-16 08:49:44 [2024-10-15 21:49:44.222][28][debug][http] [source/common/http/conn_manager_impl.cc:1516] [C0][S4239721515345536154] encoding headers via codec (end_stream=false):
2024-10-16 08:49:44 ':status', '200'
2024-10-16 08:49:44 'content-type', 'application/grpc-web+proto'
2024-10-16 08:49:44 'grpc-encoding', 'identity'
2024-10-16 08:49:44 'grpc-accept-encoding', 'gzip'
2024-10-16 08:49:44 'content-encoding', 'gzip'
2024-10-16 08:49:44 'x-envoy-upstream-service-time', '2139'
2024-10-16 08:49:44 'date', 'Tue, 15 Oct 2024 21:49:44 GMT'
2024-10-16 08:49:44 'server', 'envoy'

In addition to this, the response payload does not include the required grpc trailers as evidenced by this log:

2024-10-16 07:14:55 [2024-10-15 20:14:55.595][41][debug][http] [source/common/http/conn_manager_impl.cc:1533] [C0][S5164429598623932382] encoding trailers via codec:

2024-10-16 07:14:55 [2024-10-15 20:14:55.596][41][debug][http2] [source/common/http/http2/codec_impl.cc:1417] [C1] stream 1 closed: 0

The missing data from this response results in the react application throwing a missing trailers error.

wiremock-main.zip

Reproduction steps

Follow README to install and run the attached source code.

See Test mock server integration section to reproduce issue.

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions