grpc / grpc/grpc-web

'end' event not being sent for server-side streaming call

Open
#1,315 3 comments 0 reactions 0 assignees View on GitHub
pending-clarification
Dominant language
JavaScript
Stars
9.3k
Forks
802
Avg merge
1d 7h
Merged PRs (30d)
5

Description

When performing a client call to a server-side streaming service, I never receive the 'end' event. The server implementation is in kotlin. Im using protoc-gen-grpc-web 1.4.2

This is my client code.
```
const stream = getDataClient().generateBulkStatistics(request, metadata);
stream
.on('data', (response: ExampleResponse) => {
console.log('Received data');
})
.on('error', (error: RpcError) => {
console.log('Received error');
})
.on('end', () => {
console.log('Received end');
});
```

This is my protoc config

```
protoc \
--js_out=import_style=commonjs,binary:$OUTPUT_FOLDER \
--grpc-web_out=import_style=typescript,mode=grpcwebtext:$OUTPUT_FOLDER \
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the server-side streaming call through generateBulkStatistics using protoc-gen-grpc-web 1.4.2 and the shown protoc configuration. Trace the stream's data, error, and end event handling and compare behavior when the server completes; done means identifying why end is not delivered and confirming the corrected completion behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
grpc, javascript, kotlin
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.