question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
jonahbroncommented, Apr 3, 2019

@subhan-nadeem I was experiencing this too, but it’s fixed by the release of 1.0.4. You might try updating and re-testing.

0reactions
stanley-cheungcommented, Jun 3, 2020

@zillerium I believe there’s an “Unwatch” button at the top you can click.

Read more comments on GitHub >

github_iconTop Results From Across the Web

grpc/grpc - Gitter
We are seeing server calls not being closed after calling StreamObserver.onCompleted() , the stream just hangs there until client times out and cancels...
Read more >
reactive-grpc - npm
A package that wraps the callback and event based @grpc/grpc-js and grpc-web with Promises and RxJS Observables. Both clients as well as ...
Read more >
grpc-web: Versions | Openbase
Full version history for grpc-web including change logs. ... add Grpc-Message,Grpc-Status @zsluedem · #657 Ensure that the end callback is called @vbfox ...
Read more >
Integrating Apache APISIX with gRPC-Web | Medium
With gRPC Web, users can call back-end gRPC applications directly using ... Client-side streaming and bi-directional streaming calls are not ...
Read more >
How GraphQL Saved Us from the gRPC Dumpster Fire We ...
Matt is not concerned with the gRPC web clients ... Like any RPC framework, it allows you to call a set of predefined...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found