pipe / sctp4j

Pure Java implementation of SCTP with webRTC data channel support
36 stars 9 forks source link

ProtocolViolation with Firefox 66.0.2 #3

Open mondain opened 5 years ago

mondain commented 5 years ago

I'm using a forked / modified version of your code and while I've had success with Chrome 73; I cannot get beyond this ProtocolViolation in Firefox 66. I've searched around the web and I'm coming up with no real clues as to why this happens and any ideas you may have would be super. I can supply more debugging information if needed, but to start, here is the offer from FF:

v=0
o=2 8246836251515058280 0 IN IP4 0.0.0.0
s=-
t=0 0
a=group:BUNDLE 0 1 2
a=fingerprint:sha-256 E8:2B:34:B8:1F:04:33:78:E7:BF:C2:F9:DA:3D:ED:99:37:17:A8:DC:61:F7:1F:A1:54:1A:2D:B6:B7:EC:C5:FC
a=ice-options:trickle
m=audio 9 UDP/TLS/RTP/SAVPF 109 9 0 8 101
c=IN IP4 0.0.0.0
b=AS:50
a=sendrecv
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2/recvonly urn:ietf:params:rtp-hdrext:csrc-audio-level
a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid
a=fmtp:109 maxplaybackrate=48000;stereo=1;useinbandfec=1
a=fmtp:101 0-15
a=ice-pwd:30f36fc88ba01471fdbe49cec57b936f
a=ice-ufrag:e868dc76
a=mid:0
a=msid:{443a5911-c45b-4c83-87fe-37c3c842a1fc} {58abd10f-f65c-4de8-9e9e-dd6463e61551}
a=rtcp-mux
a=rtpmap:109 opus/48000/2
a=rtpmap:9 G722/8000/1
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000/1
a=setup:actpass
a=ssrc:1136541932 cname:{5b603705-00e8-4ead-a12d-bf7e2c3922d9}
m=video 9 UDP/TLS/RTP/SAVPF 120 121 126 97
c=IN IP4 0.0.0.0
b=AS:256
a=sendrecv
a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:4 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:5 urn:ietf:params:rtp-hdrext:toffset
a=fmtp:126 profile-level-id=42e01f;level-asymmetry-allowed=1;packetization-mode=1
a=fmtp:97 profile-level-id=42e01f;level-asymmetry-allowed=1
a=fmtp:120 max-fs=12288;max-fr=60
a=fmtp:121 max-fs=12288;max-fr=60
a=ice-pwd:30f36fc88ba01471fdbe49cec57b936f
a=ice-ufrag:e868dc76
a=mid:1
a=msid:{443a5911-c45b-4c83-87fe-37c3c842a1fc} {52621f91-860e-47e7-8113-b30def75f423}
a=rtcp-fb:120 nack
a=rtcp-fb:120 nack pli
a=rtcp-fb:120 ccm fir
a=rtcp-fb:120 ccm tmmbr
a=rtcp-fb:120 goog-remb
a=rtcp-fb:121 nack
a=rtcp-fb:121 nack pli
a=rtcp-fb:121 ccm fir
a=rtcp-fb:121 ccm tmmbr
a=rtcp-fb:121 goog-remb
a=rtcp-fb:126 nack
a=rtcp-fb:126 nack pli
a=rtcp-fb:126 ccm fir
a=rtcp-fb:126 ccm tmmbr
a=rtcp-fb:126 goog-remb
a=rtcp-fb:97 nack
a=rtcp-fb:97 nack pli
a=rtcp-fb:97 ccm fir
a=rtcp-fb:97 ccm tmmbr
a=rtcp-fb:97 goog-remb
a=rtcp-mux
a=rtpmap:120 VP8/90000
a=rtpmap:121 VP9/90000
a=rtpmap:126 H264/90000
a=rtpmap:97 H264/90000
a=setup:actpass
a=ssrc:2863820055 cname:{5b603705-00e8-4ead-a12d-bf7e2c3922d9}
m=application 5000 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=sendrecv
a=ice-pwd:30f36fc88ba01471fdbe49cec57b936f
a=ice-ufrag:e868dc76
a=mid:2
a=setup:actpass
a=sctp-port:5000
a=max-message-size:1073741823

And the answer from the server:

v=0
o=red5pro_pub-1554410185657 5156885296754 1 IN IP4 0.0.0.0
s=-
t=0 0
a=msid-semantic:WMS *
a=group:BUNDLE 0 1 2
a=ice-options:trickle
m=audio 9 UDP/TLS/RTP/SAVPF 109
c=IN IP4 x.x.x.x
b=AS:50
a=rtpmap:109 opus/48000/2
a=ice-ufrag:aoak51d7l12apm
a=ice-pwd:7ahb4jilf3vsk7h0f61hvccje7
a=fingerprint:sha-256 C3:BC:3D:3C:A3:EB:8C:FE:96:C2:63:8A:51:55:C0:D4:38:A3:E4:73:F7:3F:51:84:AE:DC:E8:57:D5:43:65:7B
a=setup:passive
a=mid:0
a=recvonly
a=rtcp-mux
a=fmtp:109 minptime=10;useinbandfec=0;cbr=1
m=video 9 UDP/TLS/RTP/SAVPF 126
c=IN IP4 x.x.x.x
b=AS:256
a=fmtp:126 profile-level-id=42e01f;level-asymmetry-allowed=1;packetization-mode=1
a=rtpmap:126 H264/90000
a=ice-ufrag:aoak51d7l12apm
a=ice-pwd:7ahb4jilf3vsk7h0f61hvccje7
a=fingerprint:sha-256 C3:BC:3D:3C:A3:EB:8C:FE:96:C2:63:8A:51:55:C0:D4:38:A3:E4:73:F7:3F:51:84:AE:DC:E8:57:D5:43:65:7B
a=setup:passive
a=mid:1
a=recvonly
a=rtcp-mux
a=rtcp-fb:126 nack
a=rtcp-fb:126 nack pli
a=rtcp-fb:126 goog-remb
a=rtcp-fb:126 ccm tmmbr
a=fmtp:126 max-fs=12288
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 x.x.x.x
a=ice-ufrag:aoak51d7l12apm
a=ice-pwd:7ahb4jilf3vsk7h0f61hvccje7
a=fingerprint:sha-256 C3:BC:3D:3C:A3:EB:8C:FE:96:C2:63:8A:51:55:C0:D4:38:A3:E4:73:F7:3F:51:84:AE:DC:E8:57:D5:43:65:7B
a=setup:passive
a=mid:2
a=sendrecv
a=sctp-port:5000
steely-glint commented 4 years ago

Sorry, this is an old branch. I'll update it.

steely-glint commented 4 years ago

I've done an update - I had a lot on internal stuff I pushed public. This version does work firefox for us. Let me know how you get on.

Any PRs are super welcome!

steely-glint commented 4 years ago

Incedentally I think the problem was that it assumed the wrong role.

mondain commented 4 years ago

I'm gonna do my best to get you a PR, it's only fair since your code saved me a good amount of time. Being a maintainer of open source, I'm not too used to being on this end of the equation.