iOS Latest framework issue: SessionDescription is NULL.

1,211 views
Skip to first unread message

Saurabh Dwivedi

unread,
Dec 1, 2016, 8:22:05 AM12/1/16
to discuss-webrtc
On iOS latest webRTC checkout code  framework output, we are getting error on calling "setLocalDescription" API with error message "Error Domain=org.webrtc.RTCPeerConnection Code=-1 "SessionDescription is NULL." UserInfo={NSLocalizedDescription=SessionDescription is NULL.}".

On goggling this issue. Other people are also facing similar issue. According to discussion their is an issue in parsing of RTCSessionDescription
https://github.com/Anakros/WebRTC/issues/8/

Also in latest version many API is altered. It will be better to update Sample App for iOS with new API's


API:
- (void)setLocalDescription:(RTCSessionDescription *)sdp
          completionHandler:
    (nullable void (^)(NSError * _Nullable error))completionHandler;
    
API Called:
//To init SDP
(instancetype)initWithType:(RTCSdpType)type sdp:(NSString *)sdp
//To setLocalDescription
- (void)setLocalDescription:(RTCSessionDescription *)sdp
          completionHandler:
    (nullable void (^)(NSError * _Nullable error))completionHandler;

    
    
Output:
Error: "Error Domain=org.webrtc.RTCPeerConnection Code=-1 "SessionDescription is NULL." UserInfo={NSLocalizedDescription=SessionDescription is NULL.}"

Input:    
SDP Data:
Printing description of rtcDesc:
RTCSessionDescription:
offer
RTCSessionDescription:
offer
v=0

o=- 2450450237825616902 2 IN IP4 127.0.0.1

s=-

t=0 0

a=group:BUNDLE audio

a=msid-semantic: WMS B43EE499-9B5A-42DD-A437-4CAE04E6D1C5

m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 126

c=IN IP4 0.0.0.0

a=rtcp:9 IN IP4 0.0.0.0

a=ice-ufrag:yd81

a=ice-pwd:zBEGCdaF7hAa+X+HOIqeof7a

a=fingerprint:sha-256 E0:47:FB:AC:21:98:07:16:AB:C0:07:F5:9D:76:42:D9:BF:2A:E8:FC:AD:85:68:B0:85:AC:D0:74:8A:39:9E:0C

a=setup:actpass

a=mid:audio

a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level

a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time

a=sendrecv

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:102 ILBC/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:126 telephone-event/8000

a=ssrc:766312134 cname:07fh/3TYR402or4P

a=ssrc:766312134 msid:B43EE499-9B5A-42DD-A437-4CAE04E6D1C5 0933F041-E98A-4054-BDA4-57CC84069256

a=ssrc:766312134 mslabel:B43EE499-9B5A-42DD-A437-4CAE04E6D1C5

a=ssrc:766312134 label:0933F041-E98A-4054-BDA4-57CC84069256

Taylor Brandstetter

unread,
Dec 1, 2016, 1:09:37 PM12/1/16
to discuss...@googlegroups.com
We should definitely provide a better error when this happens, but it seems likely to be an SDP parsing issue. Are you able to get a native WebRTC log?

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/1fbc2f68-ec58-449d-87f2-614b17a1d249%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alvaro Gil

unread,
Dec 1, 2016, 1:14:59 PM12/1/16
to discuss...@googlegroups.com
Notice that description method add a Text header to the sdp, use sdp method to get plain sdp text. Provably you are "hacking" the sdp using description instead of sdp method, then the resultant session will fail.

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
--
Sent from Gmail Mobile

jo...@socialive.us

unread,
Dec 12, 2018, 3:46:15 AM12/12/18
to discuss-webrtc
This was my issue was well. After checking the sdp, I saw it was not only the sdp but other key/values as well. I isolated the sdp, and composed the RTCSessionDescription
No error.

Sunil Yadav

unread,
Jan 21, 2020, 5:54:55 AM1/21/20
to discuss-webrtc
It is not working for me. How You did it? Could you please let me know?
Reply all
Reply to author
Forward
0 new messages