[mediasoup-client] - createSendTransport.produce Error ONLY on Video on Android - Failed to set remote answer sdp - Expo Managed Workflow with react-native-webrtc Config Plugin

I’m working on Expo Managed Workflow, and am using Expo Dev Client with Config Plugins, more specifically the react-native-webrtc config-plugin: @config-plugins/react-native-webrtc - npm

Versions:

        "expo": "^43.0.0",
        "react-native": "0.64.2",
        "react-native-webrtc": "^1.92.2",
        "mediasoup-client": "^3.6.43",

Our application has been on managed workflow and now we’re hoping to develop native applications to publish to the mobile stores on the same workflow. Right now focusing only on Android version.

The application functions properly, we’re able to join meetings through all platforms, even the Android, and audio functions as well. But for some reason enabling video on Android isn’t functioning as expected. Primarily working on Android Simulator through AVD but have also tested on a real device.

This is the error we’re getting: “Failed to set remote answer sdp: Failed to set remote video description send parameters for m-section with mid=‘video’.”,

I’ve ran device.canProduce(“video”) and it returns true, for createSendTransport.produce we’re using the video/H264 codec but I’ve also tried using rtx and vp8 and I’m getting the same error.

now I’m not sure how to proceed. I am also unsure how I can get the SDP to be printed for Native Android on Expo so it can be helpful, I’ve tried printing window.RTCSessionDescription.sdp, but it’s undefined. I am unsure how I’d enable debugging for React Native from here: mediasoup :: Debugging

it states to enable it via localStorage but I can’t do that on Expo.

Any insight would greatly be appreciated, thanks so much for your time!

Okay so got debug enabled for it; this is the SDP:

send setLocationDescription OFFER

