Session description is NULL

Hi,
I’ve got a problem when trying to set a remote description. I get SessionDescription is Null exception. I am 100% positive that the message is not null. From what I’ve researched it is a problem with the SDP message, but I cannot figure out what is wrong.
My only guess is that some messages look like a=null or a=. I could remove them from the SDP, but what about cases like m=null 1 RTP/AVPF null or a=fmtp:111 minptime= null; useinbandfec= null should I remove them entirely?
If there are some rules to creating sdp let me know.
There are 2 sdps that I’m trying to set as a remote description.

v=0
o=- 1599645812365 2 IN IP4 0.0.0.0
s=-
t=0 0
a=group:BUNDLE audio video
a=null
a=null
m=
c=IN IP4 0.0.0.0
a=rtcp:1 IN IP4 0.0.0.0
a=mid:audio
a=null
m=null 1 RTP/AVPF null
c=IN IP4 0.0.0.0
a=rtcp:1 IN IP4 0.0.0.0
a=mid:video
m=audio 1 RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126
c=IN IP4 0.0.0.0
a=rtpmap:111 opus/48000/2
a=rtpmap:103 ISAC/16000/1
a=rtpmap:104 ISAC/32000/1
a=rtpmap:9 G722/8000/1
a=rtpmap:0 PCMU/8000/1
a=rtpmap:8 PCMA/8000/1
a=rtpmap:106 CN/32000/1
a=rtpmap:105 CN/16000/1
a=rtpmap:13 CN/8000/1
a=rtpmap:110 telephone-event/48000/1
a=rtpmap:112 telephone-event/32000/1
a=rtpmap:113 telephone-event/16000/1
a=rtpmap:126 telephone-event/8000/1
a=fmtp:111 minptime= null; useinbandfec= null
a=rtcp:1 IN IP4 0.0.0.0
a=rtcp-fb:111 transport-cc
a=rtcp-fb:* transport-cc
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
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=setup:actpass
a=mid:audio
a=sendrecv
a=ice-ufrag:9pcU
a=fingerprint:sha-256 B2:A7:42:0D:39:89:8C:FE:21:9B:8B:4E:78:53:DA:2A:DF:B2:ED:FD:D6:CE:2D:63:B6:5C:42:C4:BA:16:F1:51
a=candidate:1514567149 1 udp 2122260223 192.168.0.162 63402 typ host generation 0
a=ssrc:2356578568 cname:etiJo6PeeabKxu11-5
a=ssrc:2356578568 msid:8aa6ace8-e701-4d28-b33e-4c948b9ec024-5 2c1b5dce-924b-4661-b01d-af3c33762680-5
a=ssrc:2356578568 mslabel:8aa6ace8-e701-4d28-b33e-4c948b9ec024-5
a=ssrc:2356578568 label:2c1b5dce-924b-4661-b01d-af3c33762680-5
a=rtcp-mux
a=null
m=video 1 RTP/SAVPF 102 96 97 98 99 100 101 122 121 127 120 125 107 108 109 124 119 123
c=IN IP4 0.0.0.0
a=rtpmap:102 H264/90000/1
a=rtpmap:96 VP8/90000/1
a=rtpmap:97 rtx/90000/1
a=rtpmap:98 VP9/90000/1
a=rtpmap:99 rtx/90000/1
a=rtpmap:100 VP9/90000/1
a=rtpmap:101 rtx/90000/1
a=rtpmap:122 VP9/90000/1
a=rtpmap:121 rtx/90000/1
a=rtpmap:127 H264/90000/1
a=rtpmap:120 rtx/90000/1
a=rtpmap:125 H264/90000/1
a=rtpmap:107 rtx/90000/1
a=rtpmap:108 H264/90000/1
a=rtpmap:109 rtx/90000/1
a=rtpmap:124 red/90000/1
a=rtpmap:119 rtx/90000/1
a=rtpmap:123 ulpfec/90000/1
a=fmtp:102 level-asymmetry-allowed= null; packetization-mode= null; profile-level-id= null
a=fmtp:97 apt= null
a=fmtp:98 profile-id= null
a=fmtp:99 apt= null
a=fmtp:100 profile-id= null
a=fmtp:101 apt= null
a=fmtp:122 profile-id= null
a=fmtp:121 apt= null
a=fmtp:127 level-asymmetry-allowed= null; packetization-mode= null; profile-level-id= null
a=fmtp:120 apt= null
a=fmtp:125 level-asymmetry-allowed= null; packetization-mode= null; profile-level-id= null
a=fmtp:107 apt= null
a=fmtp:108 level-asymmetry-allowed= null; packetization-mode= null; profile-level-id= null
a=fmtp:109 apt= null
a=fmtp:119 apt= null
a=rtcp:1 IN IP4 0.0.0.0
a=rtcp-fb:102 goog-remb
a=rtcp-fb:102 transport-cc
a=rtcp-fb:102 ccm fir
a=rtcp-fb:102 nack
a=rtcp-fb:102 nack pli
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=rtcp-fb:122 goog-remb
a=rtcp-fb:122 transport-cc
a=rtcp-fb:122 ccm fir
a=rtcp-fb:122 nack
a=rtcp-fb:122 nack pli
a=rtcp-fb:127 goog-remb
a=rtcp-fb:127 transport-cc
a=rtcp-fb:127 ccm fir
a=rtcp-fb:127 nack
a=rtcp-fb:127 nack pli
a=rtcp-fb:125 goog-remb
a=rtcp-fb:125 transport-cc
a=rtcp-fb:125 ccm fir
a=rtcp-fb:125 nack
a=rtcp-fb:125 nack pli
a=rtcp-fb:108 goog-remb
a=rtcp-fb:108 transport-cc
a=rtcp-fb:108 ccm fir
a=rtcp-fb:108 nack
a=rtcp-fb:108 nack pli
a=rtcp-fb:* goog-remb
a=rtcp-fb:* transport-cc
a=rtcp-fb:* ccm fir
a=rtcp-fb:* nack
a=rtcp-fb:* nack pli
a=rtcp-fb:* goog-remb
a=rtcp-fb:* transport-cc
a=rtcp-fb:* ccm fir
a=rtcp-fb:* nack
a=rtcp-fb:* nack pli
a=rtcp-fb:* goog-remb
a=rtcp-fb:* transport-cc
a=rtcp-fb:* ccm fir
a=rtcp-fb:* nack
a=rtcp-fb:* nack pli
a=rtcp-fb:* goog-remb
a=rtcp-fb:* transport-cc
a=rtcp-fb:* ccm fir
a=rtcp-fb:* nack
a=rtcp-fb:* nack pli
a=rtcp-fb:* goog-remb
a=rtcp-fb:* transport-cc
a=rtcp-fb:* ccm fir
a=rtcp-fb:* nack
a=rtcp-fb:* nack pli
a=rtcp-fb:* goog-remb
a=rtcp-fb:* transport-cc
a=rtcp-fb:* ccm fir
a=rtcp-fb:* nack
a=rtcp-fb:* nack pli
a=rtcp-fb:* goog-remb
a=rtcp-fb:* transport-cc
a=rtcp-fb:* ccm fir
a=rtcp-fb:* nack
a=rtcp-fb:* nack pli
a=rtcp-fb:* goog-remb
a=rtcp-fb:* transport-cc
a=rtcp-fb:* ccm fir
a=rtcp-fb:* nack
a=rtcp-fb:* nack pli
a=extmap:14 urn:ietf:params:rtp-hdrext:toffset
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:13 urn:3gpp:video-orientation
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space
a=setup:actpass
a=mid:video
a=sendrecv
a=ice-ufrag:9pcU
a=fingerprint:sha-256 B2:A7:42:0D:39:89:8C:FE:21:9B:8B:4E:78:53:DA:2A:DF:B2:ED:FD:D6:CE:2D:63:B6:5C:42:C4:BA:16:F1:51
a=rtcp-mux
a=null

