[bug] Track published via SDP renegotiation never forwarded to subscribers — server OnTrack doesn't fire, publish times out at 30s (self-hosted)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- flutter
- Lĩnh vực
- audio-video-rtc, mobile-dev
Hướng nghiên cứu
Start by tracing the SDK's BroadcastManager listener and the screen-share publish flow around setScreenShareEnabled, then compare the client logs and SDP offer/answer with the server's 30-second supervisor timeout. Use the supplied forensic logs and SDP to determine why the server does not forward the track to subscribers; done means identifying a reproducible cause or a confirmed workaround.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Versions
- livekit_client (Dart): 2.7.0
- flutter_webrtc: 1.4.0 (libwebrtc m144)
- livekit-server (self-hosted): 1.11.0 (also reproduced on 1.10.0)
- Flutter: 3.41.4
- iOS: 18.2 and 26.0 (both repro)
- Devices: iPhone 13, iPhone 15 Pro, iPad mini 6
- Topology: multi-PC (default, not single-PC mode)
What happens
-
Host connects to Room, publishes camera + mic (initial offer). Works.
-
Host taps "Share screen" → our native bridge presents
RPSystemBroadcastPickerView→ user taps Start Broadcast. -
iOS Broadcast Upload Extension starts pushing
CMSampleBuffers via the Unix socket in the App Group container. -
SDK's
BroadcastManagerfiresisBroadcasting=true. Our Dart code does NOT callsetScreenShareEnabled(true)— we rely on SDK auto-publish (after removing our manual call, a race condition was resolved in a prior diagnostic loop).Room is configured with:
RoomOptions(
defaultScreenShareCaptureOptions: ScreenShareCaptureOptions(
useiOSBroadcastExtension: true,
),
)
- Client logs
LocalTrackPublishedEventfor screenShareVideo — SDK side believes publish succeeded. - Server side: receives SDP renegotiation (offer/answer pair completes cleanly, NO unhandled RTP, NO ICE errors, mid=3 video VP8 with simulcast layers q;h).
- Exactly 30s later: server fires publish time out from the supervisor (SetMaxSubscribedQuality + supervisor state machine). Track removed server-side. Viewer NEVER receives TrackSubscribed for screenShareVideo.
Confirmed NOT the cause
- Network: UDP 50000-60000 open server-side; camera/mic over the same path work flawlessly.
- ICE: candidates exchanged, transport stays connected.
- SDP renegotiation: completes successfully on both sides.
- Codec: VP8 (also tried H.264 via Room options) — same outcome.
- Simulcast: reproduces with 1 layer too (manually reduced via defaultVideoPublishOptions).
- Race condition with our bridge: a prior loop removed our manual setScreenShareEnabled call; SDK auto-publishes via its own BroadcastManager listener. Bug persists.
- Identity / token permissions: subscriber token has wildcard subscribe permission; server logs show no permission denial.
- Server version: reproduces identically on 1.10.0 and 1.11.0.
Suspected pattern
This matches webrtc-rs PR #750 ("Handle receiver reuse during renegotiation") in behavior — active receivers (camera) appear to cause the new transceiver for screen share to be marked NOT HANDLED. Is there an equivalent fix in pion-go currently shipping with livekit-server? Or in the SDK's add-track flow?
Questions
- Is this a known issue with publishing a 2nd video track via renegotiation while another video track is active in the same Room?
- Is singlePeerConnection mode planned for client-sdk-flutter? The Swift SDK exposes it (2.13.0+); we suspect single-PC mode would bypass this entirely.
- Is there a recommended workaround (e.g. pre-allocating transceivers at connect time, publish-order tricks, dynacast off, dummy track pre-publish)?
- Is there a way to disable the supervisor's hardcoded 30s publish timeout server-side while we diagnose?
Forensic data available on request
- Full SDP offer + answer of the failing renegotiation
- Timestamped client logs (both host and viewer side)
- Server logs at debug level showing the 30s supervisor timeout
- Confirmation of zero unhandled RTP packets during the broadcast window
Happy to share via secure channel or attach to this issue.
Impact
This blocks shipping screen share in our production live streaming application. We are not in a position to migrate to LiveKit Cloud or rewrite the host to Swift SDK. Looking for a workaround or fix timeline guidance.
Thanks!
- Ngôn ngữ chính
- Dart
- Star
- 421
- Fork
- 260
- Merge trung bình
- 2 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 21
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 12 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
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
livekit/client-sdk-flutter#1265 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
A full reconnect that is in progress when disconnect() is called reopens the closed engine and retries up to reconnectAttemptsCó thể đã có người làm @hiroshihorie đã nhận 2 ngày trước. Đang mở
Độ 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ự
-
Độ 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
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Tencent/tdesign-flutter#1229 · 1 bình luận ·
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 65/100
VeryGoodOpenSource/very_good_analysis#254 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
berkmancenter/frankly#732 ·
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 82/100
rodydavis/signals.dart#510 ·