{"record":{"id":"ee0cda48a2d76d4a","repo":"livekit/livekit","slug":"could-not-find-track","errorCode":null,"errorMessage":"could not find track","messagePattern":"could not find track","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/rtc/participant.go","lineNumber":4238,"sourceCode":"\t\t\t\t}\n\n\t\t\t\tp.pubLogger.Debugw(\"updated pending track\", \"trackID\", ti.Sid, \"trackInfo\", logger.Proto(ti))\n\t\t\t}\n\t\t}\n\t}\n\tp.pendingTracksLock.RUnlock()\n\tif isPending {\n\t\treturn nil\n\t}\n\n\tp.pubLogger.Debugw(\"could not locate track\", \"trackID\", update.TrackSid)\n\tp.sendRequestResponse(&livekit.RequestResponse{\n\t\tReason: livekit.RequestResponse_NOT_FOUND,\n\t\tRequest: &livekit.RequestResponse_UpdateAudioTrack{\n\t\t\tUpdateAudioTrack: utils.CloneProto(update),\n\t\t},\n\t})\n\treturn errors.New(\"could not find track\")\n}\n\nfunc (p *ParticipantImpl) UpdateVideoTrack(update *livekit.UpdateLocalVideoTrack) error {\n\tif track := p.UpTrackManager.UpdatePublishedVideoTrack(update); track != nil {\n\t\treturn nil\n\t}\n\n\tisPending := false\n\tp.pendingTracksLock.RLock()\n\tfor _, pti := range p.pendingTracks {\n\t\tfor _, ti := range pti.trackInfos {\n\t\t\tif ti.Sid == update.TrackSid {\n\t\t\t\tisPending = true\n\n\t\t\t\tti.Width = update.Width\n\t\t\t\tti.Height = update.Height\n\t\t\t}\n\t\t}","sourceCodeStart":4220,"sourceCodeEnd":4256,"githubUrl":"https://github.com/livekit/livekit/blob/ee45c3f0b1a83bf4352dbccb6607ebf70b2a5de6/pkg/rtc/participant.go#L4220-L4256","documentation":"Returned by UpdateAudioTrack when the referenced track SID is neither a pending track (checked under pendingTracksLock) nor an already published track on the participant, so the update has no target to apply to. The server notifies the client via a RequestResponse with NOT_FOUND before returning this error.","triggerScenarios":"Thrown at pkg/rtc/participant.go:4238 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the track SID in the UpdateLocalAudioTrack request matches a track previously published by this participant","Ensure the track has finished publishing (is no longer pending) before sending audio track updates","Check for races where the track was unpublished or replaced concurrently with the update request"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ee45c3f0b1a83bf4352dbccb6607ebf70b2a5de6","analyzedAt":"2026-09-02T03:56:08.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}