[bug]Early reconnect during the initial room connection
メンテナーはふだん 1 日以内に返信
@hiroshihorie がすでに取り組んでいます。
2026年9月4日 から。
評価
この issue はまだ評価されていません。
説明
Describe the bug
During the initial room connection, the initial RTC WebSocket closes while Room.connect is still waiting for the PeerConnection to become connected. The SDK starts an automatic reconnect and opens a second RTC WebSocket approximately 170 ms later, while the original connection attempt is still pending. The original attempt eventually fails after approximately 10 seconds with MediaConnectException.
The two observed RTC WebSocket URLs were:
Initial connection:
wss://<host>/rtc?auto_subscribe=1&adaptive_stream=1&protocol=16&client_protocol=1&sdk=flutter&version=2.11.0&network=wifi&os=android&os_version=16&device_model=PJZ110
Reconnect attempt:
wss://<host>/rtc?auto_subscribe=1&adaptive_stream=1&reconnect=1&reconnect_reason=1&sid=PA_3HVH5rf53iDv&protocol=16&client_protocol=1&sdk=flutter&version=2.11.0&network=wifi&os=android&os_version=16&device_model=PJZ110
To Reproduce
- Use an Android 16 real device on Wi-Fi.
- Use
livekit_client2.11.0 and connect to a room. - Capture WebSocket traffic with Reqable.
- The issue was observed only during a specific period. During that period, approximately 1 in 5 connection attempts reproduced it. It was not reproduced before or after that period, including during other Reqable captures. The issue is not currently reproducible on demand.
- In a failing attempt, observe the initial RTC WebSocket without reconnect parameters, followed by a second RTC WebSocket containing
reconnect=1,reconnect_reason=1, andsidbefore the initial connection finishes. - The initial connection then fails with
MediaConnectExceptionafter approximately 10 seconds.
A minimal research test can force the same ordering by controlling the completion order of the WebSocket and PeerConnection operations. The main reproduction is covered by automatic reconnect starts while the initial Engine.connect still waits for PeerConnection; the trigger and key assertions are at lines 199-207.
Expected behavior
The initial room connection should finish successfully or fail before an automatic reconnect creates another RTC WebSocket. The initial connection and the automatic reconnect should not overlap within the same connection flow.
Platform information
- Flutter version: Flutter 3.38.10 (Dart 3.10.9)
- Plugin version:
livekit_client2.11.0 - Flutter target OS: Android, real device (PJZ110)
- Flutter target OS version: Android 16
- Flutter console log: The connection state reports
disconnectedwith reasonsignal; the original attempt later reportsMediaConnectException: Timed out waiting for PeerConnection to connect, please check your network for ice connectivity.
- 主要言語
- Dart
- スター
- 421
- フォーク
- 260
- 平均マージ
- 3日 9時間
- マージ済み PR(30日)
- 11
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
livekit/client-sdk-flutter のほかの issue
-
`jwtPayload.roomConfiguration` returns null fields for tokens from LiveKit server SDKs対応中かも @RaphaelFakhri が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
livekit/client-sdk-flutter#1243 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 57/100
livekit/client-sdk-flutter#1245 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
livekit/client-sdk-flutter#1227 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
livekit/client-sdk-flutter#1221 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
livekit/client-sdk-flutter#1219 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
livekit/client-sdk-flutter の issue をすべて見る
似ている issue
-
Needs Attention platform: android type: infrastructure umbrella
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
firebase/flutterfire#18832 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
-
from.page-issue
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
sass/dart-sass#2888 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[a11y_assessments] Disabled CheckboxListTile shares mutable state対応中かも @kevmoo が 12 日前に担当しました。 オープンa: accessibility fyi-design p: material_ui package team-accessibility
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信