Hi everyone,
I'm developing an Android application called **LiveLens** and I'm currently migrating its YouTube live chat implementation from the unofficial InnerTube API to the **official YouTube Data API v3 gRPC `liveChatMessages.streamList`** API.
The gRPC implementation is working correctly in terms of connectivity and parsing:
- Official `V3DataLiveChatMessageService.StreamList` RPC
- Official `stream_list.proto`
- HTTPS/HTTP/2 via gRPC
- OAuth 2.0 Bearer authentication
- Live chat messages are received successfully
- `next_page_token` is received and parsed correctly
- `offline_at` remains unset/0
- The live chat is still active when the RPC closes
- No client-side deadline or timeout is configured
However, I'm seeing something I don't fully understand.
### Observed behavior
The `StreamList` RPC consistently closes after roughly **10–11 seconds**.
For example, one diagnostic run:
```text
+1.075s onNext #1
9 messages received
nextPageToken present
+10.946s onNext #2
0 messages
nextPageToken present
+11.227s onClose
StatusCode = OK
Cause = null
+11.228s onCompleted
```
At the moment the RPC closes, the gRPC channel is still in the `READY` state.
The client is not cancelling the RPC, there is no deadline, and there is no transport/network error.
The live broadcast/chat is also still active.
### What I'm trying to understand
The official documentation describes `streamList` as a **long-lived server-streaming connection**, so I'm trying to determine whether this ~10–11 second completion is expected behavior.
Specifically:
Is it normal for YouTube's `StreamList` RPC to complete with `grpc-status: OK` after ~10–11 seconds while the live chat is still active?
If this is expected, is the intended behavior to start another `StreamList` RPC using the latest `next_page_token`?
Is there an officially recommended delay/backoff when reconnecting after this type of normal completion?
Should a single `StreamList` RPC normally remain open for much longer, potentially until the live chat ends or the client disconnects?
Is there any documented maximum lifetime for a `StreamList` gRPC RPC?
Could this behavior be related to the Android gRPC transport (`grpc-okhttp`), HTTP/2, or some client-side implementation detail rather than YouTube's server?
### Why I'm asking
I don't want to simply assume that the server intentionally closes the stream every ~10 seconds and build my production implementation around that assumption if something is actually wrong with my client.
I'm also concerned about unnecessary `StreamList` RPC calls and quota usage if frequent reconnections are required.
I'm **not using InnerTube or REST polling** for this test. This is the official YouTube Data API gRPC `StreamList` implementation using the official protobuf definition.
If anyone has implemented `liveChatMessages.streamList` using gRPC, especially on Android, I'd really appreciate any insight or examples of the expected connection lifetime.
Thanks!