DOMException: "Failed to parse SDP: SDP Parse Error on line 6: No webrtc-datachannel token in m= media line, parse failed.
See original GitHub issueSeeing this error in firefox when calling peer.signal(offer)
. This is logged from from peer.on('error', (err) => {})
offer
looks like:
{
"type": "answer",
"sdp": "v=0\no=- 2361903802410725008 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=msid-semantic: WMS\r\nm=application 0 UDP/DTLS/SCTP 5000\r\nc=IN IP4 0.0.0.0\r\na=mid:0\r\na=sctpmap:5000 webrtc-datachannel 1024\r\n"
}
It looks like m=application 0 UDP/DTLS/SCTP 5000
. The \r\n
carriage returns are concerning. I tried replacing them offer.sdp = offer.sdp.replace('\r\n', '\n');
with no luck.
This same handshake setup works in Chrome the crome answer looks like:
{
"type":"answer",
"sdp":"v=0\r\no=- 6148643454612116579 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE data\r\na=msid-semantic: WMS\r\nm=application 9 DTLS/SCTP 5000\r\nc=IN IP4 0.0.0.0\r\nb=AS:30\r\na=ice-ufrag:FC2g\r\na=ice-pwd:FAYzNn2P/NKl3nPazdVjK5Vj\r\na=fingerprint:sha-256 C6:33:30:F2:11:1D:FE:31:4D:F5:70:F3:6A:84:1B:98:36:EB:A3:D0:C1:DB:88:EC:24:52:EF:D1:1D:A0:F2:A7\r\na=setup:active\r\na=mid:data\r\na=sctpmap:5000 webrtc-datachannel 1024\r\n"
}
m
here looks like m=application 9 DTLS/SCTP 5000
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Firefox WebRTC signaling DOMException Failed to parse SDP
DOMException : "Failed to parse SDP: SDP Parse Error on line 6: No webrtc-datachannel token in m= media line, parse failed.
Read more >Firefox Webrtc Signaling Domexception Failed To ... - ADocLib
DOMException : Failed to parse SDP: SDP Parse Error on line 6: No webrtcdatachannel token in m media line parse failed. DOMException: Failed...
Read more >SDP Parsing Error: End of line beyond end of buffer.
After some search I found the function sdp_parse where this fails, and it seems that the SDP does not fit in the created...
Read more >WebRTC publish problem - Wowza Community
DOMException : Failed to parse SessionDescription. ... "Failed to parse SDP: SDP Parse Error on line 17: Warning: Invalid token ordering ...
Read more >WebRTC 1.0: Real-Time Communication Between Browsers
If the parsing based on the syntax defined in [ RFC3986 ] fails, ... is the offerer tagged m= section without having to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
No. Firefox-to-Node.js
checkout https://stackoverflow.com/questions/54466865/firefox-webrtc-signaling-domexception-failed-to-parse-sdp
sounds like there is a breaking change between Firefox SDP parsing and the node.js
wrtc
module output. Going to close because don’t think its directly related to simple-peer.Your offer is an not an offer but SDP answer (it says in the type field). It’s definitely not complete (missing a fingerprint for one). Can you double check that there isn’t a problem with your signalling setup?
You shouldn’t remove carriage returns, they’re correct.