v=0
o=- 1599656604280 2 IN IP4 0.0.0.0
s=-
t=0 0
a=group:BUNDLE audio video
a=null
a=null
m=
c=IN IP4 0.0.0.0
a=rtpmap:111 opus/48000/2
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:126 telephone-event/8000
a=fmtp:111 minptime= null; useinbandfec= null
a=rtcp:1 IN IP4 0.0.0.0
a=rtcp-fb:111 transport-cc
a=rtcp-fb:* transport-cc
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=setup:actpass
a=mid:audio
a=sendrecv
a=ice-ufrag:6gfk31ehpf9l4n
a=fingerprint:sha-256 A3:EC:3E:18:7F:41:5A:7A:C5:5E:B0:52:64:1A:8C:5D:7A:41:1F:B5:68:39:41:AC:3A:12:32:8B:BA:50:93:AA
a=candidate:1 1 udp 2130706431 172.31.34.3 10000 typ host generation 0
a=candidate:2 1 udp 1694498815 3.127.9.112 10000 typ srflx raddr 172.31.34.3 rport 10000 generation 0
a=ssrc:1254790540 cname:mixed
a=ssrc:1254790540 label:mixedlabelaudio0
a=ssrc:1254790540 msid:mixedmslabel mixedlabelaudio0
a=ssrc:1254790540 mslabel:mixedmslabel
a=ssrc:3051793926 cname:eti8IuZ8VuUSXV21-18
a=ssrc:3051793926 msid:8aa6ace8-e701-4d28-b33e-4c948b9ec024-18 2c1b5dce-924b-4661-b01d-af3c33762680-18
a=rtcp-mux
a=null
a=null
m=video 1 RTP/SAVPF 107 100 101
c=IN IP4 0.0.0.0
a=rtpmap:100 VP8/90000
a=rtpmap:107 H264/90000
a=rtpmap:101 VP9/90000
a=fmtp:100 x-google-start-bitrate= null
a=fmtp:107 x-google-start-bitrate= null; profile-level-id= null
a=fmtp:101 x-google-start-bitrate= null
a=rtcp:1 IN IP4 0.0.0.0
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=rtcp-fb:100 transport-cc
a=rtcp-fb:107 ccm fir
a=rtcp-fb:107 nack
a=rtcp-fb:107 nack pli
a=rtcp-fb:107 transport-cc
a=rtcp-fb:101 ccm fir
a=rtcp-fb:101 nack
a=rtcp-fb:101 nack pli
a=rtcp-fb:101 transport-cc
a=rtcp-fb:* ccm fir
a=rtcp-fb:* nack
a=rtcp-fb:* nack pli
a=rtcp-fb:* transport-cc
a=rtcp-fb:* ccm fir
a=rtcp-fb:* nack
a=rtcp-fb:* nack pli
a=rtcp-fb:* transport-cc
a=rtcp-fb:* ccm fir
a=rtcp-fb:* nack
a=rtcp-fb:* nack pli
a=rtcp-fb:* transport-cc
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=setup:actpass
a=mid:video
a=sendrecv
a=ice-ufrag:6gfk31ehpf9l4n
a=fingerprint:sha-256 A3:EC:3E:18:7F:41:5A:7A:C5:5E:B0:52:64:1A:8C:5D:7A:41:1F:B5:68:39:41:AC:3A:12:32:8B:BA:50:93:AA
a=candidate:1 1 udp 2130706431 172.31.34.3 10000 typ host generation 0
a=candidate:2 1 udp 1694498815 3.127.9.112 10000 typ srflx raddr 172.31.34.3 rport 10000 generation 0
a=ssrc:1679656930 cname:mixed
a=ssrc:1679656930 label:mixedlabelvideo0
a=ssrc:1679656930 msid:mixedmslabel mixedlabelvideo0
a=ssrc:1679656930 mslabel:mixedmslabel
a=rtcp-mux
a=null
m=null 1 RTP/AVPF null
c=IN IP4 0.0.0.0
a=rtcp:1 IN IP4 0.0.0.0
a=mid:audio
m=null 1 RTP/AVPF null
c=IN IP4 0.0.0.0
a=rtcp:1 IN IP4 0.0.0.0
a=mid:video