mediasoup-client:ReactNative send() | calling pc.setLocalDescription() [offer:'Object {\n' +
  '  "sdp": "v=0\r\n' +
  'o=- 8910897138559076878 4 IN IP4 127.0.0.1\r\n' +
  's=-\r\n' +
  't=0 0\r\n' +
  'a=extmap-allow-mixed\r\n' +
  'a=msid-semantic: WMS 312e9123-6a6a-4319-95e7-b9cc09b7a707\r\n' +
  'a=group:BUNDLE data audio video\r\n' +
  'm=application 5121 UDP/DTLS/SCTP webrtc-datachannel\r\n' +
  'c=IN IP4 176.105.150.146\r\n' +
  'a=setup:actpass\r\n' +
  'a=mid:data\r\n' +
  'a=ice-ufrag:X51N\r\n' +
  'a=ice-pwd:0IyfyjcFfocz1hYo131tvgL/\r\n' +
  'a=fingerprint:sha-256 AE:F0:12:B6:66:37:D5:F1:00:5C:FC:02:76:F4:0D:52:F4:1E:DC:77:D2:63:28:7B:F0:89:2C:93:4D:62:86:3E\r\n' +
  'a=candidate:841689039 1 udp 2122260223 10.0.2.16 35299 typ host generation 0 network-id 5 network-cost 10\r\n' +
  'a=candidate:3806544196 1 udp 2122187263 fec0::be61:a42e:6ce5:be9f 56308 typ host generation 0 network-id 6 network-cost 10\r\n' +       
  'a=candidate:842163049 1 udp 1686052607 176.105.150.146 5121 typ srflx raddr 10.0.2.16 rport 35299 generation 0 network-id 5 network-cost 10\r\n' +
  'a=candidate:1847424209 1 tcp 1518149375 10.0.2.15 9 typ host tcptype active generation 0 network-id 3 network-cost 900\r\n' +
  'a=candidate:841645128 1 tcp 1518076415 fec0::b807:18ff:fe10:7b0 9 typ host tcptype active generation 0 network-id 4 network-cost 900\r\n' +
  'a=ice-options:trickle\r\n' +
  'a=sctp-port:5000\r\n' +
  'a=max-message-size:262144\r\n' +
  'm=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126\r\n' +
  'c=IN IP4 0.0.0.0\r\n' +
  'a=rtpmap:111 opus/48000/2\r\n' +
  'a=rtpmap:103 ISAC/16000\r\n' +
  'a=rtpmap:104 ISAC/32000\r\n' +
  'a=rtpmap:9 G722/8000\r\n' +
  'a=rtpmap:102 ILBC/8000\r\n' +
  'a=rtpmap:0 PCMU/8000\r\n' +
  'a=rtpmap:8 PCMA/8000\r\n' +
  'a=rtpmap:106 CN/32000\r\n' +
  'a=rtpmap:105 CN/16000\r\n' +
  'a=rtpmap:13 CN/8000\r\n' +
  'a=rtpmap:110 telephone-event/48000\r\n' +
  'a=rtpmap:112 telephone-event/32000\r\n' +
  'a=rtpmap:113 telephone-event/16000\r\n' +
  'a=rtpmap:126 telephone-event/8000\r\n' +
  'a=fmtp:111 minptime=10;useinbandfec=1\r\n' +
  'a=rtcp:9 IN IP4 0.0.0.0\r\n' +
  'a=rtcp-fb:111 transport-cc\r\n' +
  'a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\n' +
  'a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n' +
  'a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n' +
  'a=setup:actpass\r\n' +
  'a=mid:audio\r\n' +
  'a=sendrecv\r\n' +
  'a=ice-ufrag:X51N\r\n' +
  'a=ice-pwd:0IyfyjcFfocz1hYo131tvgL/\r\n' +
  'a=fingerprint:sha-256 AE:F0:12:B6:66:37:D5:F1:00:5C:FC:02:76:F4:0D:52:F4:1E:DC:77:D2:63:28:7B:F0:89:2C:93:4D:62:86:3E\r\n' +
  'a=ice-options:trickle\r\n' +
  'a=ssrc:109549748 cname:3PrkLkTFQ3vXnM1o\r\n' +
  'a=ssrc:109549748 msid:312e9123-6a6a-4319-95e7-b9cc09b7a707 be318b79-a077-4662-8502-37bd15acbde3\r\n' +
  'a=ssrc:109549748 mslabel:312e9123-6a6a-4319-95e7-b9cc09b7a707\r\n' +
  'a=ssrc:109549748 label:be318b79-a077-4662-8502-37bd15acbde3\r\n' +
  'a=rtcp-mux\r\n' +
  'm=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 35 36 100 101 127\r\n' +
  'c=IN IP4 0.0.0.0\r\n' +
  'a=rtpmap:96 VP8/90000\r\n' +
  'a=rtpmap:97 rtx/90000\r\n' +
  'a=rtpmap:98 VP9/90000\r\n' +
  'a=rtpmap:99 rtx/90000\r\n' +
  'a=rtpmap:35 AV1X/90000\r\n' +
  'a=rtpmap:36 rtx/90000\r\n' +
  'a=rtpmap:100 red/90000\r\n' +
  'a=rtpmap:101 rtx/90000\r\n' +
  'a=rtpmap:127 ulpfec/90000\r\n' +
  'a=fmtp:97 apt=96\r\n' +
  'a=fmtp:99 apt=98\r\n' +
  'a=fmtp:36 apt=35\r\n' +
  'a=fmtp:101 apt=100\r\n' +
  'a=rtcp:9 IN IP4 0.0.0.0\r\n' +
  'a=rtcp-fb:96 goog-remb\r\n' +
  'a=rtcp-fb:96 transport-cc\r\n' +
  'a=rtcp-fb:96 ccm fir\r\n' +
  'a=rtcp-fb:96 nack\r\n' +
  'a=rtcp-fb:96 nack pli\r\n' +
  'a=rtcp-fb:98 goog-remb\r\n' +
  'a=rtcp-fb:98 transport-cc\r\n' +
  'a=rtcp-fb:98 ccm fir\r\n' +
  'a=rtcp-fb:98 nack\r\n' +
  'a=rtcp-fb:98 nack pli\r\n' +
  'a=rtcp-fb:35 goog-remb\r\n' +
  'a=rtcp-fb:35 transport-cc\r\n' +
  'a=rtcp-fb:35 ccm fir\r\n' +
  'a=rtcp-fb:35 nack\r\n' +
  'a=rtcp-fb:35 nack pli\r\n' +
  'a=extmap:14 urn:ietf:params:rtp-hdrext:toffset\r\n' +
  'a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n' +
  'a=extmap:13 urn:3gpp:video-orientation\r\n' +
  'a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n' +
  'a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\n' +
  'a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\r\n' +
  'a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\r\n' +
  'a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space\r\n' +
  'a=setup:actpass\r\n' +
  'a=mid:video\r\n' +
  'a=sendrecv\r\n' +
  'a=ice-ufrag:X51N\r\n' +
  'a=ice-pwd:0IyfyjcFfocz1hYo131tvgL/\r\n' +
  'a=fingerprint:sha-256 AE:F0:12:B6:66:37:D5:F1:00:5C:FC:02:76:F4:0D:52:F4:1E:DC:77:D2:63:28:7B:F0:89:2C:93:4D:62:86:3E\r\n' +
  'a=ice-options:trickle\r\n' +
  'a=ssrc:4289489672 cname:3PrkLkTFQ3vXnM1o\r\n' +
  'a=ssrc:4289489672 msid:312e9123-6a6a-4319-95e7-b9cc09b7a707 823f6170-1647-4523-917a-1e6ccc3d0fb3\r\n' +
  'a=ssrc:4289489672 mslabel:312e9123-6a6a-4319-95e7-b9cc09b7a707\r\n' +
  'a=ssrc:4289489672 label:823f6170-1647-4523-917a-1e6ccc3d0fb3\r\n' +
  'a=ssrc:57600886 cname:3PrkLkTFQ3vXnM1o\r\n' +
  'a=ssrc:57600886 msid:312e9123-6a6a-4319-95e7-b9cc09b7a707 823f6170-1647-4523-917a-1e6ccc3d0fb3\r\n' +
  'a=ssrc:57600886 mslabel:312e9123-6a6a-4319-95e7-b9cc09b7a707\r\n' +
  'a=ssrc:57600886 label:823f6170-1647-4523-917a-1e6ccc3d0fb3\r\n' +
  'a=ssrc:4289489672 cname:3PrkLkTFQ3vXnM1o\r\n' +
  'a=ssrc:4289489672 msid:312e9123-6a6a-4319-95e7-b9cc09b7a707 823f6170-1647-4523-917a-1e6ccc3d0fb3\r\n' +
  'a=ssrc:4289489673 cname:3PrkLkTFQ3vXnM1o\r\n' +
  'a=ssrc:4289489673 msid:312e9123-6a6a-4319-95e7-b9cc09b7a707 823f6170-1647-4523-917a-1e6ccc3d0fb3\r\n' +
  'a=ssrc:57600886 cname:3PrkLkTFQ3vXnM1o\r\n' +
  'a=ssrc:57600886 msid:312e9123-6a6a-4319-95e7-b9cc09b7a707 823f6170-1647-4523-917a-1e6ccc3d0fb3\r\n' +
  'a=ssrc:57600887 cname:3PrkLkTFQ3vXnM1o\r\n' +
  'a=ssrc:57600887 msid:312e9123-6a6a-4319-95e7-b9cc09b7a707 823f6170-1647-4523-917a-1e6ccc3d0fb3\r\n' +
  'a=ssrc-group:FID 4289489672 57600886\r\n' +
  'a=ssrc-group:SIM 4289489672 4289489673\r\n' +
  'a=ssrc-group:FID 4289489672 57600886\r\n' +
  'a=ssrc-group:FID 4289489673 57600887\r\n' +
  'a=rtcp-mux\r\n' +
  'a=rtcp-rsize\r\n' +
  '",\n' +
  '  "type": "offer",\n' +
  '}']

