{"record":{"id":"1750b63e6b33d250","repo":"iflytek/astron-agent","slug":"argument-1-of-rtcpeerconnection-removetrack-does-not","errorCode":null,"errorMessage":"Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","messagePattern":"Argument 1 of RTCPeerConnection\\.removeTrack does not implement interface RTCRtpSender\\.","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"console/frontend/src/utils/avatar-sdk-web_3.1.2.1002/webrtc-player--YuOiwFd.js","lineNumber":2916,"sourceCode":"                (e.getTracks().forEach(function (e, t) {\n                  var r = n.getTracks()[t];\n                  e.addEventListener('enabled', function (e) {\n                    r.enabled = e.enabled;\n                  });\n                }),\n                  n.getTracks().forEach(function (e) {\n                    r.addTrack(e, n);\n                  }));\n              }\n            }),\n            (p.prototype.removeTrack = function (t) {\n              if (this._isClosed)\n                throw c(\n                  'InvalidStateError',\n                  'Attempted to call removeTrack on a closed peerconnection.'\n                );\n              if (!(t instanceof e.RTCRtpSender))\n                throw new TypeError(\n                  'Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.'\n                );\n              var r = this.transceivers.find(function (e) {\n                return e.rtpSender === t;\n              });\n              if (!r)\n                throw c(\n                  'InvalidAccessError',\n                  'Sender was not created by this connection.'\n                );\n              var n = r.stream;\n              (r.rtpSender.stop(),\n                (r.rtpSender = null),\n                (r.track = null),\n                (r.stream = null),\n                -1 ===\n                  this.transceivers\n                    .map(function (e) {","sourceCodeStart":2898,"sourceCodeEnd":2934,"githubUrl":"https://github.com/iflytek/astron-agent/blob/5e758547a83371a5a4b29dadf4ac03e8dd527635/console/frontend/src/utils/avatar-sdk-web_3.1.2.1002/webrtc-player--YuOiwFd.js#L2898-L2934","documentation":"A TypeError raised by the browser's native removeTrack binding when the argument is not an RTCRtpSender — typically null/undefined because getSender() returned nothing or the track was never added. The shim calls removeTrack with an invalid sender after checking _isClosed.","triggerScenarios":"Thrown at console/frontend/src/utils/avatar-sdk-web_3.1.2.1002/webrtc-player--YuOiwFd.js:2916 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Only call removeTrack with a sender obtained from addTrack/addTransceiver return values","Guard for null/undefined sender before calling removeTrack","Verify the track/stream was actually added on this PeerConnection"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5e758547a83371a5a4b29dadf4ac03e8dd527635","analyzedAt":"2026-09-12T08:03:51.356Z","contentChangedAt":"2026-09-12T08:03:51.356Z","schemaVersion":2},"datasetVersion":"2026-09-19T12:17:13.211Z"}