@damencho @saghul can you give any tips what can be wrong ?

The SDP is all kinds of wrong. The media types are missing in the RTP/APVF lines, a=null is just nothing, and there are a few m= empty lines. Whatever is generating that SDP is doing it wrong.

@saghul Do you have some validator that can help me fix this? Some examples would be helpful, at least for comparing. Or some type of instruction for creating SDP ?
In SDP.jingle2media I get sometimes null description that’s why this
m=null 1 RTP/AVPF null
c=IN IP4 0.0.0.0
a=rtcp:1 IN IP4 0.0.0.0
a=mid:audio
looks like because let tmp = { media: desc.attr('media') }; gets null for ‘media’ and at that point I’am not sure if I should include this or not.

You can use these tests as a base: https://github.com/jitsi/lib-jitsi-meet/blob/master/modules/xmpp/SDP.spec.js

@saghul This test helped me fix this issue, but unfortunatelly I got another one.
Could you take a look at it ? It says that Unable to RTCPeerConnection::setLocalDescription: Failed to set local answer sdp: The order of m-lines in answer doesn't match order in offer. Rejecting answer.
I tried to remove some modifications done in TreacablePeerConnection, but then is said LocalDescription is NULL, so I sticked to the original message.

Here is SDP from setRemoteDescription
v=0
o=- 1601289967396 2 IN IP4 0.0.0.0
s=-
t=0 0
a=group:BUNDLE audio video
m=audio 1 RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126
c=IN IP4 0.0.0.0
a=rtpmap:111 opus/48000/2
a=rtpmap:103 ISAC/16000/1
a=rtpmap:104 ISAC/32000/1
a=rtpmap:9 G722/8000/1
a=rtpmap:0 PCMU/8000/1
a=rtpmap:8 PCMA/8000/1
a=rtpmap:106 CN/32000/1
a=rtpmap:105 CN/16000/1
a=rtpmap:13 CN/8000/1
a=rtpmap:110 telephone-event/48000/1
a=rtpmap:112 telephone-event/32000/1
a=rtpmap:113 telephone-event/16000/1
a=rtpmap:126 telephone-event/8000/1
a=fmtp:111 minptime=10; useinbandfec=1
a=rtcp:1 IN IP4 0.0.0.0
a=rtcp-fb:111 transport-cc
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
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=setup:actpass
a=mid:audio
a=sendrecv
a=ice-ufrag:O0S0
a=ice-pwd:ERqlakWXxpACHAdNLSMfuE1Q
a=fingerprint:sha-256 A6:82:57:86:88:14:23:BA:EE:AE:75:5B:85:80:BA:D2:F9:FD:33:CD:64:9A:AB:44:51:C9:4D:DC:59:EE:F5:BC
a=ssrc:1401893411 cname:FWy8njSgZ767f1WQ-2
a=ssrc:1401893411 msid:00e6379f-3220-4af0-9c23-db37b4de98d8-2 e31ea1d5-78ac-4cbe-a5f9-505f8b2bd045-2
a=ssrc:1401893411 mslabel:00e6379f-3220-4af0-9c23-db37b4de98d8-2
a=ssrc:1401893411 label:e31ea1d5-78ac-4cbe-a5f9-505f8b2bd045-2
a=rtcp-mux
m=video 1 RTP/SAVPF 96 97 98 99 100 101 122 124 119 123
c=IN IP4 0.0.0.0
a=rtpmap:96 VP8/90000/1
a=rtpmap:97 rtx/90000/1
a=rtpmap:98 VP9/90000/1
a=rtpmap:99 rtx/90000/1
a=rtpmap:100 VP9/90000/1
a=rtpmap:101 rtx/90000/1
a=rtpmap:122 VP9/90000/1
a=rtpmap:124 red/90000/1
a=rtpmap:119 rtx/90000/1
a=rtpmap:123 ulpfec/90000/1
a=fmtp:97 apt=96
a=fmtp:98 profile-id=0
a=fmtp:99 apt=98
a=fmtp:100 profile-id=2
a=fmtp:101 apt=100
a=fmtp:122 profile-id=1
a=fmtp:119 apt=124
a=rtcp:1 IN IP4 0.0.0.0
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=rtcp-fb:122 goog-remb
a=rtcp-fb:122 transport-cc
a=rtcp-fb:122 ccm fir
a=rtcp-fb:122 nack
a=rtcp-fb:122 nack pli
a=extmap:14 urn:ietf:params:rtp-hdrext:toffset
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:13 urn:3gpp:video-orientation
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space
a=setup:actpass
a=mid:video
a=sendrecv
a=ice-ufrag:O0S0
a=ice-pwd:ERqlakWXxpACHAdNLSMfuE1Q
a=fingerprint:sha-256 A6:82:57:86:88:14:23:BA:EE:AE:75:5B:85:80:BA:D2:F9:FD:33:CD:64:9A:AB:44:51:C9:4D:DC:59:EE:F5:BC
a=rtcp-mux

