Failed to add remote stream ssrc: # to {mid: #, media_type: video}

We already have a stable video conferencing application utilizing Expo, with universal platform support [Web, iOS & Android].

After Chrome 111 upgrade, we’re facing a weird issue that has been occurring a lot.

Here’s our package versions:

mediasoup-client:

        "mediasoup-client": "^3.6.84",
        "expo": "~47.0.8",
        "react-native": "0.70.8",
        "react-native-webrtc": "^111.0.0",

EDIT: ignore react-native & react-native-webrtc, those are for mobile app, for the web variant the direct webrtc available is utilized.

mediasoup:

        "mediasoup": "^3.11.13",

Multiple people can join conference but randomly or when toggling video on/off continuously causes this error, consider Participant A with video off, and Participant B. When Participant A toggles video on or joins with video on; Participant B gets this error:

Failed to execute 'setRemoteDescription' on 'RTCPeerConnection': Failed to set remote offer sdp: Failed to add remote stream ssrc: 212544496 to {mid: 32, media_type: video}

Now, following are the SDP exchanges, I’ll give the two scenarios, one normal and one where the error occurs:

Normal:


Person A normal:

Person A turned camera on:

setLocalDescription: Offer: Person A _normal_ - setLocalDescription - Offer - TextBin

setRemoteDescription: answer: Person A _normal_ - setRemoteDescription - answer - TextBin


Person B normal:

Person A turned camera on.

setRemoteDescription: offer: Person B _normal_ - setRemoteDescription - offer - TextBin

setLocalDescription: answer: Person B _normal_ - setLocalDescription - answer - TextBin


Error:


Person A (error):

Person A turns video on:

setLocalDescription: offer: Person A _error_ - setLocalDescription - offer - TextBin

setRemoteDescription: answer: Person A _error_ - setRemoteDescription - answer - TextBin


Person B (error):

Person A turns camera on:

but before: this is the last event:

mediasoup-client:Chrome111 stopReceiving() | calling pc.setLocalDescription: type answer, sdp:

setRemoteDescription: offer:

The error then comes, specifically at this code, for Participant B:

transport.consume(p).then(...)

I’m not exactly sure what this error means, I’m uncertain how or what causes Synchronization Source [ssrc] error, but what I’ve tried is foremost upgrading all the mediasoup versions, then react-native-webrtc version. Lastly, I tried VP8 codec; seeing as whether it was a h264 profile-level-id issue, but the same error occurs.

Any leads or even input would highly be appreciated. Thanks!

Honestly no idea. We’ve been using Chrome111 handler for long in Chrome >= 111 and never seen that error. I’ve tried to reproduce in the mediasoup demo with any luck.

Is Person B in the first, normal scenario the same person as in the second scenario? This would have been really strange, because only some ids and the session version were different in the remote descriptions.

By the way, I’m assuming it’s happening since Chrome111 as these exceptions started appearing only after it at our Sentry. [Logging goes back 2021], but before that we haven’t received any complaints or any logging either.

As for the scenarios, yes, they’re all the ‘same’ person as it’s reproduced locally, sorry I should’ve clarified that initially. I’ve just opened two windows, one incognito, and the other normal, and joined the conference. I’m easily able to reproduce it if I keep on toggling camera, though it can also randomly occur if I just join with camera on. Our sentry logging is spammed with these exceptions, and unfortunately for production we’re not logging any SDP / mediasoup-client verbose logs.

And, yeah you’re definitely right. I just tried my damndest to reproduce it on mediasoup-demo, no luck at all either. I understand what this signifies then but I’m clueless to where or what the issue is now. But in any case, thank you so much for your time and for looking it up! Much obliged!