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

grpc-web client 'end' or 'status' callbacks never called #467

Open
subhan-nadeem opened this Issue Feb 20, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@subhan-nadeem
Copy link

subhan-nadeem commented Feb 20, 2019

I have a Java GRPC server with SSL enabled. Every time I make a stream request with my backend, the 'end' and 'status' callbacks are never triggered. The 'data' callback works just fine.

Pinging the same API with a Node.js or Java GRPC client results in a callback to the 'end' callback.

Server is on Linux, client is Windows + Chrome.

Similarly for the helloworld example, if I set 'end' and 'status' callbacks, only the 'status' callback is triggered.

My Envoy configuration is as follows:

admin:
  access_log_path: /tmp/admin_access.log
  address:
    socket_address:
      protocol: TCP
      address: 127.0.0.1
      port_value: 9901
static_resources:
  listeners:
    - name: listener_0
      address:
        socket_address:
          protocol: TCP
          address: 0.0.0.0
          port_value: 12340
      filter_chains:
        - filters:
            - name: envoy.http_connection_manager
              config:
                stat_prefix: ingress_http
                stream_idle_timeout: 0s
                route_config:
                  name: local_route
                  virtual_hosts:
                    - name: local_service
                      domains: ["*"]
                      routes:
                        - match:
                            prefix: "/"
                          route:
                            host_rewrite: <host>
                            cluster: service
                            max_grpc_timeout: 60s
                      cors:
                        allow_origin:
                          - "*"
                        allow_methods: GET, PUT, DELETE, POST, OPTIONS
                        allow_headers: keep-alive,user-agent,cache-control,content-type,content-transfer-encoding,custom-header-1,x-accept-content-transfer-encoding,x-accept-response-streaming,x-user-agent,x-grpc-web,grpc-timeout
                        max_age: "1728000"
                        expose_headers: custom-header-1,grpc-status,grpc-message
                        enabled: true
                http_filters:
                  - name: envoy.grpc_web
                  - name: envoy.cors
                  - name: envoy.router
  clusters:
    - name: service
      connect_timeout: 0.25s
      type: LOGICAL_DNS
      # Comment out the following line to test on v6 networks
      dns_lookup_family: V4_ONLY
      lb_policy: ROUND_ROBIN
      hosts:
        - socket_address:
            address: <host>
            port_value: 443
      tls_context:
        sni: <host>
@stanley-cheung

This comment has been minimized.

Copy link
Collaborator

stanley-cheung commented Feb 20, 2019

Similar to #289 I believe

tinou98 added a commit to tinou98/grpc-web that referenced this issue Mar 14, 2019

Remove a return that skip emission of end callback
When the connection is closed and there isn't any message sent, the end callback was not called.

Should fix grpc#289 and grpc#467

tinou98 added a commit to tinou98/grpc-web that referenced this issue Mar 14, 2019

Remove a return that skip emission of end callback
When the connection is closed and there isn't any message sent, the end callback was not called.

Should fix grpc#289, grpc#384 and grpc#467

tinou98 added a commit to tinou98/grpc-web that referenced this issue Mar 19, 2019

Remove a return that skip emission of end callback
When the connection is closed and there isn't any message sent, the end callback was not called.

Should fix grpc#289, grpc#384 and grpc#467

stanley-cheung added a commit that referenced this issue Mar 20, 2019

Remove a return that skip emission of end callback
When the connection is closed and there isn't any message sent, the end callback was not called.

Should fix #289, #384 and #467
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.