samster
samster

Reputation: 182

RTCError: Rejected data channel transport with mid=0

I'm trying to set up a data channel connection between two peers with webrtc but am running into this issue on the peer creating the offer.

This is the full RCTErrorEvent object that i'm getting from the onerror callback on the data channel i've created: enter image description here

This error is getting thrown when the answering client sends this SDP message back:

v=0
o=- 4032937039670154216 2 IN IP4 127.0.0.1
s=-
t=0 0
a=msid-semantic: WMS
m=application 0 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=mid:0
a=sctp-port:5000

Any idea how I can resolve this issue, or what mid=0 even means?

Edit: This is what the offer SDP looks like:

v=0
o=- 1617373214565242991 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0
a=msid-semantic: WMS
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=ice-ufrag:qoYs
a=ice-pwd:JS3NDg62V+cpJRUhEBSbMVcq
a=ice-options:trickle
a=fingerprint:sha-256 7A:C5:F6:CB:C0:94:44:12:22:C5... (removed)
a=setup:actpass
a=mid:0
a=sctp-port:5000
a=max-message-size:262144

Upvotes: 2

Views: 646

Answers (1)

Philipp Hancke
Philipp Hancke

Reputation: 17265

You have a m=application 0 ... in your SDP. This means the datachannel protocol is not negotiated. That does not happen normally, are you doing anything special to the SDP?

Upvotes: 1

Related Questions