SDP from createAnswer
v=0
o=- 8283801939805923825 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
a=msid-semantic: WMS
m=audio 9 RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:lSNf
a=ice-pwd:+eqH10xGUZddm5zflgEfZ0QS
a=ice-options:trickle renomination
a=fingerprint:sha-256 AC:9E:49:DD:8D:8E:2D:9D:92:2D:32:5C:EC:44:9F:4F:D1:69:34:C2:50:28:37:72:83:0B:7E:C4:5B:FF:65:58
a=setup:active
a=mid:audio
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=recvonly
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
m=video 9 RTP/SAVPF 96 97 98 99 124 119 123
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:lSNf
a=ice-pwd:+eqH10xGUZddm5zflgEfZ0QS
a=ice-options:trickle renomination
a=fingerprint:sha-256 AC:9E:49:DD:8D:8E:2D:9D:92:2D:32:5C:EC:44:9F:4F:D1:69:34:C2:50:28:37:72:83:0B:7E:C4:5B:FF:65:58
a=setup:active
a=mid:video
a=extmap:14 urn:ietf:params:rtp-hdrext:toffset
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:13 urn:3gpp:video-orientation
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space
a=recvonly
a=rtcp-mux
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:98 VP9/90000
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:124 red/90000
a=rtpmap:119 rtx/90000
a=fmtp:119 apt=124
a=rtpmap:123 ulpfec/90000

