Code to reproduce the issue:
I'm making calls between two browsers on same machine, and sometimes randomly one participant doesn't establish room connection. Here's short console log from this participant:
2020-07-08 07:06:31.807Z | WARN in [PeerConnectionV2 #5: 97ca79e6-caef-485f-ae8e-0a53beaca3fd]: ICE failed react_devtools_backend.js:6:7472
WebRTC: ICE failed, add a STUN server and see about:webrtc for more details
2020-07-08 07:06:31.808Z | WARN in [PeerConnectionV2 #5: 97ca79e6-caef-485f-ae8e-0a53beaca3fd]: An ICE restart has been scheduled react_devtools_backend.js:6:7472
2020-07-08 07:06:31.809Z | INFO in [Room #4: RM037a65a90714fbe0ac066806c19dd954]: Transitioned to state: reconnecting log.js:138
2020-07-08 07:06:31.810Z | WARN in [PeerConnectionV2 #5: 97ca79e6-caef-485f-ae8e-0a53beaca3fd]: Attempting to restart ICE
This participant uses Firefox Developer Edition 79.0b4, and the other uses Chrome 83.0.4103.116. But the error also happens when I switch roles.
The room is created server-side as such:
await client.video.rooms.create({
uniqueName: id,
enableTurn: true,
type: 'peer-to-peer',
statusCallback: `https://api.${process.env.DOMAIN_NAME}/v1/twilio`,
statusCallbackMethod: 'GET',
});
Expected behavior:
Connection should be established every time
Actual behavior:
Here are full logs from two participants ('streamer' is firefox, 'viewer' is chrome) and also about:webrtc logs from firefox participant both for successful and unsuccessful calls:
https://gist.github.com/doomsower/23ec0c7c8f609e922ab8dfe2539d17bf
Software versions:
Hi @doomsower ,
Thanks for writing in with your issue. It looks like Chrome is treating Firefox's SDP as plan-b and is failing to apply it. I will file bugs in Chromium bug tracker and Bugzilla regarding this. I will also create an internal ticket to work around this issue.
Thanks,
Manjesh Malavalli
JSDK Team
Hi @doomsower ,
I have filed a Chromium bug for this issue. Please take a look and star it in order to increase its visibility to the Chromium engineers. I have also started implementing a workaround for this issue. I'll let you know once this is available in a release.
Thanks,
Manjesh Malavalli
JSDK Team
Hi @doomsower ,
This pull request works around the Chromium bug, and is scheduled for release in SDK version 2.7.1. Please watch this space for updates.
Thanks,
Manjesh Malavalli
JSDK Team
Hi @doomsower ,
I have cut a release candidate with this change that is undergoing testing. Please feel free to verify that your issue is fixed by installing it as follows:
npm install twilio/twilio-video.js#2.7.1-rc1
Please let me know if it fixes the issue for you.
Thanks,
Manjesh Malavalli
JSDK Team
Hi, thank you for your efforts. Unfortunately, with 2.7.1 the issue is still here.
Logs from chrome
chrome.js:427 [Deprecation] "Complex" Plan B SDP detected! Chrome will switch the default sdpSemantics in M72, around January 2019 from 'plan-b' to the standardized 'unified-plan' format and this peer connection is relying on the default sdpSemantics. This SDP is not compatible with Unified Plan and will be rejected by clients expecting Unified Plan. For more information about how to prepare for the switch, see https://webrtc.org/web-apis/chrome/unified-plan/.
setDescription @ chrome.js:427
setRemoteDescription @ chrome.js:337
setLocalOfferSucceeded @ chrome.js:435
Promise.then (async)
setRemoteAnswer @ chrome.js:433
setDescription @ chrome.js:378
setRemoteDescription @ chrome.js:337
eval @ peerconnection.js:1189
Promise.then (async)
_setRemoteDescription @ peerconnection.js:1188
eval @ peerconnection.js:1267
Promise.then (async)
_updateDescription @ peerconnection.js:1266
eval @ peerconnection.js:1519
gotKey @ statemachine.js:156
Promise.then (async)
bracket @ statemachine.js:154
update @ peerconnection.js:1505
eval @ peerconnectionmanager.js:392
eval @ peerconnectionmanager.js:387
Promise.then (async)
update @ peerconnectionmanager.js:386
_update @ room.js:421
emit @ events.js:153
handleMessage @ twilioconnectiontransport.js:576
emit @ events.js:153
_handleMessage @ twilioconnection.js:485
eval @ twilioconnection.js:337
log.js:138 2020-07-30 11:06:36.561Z | WARN in [PeerConnectionV2 #1: 28cd5509-c405-4bc9-a73f-46e91342e743]: Calling setRemoteDescription with an RTCSessionDescription of type "answer" failed with the error "Failed to execute 'setRemoteDescription' on 'RTCPeerConnection': Failed to set remote answer sdp: Media section has more than one track specified with a=ssrc lines which is not supported with Unified Plan.".
log @ log.js:138
warn @ log.js:199
eval @ peerconnection.js:1199
Promise.then (async)
_setRemoteDescription @ peerconnection.js:1190
eval @ peerconnection.js:1267
Promise.then (async)
_updateDescription @ peerconnection.js:1266
eval @ peerconnection.js:1519
gotKey @ statemachine.js:156
Promise.then (async)
bracket @ statemachine.js:154
update @ peerconnection.js:1505
eval @ peerconnectionmanager.js:392
eval @ peerconnectionmanager.js:387
Promise.then (async)
update @ peerconnectionmanager.js:386
_update @ room.js:421
emit @ events.js:153
handleMessage @ twilioconnectiontransport.js:576
emit @ events.js:153
_handleMessage @ twilioconnection.js:485
eval @ twilioconnection.js:337
log.js:138 2020-07-30 11:06:36.561Z | WARN in [PeerConnectionV2 #1: 28cd5509-c405-4bc9-a73f-46e91342e743]: The SDP was v=0
o=mozilla...THIS_IS_SDPARTA-80.0 8326692409866038916 0 IN IP4 0.0.0.0
s=-
t=0 0
a=fingerprint:sha-256 59:BF:3F:3D:F7:41:93:3D:3E:FA:7F:F6:9A:87:B7:5D:70:D6:29:CE:D9:DA:74:53:4F:B3:B2:4B:8A:A9:58:7D
a=group:BUNDLE 0 1
a=ice-options:trickle
a=msid-semantic:WMS *
m=audio 9 UDP/TLS/RTP/SAVPF 111 9 0 8 126
c=IN IP4 0.0.0.0
a=sendrecv
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=fmtp:111 maxplaybackrate=48000;stereo=1;useinbandfec=1
a=fmtp:126 0-15
a=ice-pwd:c9ab28b6f1811367867b3cfaf5870473
a=ice-ufrag:790de180
a=mid:0
a=msid:{b65f458b-fcc3-e840-aeee-9f87e19c92d0} {8f8c832e-7c8a-b947-a5c9-7460500fb9b9}
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtpmap:9 G722/8000/1
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:126 telephone-event/8000/1
a=setup:active
a=ssrc:116317751 cname:{0f444f2b-ad73-eb41-a107-e21ff5e32b24}
m=video 9 UDP/TLS/RTP/SAVPF 96 97 99 107 109 98 125 108
c=IN IP4 0.0.0.0
a=inactive
a=extmap:14 urn:ietf:params:rtp-hdrext:toffset
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:12 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=fmtp:125 profile-level-id=42e01f;level-asymmetry-allowed=1;packetization-mode=1
a=fmtp:108 profile-level-id=42e01f;level-asymmetry-allowed=1
a=fmtp:96 max-fs=12288;max-fr=60
a=fmtp:97 apt=96
a=fmtp:98 max-fs=12288;max-fr=60
a=fmtp:99 apt=98
a=fmtp:107 apt=125
a=fmtp:109 apt=108
a=ice-pwd:c9ab28b6f1811367867b3cfaf5870473
a=ice-ufrag:790de180
a=mid:1
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:125 nack
a=rtcp-fb:125 nack pli
a=rtcp-fb:125 ccm fir
a=rtcp-fb:125 goog-remb
a=rtcp-fb:125 transport-cc
a=rtcp-fb:108 nack
a=rtcp-fb:108 nack pli
a=rtcp-fb:108 ccm fir
a=rtcp-fb:108 goog-remb
a=rtcp-fb:108 transport-cc
a=rtcp-mux
a=rtpmap:96 VP8/90000
a=rtpmap:97 rtx/90000
a=rtpmap:98 VP9/90000
a=rtpmap:99 rtx/90000
a=rtpmap:125 H264/90000
a=rtpmap:107 rtx/90000
a=rtpmap:108 H264/90000
a=rtpmap:109 rtx/90000
a=setup:active
a=ssrc:2363654556 cname:{0f444f2b-ad73-eb41-a107-e21ff5e32b24}
a=ssrc:3078313622 cname:{0f444f2b-ad73-eb41-a107-e21ff5e32b24}
a=ssrc-group:FID 2363654556 3078313622
log @ log.js:138
warn @ log.js:199
eval @ peerconnection.js:1201
Promise.then (async)
_setRemoteDescription @ peerconnection.js:1190
eval @ peerconnection.js:1267
Promise.then (async)
_updateDescription @ peerconnection.js:1266
eval @ peerconnection.js:1519
gotKey @ statemachine.js:156
Promise.then (async)
bracket @ statemachine.js:154
update @ peerconnection.js:1505
eval @ peerconnectionmanager.js:392
eval @ peerconnectionmanager.js:387
Promise.then (async)
update @ peerconnectionmanager.js:386
_update @ room.js:421
emit @ events.js:153
handleMessage @ twilioconnectiontransport.js:576
emit @ events.js:153
_handleMessage @ twilioconnection.js:485
eval @ twilioconnection.js:337
twilioerror.js:35 Uncaught (in promise) TwilioError: Client is unable to apply a remote media description
at MediaClientRemoteDescFailedError.TwilioError (webpack:////Volumes/Projects/videoforce/node_modules/twilio-video/es5/util/twilioerror.js?:37:23)
at new MediaClientRemoteDescFailedError (webpack:////Volumes/Projects/videoforce/node_modules/twilio-video/es5/util/twilio-video-errors.js?:1100:149)
at eval (webpack:////Volumes/Projects/videoforce/node_modules/twilio-video/es5/signaling/v2/peerconnection.js?:1269:15)
at async Promise.all (index 0)
at async Promise.all (index 0)
TwilioError @ twilioerror.js:35
MediaClientRemoteDescFailedError @ twilio-video-errors.js:1100
eval @ peerconnection.js:1269
Promise.then (async)
update @ peerconnectionmanager.js:394
_update @ room.js:421
emit @ events.js:153
handleMessage @ twilioconnectiontransport.js:576
emit @ events.js:153
_handleMessage @ twilioconnection.js:485
eval @ twilioconnection.js:337
Chrome Version 84.0.4147.105 (Official Build) (64-bit)
Firefox developer edition v 80.0b1 (64-bit)
Hi @doomsower ,
The Firefox SDP you've shared still contains RTX related payload types and SSRCs, which are supposed to be removed by 2.7.1 before sending to the Chrome client. Can you share the Room SID so that I can confirm that you are indeed using 2.7.1 here?
Thanks,
Manjesh Malavalli
JSDK Team
Hi @doomsower ,
Since I've not heard from you in two weeks, I will close this issue. Please feel free to re-open if you want more assistance.
Thanks,
Manjesh Malavalli
JSDK Team