grpc / grpc-web

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

Envoy filter not working anymore with envoy >=v1.22 #1220

Closed Gerrit91 closed 2 years ago

Gerrit91 commented 2 years ago

With the existing configuration sample from this project and envoy version v1.22, I get the following error message when starting up the proxy:

Didn't find a registered implementation for 'envoy.filters.http.grpc_web' with type URL: ''

With v1.21 everything works just fine. Is there any way to resolve this problem?

shivavishaal66215 commented 2 years ago

I'm stuck with the same error too. This might seem silly but someone on StackOverflow fixed this error by changing their envoy file from envoy.yml to envoy.yaml. @Gerrit91

sampajano commented 2 years ago

@shivavishaal66215 that's funny indeed haha.. does changing yml -> yaml fix the issue for you as well? 😃

shivavishaal66215 commented 2 years ago

@sampajano Unfortunately it didn't work for me.

tomk9 commented 2 years ago

Based on https://github.com/envoyproxy/envoy/blob/2586aa6271811ba5653e7da82dfb62c85e740152/examples/front-proxy/service-envoy.yaml#L26:L28 @Gerrit91 @shivavishaal66215 try to add types:

sampajano commented 2 years ago

@tomk9 Thanks so much for the super timely PR and fix! Much appreciated!! 😃

Gerrit91 commented 2 years ago

Perfect! Thanks everyone for helping out with this one. :)

shivavishaal66215 commented 2 years ago

Thanks a lot folks. Amazing response time. 😄

shashankram commented 2 years ago

Based on https://github.com/envoyproxy/envoy/blob/2586aa6271811ba5653e7da82dfb62c85e740152/examples/front-proxy/service-envoy.yaml#L26:L28 @Gerrit91 @shivavishaal66215 try to add types:

v1.21 v1.22

http_filters:
  - name: envoy.filters.http.grpc_web
  - name: envoy.filters.http.cors
  - name: envoy.filters.http.router
http_filters:
  - name: envoy.filters.http.grpc_web
    typed_config:
      "@type": type.googleapis.com/envoy.extensions.filters.http.grpc_web.v3.GrpcWeb
  - name: envoy.filters.http.cors
    typed_config:
      "@type": type.googleapis.com/envoy.extensions.filters.http.cors.v3.Cors
  - name: envoy.filters.http.router
    typed_config:
      "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router

@tomk9 is there a page that lists the filter type and correspoding typeUrl? For e.g, I would like to know what typeUrl to use for the envoy.filters.http.rbac filter.

v1.21 v1.22
```yaml http_filters: - name: envoy.filters.http.grpc_web - name: envoy.filters.http.cors - name: envoy.filters.http.router ``` ```yaml http_filters: - name: envoy.filters.http.grpc_web typed_config: "@type": type.googleapis.com/envoy.extensions.filters.http.grpc_web.v3.GrpcWeb - name: envoy.filters.http.cors typed_config: "@type": type.googleapis.com/envoy.extensions.filters.http.cors.v3.Cors - name: envoy.filters.http.router typed_config: "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router ```