And the last from setLocalDescription
v=0
o=- 8283801939805923825 2 IN IP4 127.0.0.1
s=-
c=IN IP4 0.0.0.0
t=0 0
a=rtpmap:111 opus/48000/2
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
a=rtpmap:96 VP8/90000
a=rtpmap:97 rtx/90000
a=rtpmap:98 VP9/90000
a=rtpmap:99 rtx/90000
a=rtpmap:124 red/90000
a=rtpmap:119 rtx/90000
a=rtpmap:123 ulpfec/90000
a=fmtp:111 minptime=10;useinbandfec=1
a=fmtp:97 apt=96
a=fmtp:99 apt=98
a=fmtp:119 apt=124
a=rtcp:9 IN IP4 0.0.0.0
a=rtcp-fb:111 transport-cc
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:14 urn:ietf:params:rtp-hdrext:toffset
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:13 urn:3gpp:video-orientation
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space
a=setup:active
a=mid:video
a=recvonly
a=ice-ufrag:lSNf
a=ice-pwd:+eqH10xGUZddm5zflgEfZ0QS
a=fingerprint:sha-256 AC:9E:49:DD:8D:8E:2D:9D:92:2D:32:5C:EC:44:9F:4F:D1:69:34:C2:50:28:37:72:83:0B:7E:C4:5B:FF:65:58
a=ice-options:trickle
a=msid-semantic: WMS
a=group:BUNDLE audio video
a=group:BUNDLE audio video
a=rtcp-mux

Solved it!
The SDP from setLocalDescription was faulty. I had to remove a few lines in TraceablePeerConnection.setLocalDescriptiont to make it work.