Client using grpc-web not listening to notifications at first

74 views
Skip to first unread message

Lukas Müller de Oliveira

unread,
Jan 26, 2022, 8:26:36 PM1/26/22
to grpc.io
Hi everybody,

I'm working on a project composed of a backend (go-gRPC) and a frontend (Typescript-Vue).
Currently I'm listening on the frontend a gPRC Stream of notifications:
```
this.streamData = this.notificationService.subscribe(this.userId);
this.streamData.on('data', (response: any) => {
// here I check the events that arriving
}
```
After a subscription the server sends an AckEvent containing some information, so the Client can be identified.

The problem is, after the subscription the client doesn't receive any event, like it is waiting for something to do so(checked on gRPC ui and it is working fine, but in the frontend the notification never arrives). It only receives any event if I trigger on the frontend some feature that sends a notification to the client.
When I do that the notifications arrive accumulated as if they were stuck in the middle
of the way.

Anyone had this problem before? I tried everything but it doesn't work.
Thank you very much in advance!

Lukas

Eryu Xia

unread,
Feb 11, 2022, 5:30:06 PM2/11/22
to grpc.io
Thanks for the question, Lukas!

Is it possible that you reproduce your failure in a github project using docker so it can be inspected more closely?

Also consider posting your question on grpc-web issues so others might be able to help too :)

Thanks!
Reply all
Reply to author
Forward
0 new messages