[bug]Early reconnect during the initial room connection
Maintainer thường phản hồi trong vòng 1 ngày
@hiroshihorie đang làm issue này rồi.
Từ ngày 4/9/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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.
- Ngôn ngữ chính
- Dart
- Star
- 421
- Fork
- 260
- Merge trung bình
- 3 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 12
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của livekit/client-sdk-flutter
-
`jwtPayload.roomConfiguration` returns null fields for tokens from LiveKit server SDKsCó thể đã có người làm @RaphaelFakhri đã nhận 8 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
livekit/client-sdk-flutter#1243 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[bug] Stale and overlapping ParticipantInfo updates remove newer remote track publications (2.9.0)Có thể đã có người làm @hiroshihorie đã nhận 3 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
livekit/client-sdk-flutter#1248 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 57/100
livekit/client-sdk-flutter#1245 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
livekit/client-sdk-flutter#1227 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Inbound data packets never delivered while media flows normally (2.13.0, LiveKit Cloud 1.13.7)Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
livekit/client-sdk-flutter#1221 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của livekit/client-sdk-flutter
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
fossasia/badgemagic-app#2016 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug P3 ux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
QueryaHub/Querya-Desktop#1837 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
direct-code
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
aaronified/fluenough#849 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
PATILYASHH/XPENC#179 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày