Closed Bug 1427341 Opened 7 years ago Closed 7 years ago

ICE failed when answer a webrtc offer

Categories

(Core :: WebRTC: Signaling, defect)

57 Branch
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: toddwong, Unassigned)

Details

(Whiteboard: [need info drno 2018-01-12])

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36 Steps to reproduce: The code below end up with "ICE failed, add a TURN server and see about:webrtc for more details", and the log says something like "received no media stream attributes". var configuration = {"iceServers": [{"urls": ["stun:stun.l.google.com:19302"]}]}; var pc2 = new RTCPeerConnection(configuration); pc2.createOffer({offerToReceiveAudio: 1}).then(function (desc) { console.log("offer: \n", desc.sdp); var pc = new RTCPeerConnection(configuration, constraints); pc.setRemoteDescription(desc); pc.createAnswer().then(function (answer) { pc.setLocalDescription(answer); }); }); Actual results: Console says "ICE failed, add a TURN server and see about:webrtc for more details", and the about:webrtc Connection Log says: (ice/WARNING) ICE(PC:1514529699189000 (id=4294967350 url=http://192.168.13.23:8778/index.html)): peer (PC:1514529699189000 (id=4294967350 url=http://192.168.13.23:8778/index.html):default) has no stream matching stream 0-1514529699189000 (id=4294967350 url=http://192.168.13.23:8778/index.html) aLevel=0 (generic/EMERG) Exit UDP socket connected (generic/ERR) UDP socket error:Internal error at z:/build/build/src/dom/network/UDPSocketParent.cpp:283 this=0000021E4B6F5400 (ice/ERR) ICE(PC:1514529699189000 (id=4294967350 url=http://192.168.13.23:8778/index.html)): peer (PC:1514529699189000 (id=4294967350 url=http://192.168.13.23:8778/index.html):default) received no media stream attributes +++++++ END ++++++++ Expected results: No error and ice candidates begin to gather
Component: Untriaged → WebRTC
Product: Firefox → Core
Can you please check that issue for me?
Flags: needinfo?(drno)
Whiteboard: [need info drno 2018-01-12]
Component: WebRTC → WebRTC: Signaling
Todd, the code you provided does not exchange ICE candidates. You need to write code to exchange ICE candidates as Firefox will trickle ICE candidates. Please take a look at https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/onicecandidate and https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/addIceCandidate I'm going to close this as with the provided information this appears to be not a bug in Firefox. Feel free to re-open this bug if there is more information pointing to an actual bug in Firefox.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Flags: needinfo?(drno)
Resolution: --- → INVALID
Nils, the "icecandidate" event on pc just triggered once, with null "candidate" property. And a red line of text with an error icon printed in the console, says "ICE failed, add a TURN server and see about:webrtc for more details". When the same code runs on Edge or Chrome, "icecandidate" event triggers 3 times (only the last one with null "candidate" property).
Same issue here ... pls Support (registry/INFO) insert 'ice' (registry) succeeded: ice (registry/INFO) insert 'ice.pref' (registry) succeeded: ice.pref (registry/INFO) insert 'ice.pref.type' (registry) succeeded: ice.pref.type (registry/INFO) insert 'ice.pref.type.srv_rflx' (UCHAR) succeeded: 0x64 (registry/INFO) insert 'ice.pref.type.peer_rflx' (UCHAR) succeeded: 0x6e (registry/INFO) insert 'ice.pref.type.host' (UCHAR) succeeded: 0x7e (registry/INFO) insert 'ice.pref.type.relayed' (UCHAR) succeeded: 0x05 (registry/INFO) insert 'ice.pref.type.srv_rflx_tcp' (UCHAR) succeeded: 0x63 (registry/INFO) insert 'ice.pref.type.peer_rflx_tcp' (UCHAR) succeeded: 0x6d (registry/INFO) insert 'ice.pref.type.host_tcp' (UCHAR) succeeded: 0x7d (registry/INFO) insert 'ice.pref.type.relayed_tcp' (UCHAR) succeeded: 0x00 (registry/INFO) insert 'stun' (registry) succeeded: stun (registry/INFO) insert 'stun.client' (registry) succeeded: stun.client (registry/INFO) insert 'stun.client.maximum_transmits' (UINT4) succeeded: 7 (registry/INFO) insert 'ice.trickle_grace_period' (UINT4) succeeded: 5000 (registry/INFO) insert 'ice.tcp' (registry) succeeded: ice.tcp (registry/INFO) insert 'ice.tcp.so_sock_count' (INT4) succeeded: 0 (registry/INFO) insert 'ice.tcp.listen_backlog' (INT4) succeeded: 10 (registry/INFO) insert 'ice.tcp.disable' (char) succeeded: \000 (ice/WARNING) ICE(PC:1542274925486000 (id=2147483652 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen)): relay only option results in no host candidate for IP4:192.168.0.35:0/UDP (ice/WARNING) ICE(PC:1542274925486000 (id=2147483652 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen)): relay/proxy only option results in ICE TCP being disabled (ice/NOTICE) ICE(PC:1542274925486000 (id=2147483652 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen)): peer (PC:1542274925486000 (id=2147483652 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen):default) no streams with non-empty check lists (ice/NOTICE) ICE(PC:1542274925486000 (id=2147483652 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen)): peer (PC:1542274925486000 (id=2147483652 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen):default) no streams with pre-answer requests (ice/NOTICE) ICE(PC:1542274925486000 (id=2147483652 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen)): peer (PC:1542274925486000 (id=2147483652 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen):default) no checks to start (stun/INFO) STUN-CLIENT(relay(IP4:192.168.0.35:55889/UDP|numb.viagenie.ca:3478)::TURN): Received response; processing (stun/WARNING) STUN-CLIENT(relay(IP4:192.168.0.35:55889/UDP|numb.viagenie.ca:3478)::TURN): Error processing response: Retry may be possible, stun error code 401. (ice/NOTICE) ICE(PC:1542274925486000 (id=2147483652 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen)): Message does not correspond to any registered stun ctx (ice/NOTICE) ICE(PC:1542274925486000 (id=2147483652 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen)): Message does not correspond to any registered stun ctx (stun/INFO) STUN-CLIENT(relay(IP4:192.168.0.35:55889/UDP|numb.viagenie.ca:3478)::TURN): Received response; processing (stun/WARNING) STUN-CLIENT(relay(IP4:192.168.0.35:55889/UDP|numb.viagenie.ca:3478)::TURN): Error processing response: Retry may be possible, stun error code 401. (turn/WARNING) TURN(relay(IP4:192.168.0.35:55889/UDP|numb.viagenie.ca:3478)): Exceeded the number of retries (turn/WARNING) TURN(relay(IP4:192.168.0.35:55889/UDP|numb.viagenie.ca:3478)): mode 20, nr_turn_client_error_cb (turn/WARNING) TURN(relay(IP4:192.168.0.35:55889/UDP|numb.viagenie.ca:3478)) failed (turn/INFO) TURN(relay(IP4:192.168.0.35:55889/UDP|numb.viagenie.ca:3478)): cancelling (turn/WARNING) ICE-CANDIDATE(relay(IP4:192.168.0.35:55889/UDP|numb.viagenie.ca:3478)): nr_turn_allocated_cb called with state 4 (turn/WARNING) ICE-CANDIDATE(relay(IP4:192.168.0.35:55889/UDP|numb.viagenie.ca:3478)): nr_turn_allocated_cb failed (ice/NOTICE) ICE(PC:1542274925486000 (id=2147483652 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen)): Message does not correspond to any registered stun ctx (ice/NOTICE) ICE(PC:1542274925486000 (id=2147483652 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen)): Message does not correspond to any registered stun ctx (ice/WARNING) ICE(PC:1542274925486000 (id=2147483652 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen)): local addresses already set, no work to do (ice/NOTICE) ICE(PC:1542274925486000 (id=2147483652 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen)): peer (PC:1542274925486000 (id=2147483652 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen):default) no streams with non-empty check lists (ice/NOTICE) ICE(PC:1542274925486000 (id=2147483652 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen)): peer (PC:1542274925486000 (id=2147483652 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen):default) no streams with pre-answer requests (ice/NOTICE) ICE(PC:1542274925486000 (id=2147483652 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen)): peer (PC:1542274925486000 (id=2147483652 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen):default) no checks to start (ice/WARNING) ICE(PC:1542276072134000 (id=2147483655 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen)): relay only option results in no host candidate for IP4:192.168.0.35:0/UDP (ice/WARNING) ICE(PC:1542276072134000 (id=2147483655 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen)): relay/proxy only option results in ICE TCP being disabled (ice/WARNING) ICE(PC:1542276072134000 (id=2147483655 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen)): relay only option results in no host candidate for IP4:192.168.0.35:0/UDP (ice/WARNING) ICE(PC:1542276072134000 (id=2147483655 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen)): relay/proxy only option results in ICE TCP being disabled (ice/WARNING) ICE(PC:1542276072134000 (id=2147483655 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen)): relay only option results in no host candidate for IP4:192.168.0.35:0/UDP (ice/WARNING) ICE(PC:1542276072134000 (id=2147483655 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen)): relay/proxy only option results in ICE TCP being disabled (ice/WARNING) ICE(PC:1542276072134000 (id=2147483655 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen)): relay only option results in no host candidate for IP4:192.168.0.35:0/UDP (ice/WARNING) ICE(PC:1542276072134000 (id=2147483655 url=https://mytest-d5f4c.firebaseapp.com/?id=Alen)): relay/proxy only option results in ICE TCP being disabled (stun/INFO) STUN-CLIENT(relay(IP4:192.168.0.35:49736/UDP|numb.viagenie.ca:3478)::TURN): Received response; processing (stun/WARNING) STUN-CLIENT(relay(IP4:192.168.0.35:49736/UDP|numb.viagenie.ca:3478)::TURN): Error processing response: Retry may be possible, stun error code 401. (stun/INFO) STUN-CLIENT(relay(IP4:192.168.0.35:49737/UDP|numb.viagenie.ca:3478)::TURN): Received response; processing
Hashim, it looks like you're using "relay" as the ICE transport policy, but the TURN server doesn't like your username/password.
Changed relay to all...but still issue persists (In reply to Byron Campen [:bwc] from comment #5) > Hashim, it looks like you're using "relay" as the ICE transport policy, but > the TURN server doesn't like your username/password. What about the turn server username/password criteria...how can i vaidate it

I'm running into the same issue.

Did anyone manage to overcome this problem?

(In reply to lucasminissale from comment #7)

I'm running into the same issue.

Did anyone manage to overcome this problem?

There are lots of different reasons that ICE might fail, if you open up a new bug we can try to help you.

You need to log in before you can comment on or make changes to this bug.