-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
WebRTC Talk: TypeError 'this.peer is null' when calling addTrack on null RTCPeerConnection #89434
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Bug Report
Summary
TypeError: can't access property "addTrack", this.peer is null— error in OpenClaw control-ui dashboard when using the Realtime Talk (voice) feature.Description
In the WebRTC Talk transport (
PHclass indist/control-ui/assets/index-*.js),this.peer.addTrack(e, this.media)is called without a null guard. If the peer connection is closed/nulled before track addition completes (race condition betweenstop()andstart()), the method throws.Root Cause
In
PH.start():The
stop()method setsthis.peer = null. Ifstop()runs concurrently (e.g., user cancels, session teardown) afterthis.peeris constructed but beforeaddTrackis called,this.peeris null and the error is thrown.Reproduction
can't access property "addTrack", this.peer is nullExpected Behavior
Null guard should prevent the crash; the session should handle teardown gracefully.
Fix
Add null check before
addTrack:Or better, guard the entire
start()method against concurrentstop().Environment
Impact
Non-blocking for text chat users. Only affects users attempting Realtime Talk (voice input) in the dashboard.