send setRemoteDescription ANSWER [error]:

mediasoup-client:ReactNative send() | calling pc.setRemoteDescription() [answer:'Object {\n' +
  '  "sdp": "v=0\r\n' +
  'o=mediasoup-client 10000 3 IN IP4 0.0.0.0\r\n' +
  's=-\r\n' +
  't=0 0\r\n' +
  'a=ice-lite\r\n' +
  'a=fingerprint:sha-512 EB:C1:56:37:3E:D7:3C:70:51:18:34:82:B8:0E:72:9E:A6:B3:D2:8B:66:A5:0C:46:D0:0C:64:85:9A:92:3C:90:00:7E:F3:D3:B0:60:FF:1A:0C:B0:BD:BC:C4:B5:F2:F9:44:20:C7:EA:F6:CF:86:DA:AC:9D:C1:7A:37:C0:9E:A8\r\n' +
  'a=msid-semantic: WMS *\r\n' +
  'a=group:BUNDLE data audio video\r\n' +
  'm=application 7 UDP/DTLS/SCTP webrtc-datachannel\r\n' +
  'c=IN IP4 127.0.0.1\r\n' +
  'a=setup:active\r\n' +
  'a=mid:data\r\n' +
  'a=ice-ufrag:<omitted>\r\n' +
  'a=ice-pwd:<omitted>\r\n' +
  'a=candidate:udpcandidate 1 udp 1076558079 176.105.150.147 36642 typ host\r\n' +
  'a=candidate:tcpcandidate 1 tcp 1076302079 176.105.150.147 41369 typ host tcptype passive\r\n' +
  'a=end-of-candidates\r\n' +
  'a=ice-options:renomination\r\n' +
  'a=sctp-port:5000\r\n' +
  'a=max-message-size:262144\r\n' +
  'm=audio 7 UDP/TLS/RTP/SAVPF 111\r\n' +
  'c=IN IP4 127.0.0.1\r\n' +
  'a=rtpmap:111 opus/48000/2\r\n' +
  'a=rtcp-fb:111 transport-cc \r\n' +
  'a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n' +
  'a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n' +
  'a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\n' +
  'a=setup:active\r\n' +
  'a=mid:audio\r\n' +
  'a=recvonly\r\n' +
  'a=ice-ufrag:<omitted>\r\n' +
  'a=ice-pwd:<omitted>\r\n' +
  'a=candidate:udpcandidate 1 udp 1076558079 176.105.150.147 36642 typ host\r\n' +
  'a=candidate:tcpcandidate 1 tcp 1076302079 176.105.150.147 41369 typ host tcptype passive\r\n' +
  'a=end-of-candidates\r\n' +
  'a=ice-options:renomination\r\n' +
  'a=rtcp-mux\r\n' +
  'a=rtcp-rsize\r\n' +
  'm=video 7 UDP/TLS/RTP/SAVPF 125\r\n' +
  'c=IN IP4 127.0.0.1\r\n' +
  'a=rtpmap:125 H264/90000\r\n' +
  'a=fmtp:125 packetization-mode=1;level-asymmetry-allowed=1;profile-level-id=42e01f;x-google-start-bitrate=1000\r\n' +
  'a=rtcp-fb:125 transport-cc \r\n' +
  'a=rtcp-fb:125 ccm fir\r\n' +
  'a=rtcp-fb:125 nack \r\n' +
  'a=rtcp-fb:125 nack pli\r\n' +
  'a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n' +
  'a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n' +
  'a=extmap:13 urn:3gpp:video-orientation\r\n' +
  'a=extmap:14 urn:ietf:params:rtp-hdrext:toffset\r\n' +
  'a=setup:active\r\n' +
  'a=mid:video\r\n' +
  'a=recvonly\r\n' +
  'a=ice-ufrag:<omitted>\r\n' +
  'a=ice-pwd:<omitted>\r\n' +
  'a=candidate:udpcandidate 1 udp 1076558079 176.105.150.147 36642 typ host\r\n' +
  'a=candidate:tcpcandidate 1 tcp 1076302079 176.105.150.147 41369 typ host tcptype passive\r\n' +
  'a=end-of-candidates\r\n' +
  'a=ice-options:renomination\r\n' +
  'a=rtcp-mux\r\n' +
  'a=rtcp-rsize\r\n' +
  'a=x-google-flag:conference\r\n' +
  '",\n' +
  '  "type": "answer",\n' +
  '}']

EDIT: So I can see from the offer that video only has vp8,rtx,vp9, etc but no h264 for some reason. And on answer we’re stating h264, so that explains the error. I’ll try figuring out why that’s not there, but regardless, sorry if this was irrelevant yet again but thank you if you did read through it, cheers!

BUMP; just for clarity’s sake, I’m trying codec selection in ReactNative, on client side with transport.produce(); setting ProducerOption’s codec; vp8 just isn’t being selected and only Android devices that have h.264 support do work. [while for serverside we have both vp8, h264, vp8 is specifically used for screen sharing and it works on browsers perfectly]

I’m getting the following warning:

mediasoup-client:WARN:ReactNative send() | codec selection is not available in ReactNative handler

Is this the reason, can anyone clarify please?

Thanks so much for your time!