Lib-jitsi-meet: startVideoMuted leads to error in console: removeTrack: ... does not belong to pc

Hello, I am using lib-jitsi-meet for a custom client and setting the startVideoMuted property to “1”. This correctly leads to the behavior, that the video of the second participant that joins the conference is muted and not transferred to the first participant.
My problem is, that in the browser log I see the following error log: (last two lines)

2022-09-01T08:57:56.756Z [modules/xmpp/strophe.jingle.js] <Bo.onJingle>:  Found a JSON-encoded element in session-initiate, translating to standard Jingle.
Logger.js:154 2022-09-01T08:57:56.758Z [modules/xmpp/strophe.jingle.js] <Bo.onJingle>:  (TIME) received session-initiate:	 109436.79999999888
Logger.js:154 2022-09-01T08:57:56.763Z [modules/RTC/TraceablePeerConnection.js] <new Ld>:  Using RTCRtpTransceiver#setCodecPreferences for codec selection
Logger.js:154 2022-09-01T08:57:56.764Z [modules/RTC/TraceablePeerConnection.js] <new Ld>:  Create new TPC[id=3,type=JVB]
Logger.js:154 2022-09-01T08:57:56.773Z [JitsiConference.js] <Mh._acceptJvbIncomingCall>:  Starting CallStats for JVB connection...
Logger.js:154 2022-09-01T08:57:56.777Z [modules/RTC/JitsiLocalTrack.js] Mute LocalTrack[4,video]: true
Logger.js:154 2022-09-01T08:57:56.779Z [modules/RTC/TraceablePeerConnection.js] <Ld.addTrack>:  TPC[id=3,type=JVB] adding LocalTrack[3,audio]
Logger.js:154 2022-09-01T08:57:56.796Z [modules/RTC/TraceablePeerConnection.js] <Ld._remoteTrackAdded>:  TPC[id=3,type=JVB] ignored remote 'stream added' event for non-user stream[id=mixedmslabel]
Logger.js:154 2022-09-01T08:57:56.797Z [modules/RTC/TraceablePeerConnection.js] <Ld._remoteTrackAdded>:  TPC[id=3,type=JVB] ignored remote 'stream added' event for non-user stream[id=mixedmslabel]
Logger.js:154 2022-09-01T08:57:56.820Z [modules/xmpp/JingleSessionPC.js] <jo.sendSessionAccept>:  JingleSessionPC[session=JVB,initiator=false,sid=58hpit0gl8qk9] Sending session-accept
**Logger.js:154 2022-09-01T08:57:56.833Z [modules/RTC/TraceablePeerConnection.js] <Ld._assertTrackBelongs>:  TPC[id=3,type=JVB] removeTrack: track=LocalTrack[4,video] does not belong to pc**
**Logger.js:154 2022-09-01T08:57:56.839Z [modules/xmpp/JingleSessionPC.js] <Object.callback>:  JingleSessionPC[session=JVB,initiator=false,sid=58hpit0gl8qk9] removeTrack failed**

Is this something I am doing wrong or normal behavior? As suggested I am adding the tracks to the conference before joining it.
Further, if I then unmute the muted video, I get the same error. In order to make it work I need to recreate the local video track on unmuting and replace the track in the conference.

This might be because video tracks are a bit more delicate… muting it means destroying it, and unmuting inolves re-creating the track.

This should happen internally, however, right @jallamsetty ?

Hi @saghul,
thanks for the quick reply. Yes, this happens only internally, and as far as I can figure it out, it does not affect something in my client.
So creating a new video track when someone unmutes his/her videotrack is the way to go, right?

Yes, but that track creation should happen automatically…