webrtc icon indicating copy to clipboard operation
webrtc copied to clipboard

ICE failed on Firefox(Chrome and Safari work)

Open mantou132 opened this issue 3 years ago • 4 comments

webrtc 0.4.0 macOS 12.5.1 Firefox 106

ICE error occurs when I use Firefox to establish a WebRTC connection to the server

[2022-08-28T15:25:56Z WARN  webrtc_ice::agent::agent_internal] [controlled]: pingAllCandidates called with no candidate pairs. Connection is not possible yet.
[2022-08-28T15:25:56Z DEBUG server::voice] RTCIceCandidate { stats_id: "candidate:FIV8Qka2KodtWAZbrFe2URWWQgFgh0XN", foundation: "1709623001", priority: 1694498815, address: "43.155.95.230", protocol: Udp, port: 58096, typ: Srflx, component: 1, related_address: "0.0.0.0", related_port: 58096, tcp_type: "unspecified" }
[2022-08-28T15:25:56Z WARN  webrtc_ice::agent::agent_internal] [controlled]: pingAllCandidates called with no candidate pairs. Connection is not possible yet.
[2022-08-28T15:25:57Z WARN  webrtc_ice::agent::agent_internal] [controlled]: pingAllCandidates called with no candidate pairs. Connection is not possible yet.
[2022-08-28T15:25:57Z WARN  webrtc_ice::agent::agent_internal] [controlled]: pingAllCandidates called with no candidate pairs. Connection is not possible yet.
[2022-08-28T15:25:57Z WARN  webrtc_ice::agent::agent_internal] [controlled]: pingAllCandidates called with no candidate pairs. Connection is not possible yet.
[2022-08-28T15:25:57Z WARN  webrtc_ice::agent::agent_internal] [controlled]: pingAllCandidates called with no candidate pairs. Connection is not possible yet.
[2022-08-28T15:25:57Z WARN  webrtc_ice::agent::agent_internal] [controlled]: pingAllCandidates called with no candidate pairs. Connection is not possible yet.
[2022-08-28T15:25:58Z WARN  webrtc_ice::agent::agent_internal] [controlled]: pingAllCandidates called with no candidate pairs. Connection is not possible yet.
[2022-08-28T15:25:58Z WARN  webrtc_ice::agent::agent_internal] [controlled]: pingAllCandidates called with no candidate pairs. Connection is not possible yet.
[2022-08-28T15:25:58Z WARN  webrtc_ice::agent::agent_internal] [controlled]: pingAllCandidates called with no candidate pairs. Connection is not possible yet.
[2022-08-28T15:25:58Z WARN  webrtc_ice::agent::agent_internal] [controlled]: pingAllCandidates called with no candidate pairs. Connection is not possible yet.
[2022-08-28T15:25:58Z WARN  webrtc_ice::agent::agent_internal] [controlled]: pingAllCandidates called with no candidate pairs. Connection is not possible yet.
[2022-08-28T15:25:59Z WARN  webrtc_ice::agent::agent_internal] [controlled]: pingAllCandidates called with no candidate pairs. Connection is not possible yet.
[2022-08-28T15:25:59Z WARN  webrtc_ice::agent::agent_internal] [controlled]: pingAllCandidates called with no candidate pairs. Connection is not possible yet.

I found a similar question on pion, looking at the thread description, it seems to be a bug of pion, So is it also a problem with webrtc-rs?

mantou132 avatar Aug 28 '22 15:08 mantou132

Yes that seems likely, although I've not experienced it with Firefox myself. What kind of ICE configuration are you using(lite, UDP mux, etc.)?

k0nserv avatar Aug 29 '22 09:08 k0nserv

@k0nserv

maybe UDP

https://github.com/mantou132/nesbox/blob/master/packages/server/src/voice/mod.rs#L110-L119

mantou132 avatar Aug 29 '22 12:08 mantou132

Hmm, I'm running with UDP muxing turned on, which is probably what you want for a server anyway.

See:

  • https://docs.rs/webrtc/latest/webrtc/api/setting_engine/struct.SettingEngine.html#method.set_udp_network
  • https://docs.rs/webrtc-ice/0.6.5/webrtc_ice/udp_network/enum.UDPNetwork.html

k0nserv avatar Sep 06 '22 10:09 k0nserv

I tried Ephemeral and Muxed without effect.

It seems to be other reasons. I returned to the default settings, Firefox Log:

+++++++ BEGIN (process id 15117) ++++++++

ICE-STREAM(PC:{71c9e1ff-a724-4fbc-92d4-cbadcde46b1a} 1662504838246511 (id=53687091201 url=http://localhost:3003/room/1171) transport-id=transport_0 - ce3364db:9833c7c38d13704538567db2efd20514): Skipping STUN server because of address type mis-match

/builds/worker/checkouts/gecko/dom/media/webrtc/transport/third_party/nICEr/src/net/nr_socket_multi_tcp.c:175 function nr_socket_multi_tcp_create_stun_server_socket skipping UDP STUN server(addr:IP4:0.0.0.0:19302/UDP)

/builds/worker/checkouts/gecko/dom/media/webrtc/transport/third_party/nICEr/src/net/nr_socket_multi_tcp.c:175 function nr_socket_multi_tcp_create_stun_server_socket skipping UDP STUN server(addr:IP6:[::]:19302/UDP)

/builds/worker/checkouts/gecko/dom/media/webrtc/transport/third_party/nICEr/src/net/nr_socket_multi_tcp.c:639 function nr_socket_multi_tcp_listen failed with error 3

ICE-STREAM(PC:{71c9e1ff-a724-4fbc-92d4-cbadcde46b1a} 1662504838246511 (id=53687091201 url=http://localhost:3003/room/1171) transport-id=transport_0 - ce3364db:9833c7c38d13704538567db2efd20514): failed to create passive TCP host candidate: 3

ICE-STREAM(PC:{71c9e1ff-a724-4fbc-92d4-cbadcde46b1a} 1662504838246511 (id=53687091201 url=http://localhost:3003/room/1171) transport-id=transport_0 - ce3364db:9833c7c38d13704538567db2efd20514): Skipping STUN server because of address type mis-match

/builds/worker/checkouts/gecko/dom/media/webrtc/transport/third_party/nICEr/src/net/nr_socket_multi_tcp.c:175 function nr_socket_multi_tcp_create_stun_server_socket skipping UDP STUN server(addr:IP4:0.0.0.0:19302/UDP)

/builds/worker/checkouts/gecko/dom/media/webrtc/transport/third_party/nICEr/src/net/nr_socket_multi_tcp.c:175 function nr_socket_multi_tcp_create_stun_server_socket skipping UDP STUN server(addr:IP6:[::]:19302/UDP)

/builds/worker/checkouts/gecko/dom/media/webrtc/transport/third_party/nICEr/src/net/nr_socket_multi_tcp.c:639 function nr_socket_multi_tcp_listen failed with error 3

ICE-STREAM(PC:{71c9e1ff-a724-4fbc-92d4-cbadcde46b1a} 1662504838246511 (id=53687091201 url=http://localhost:3003/room/1171) transport-id=transport_0 - ce3364db:9833c7c38d13704538567db2efd20514): failed to create passive TCP host candidate: 3

STUN-CLIENT(srflx(IP4:192.168.0.103:63992/UDP|IP4:0.0.0.0:19302/UDP)): Received response; processing

ICE(PC:{71c9e1ff-a724-4fbc-92d4-cbadcde46b1a} 1662504838246511 (id=53687091201 url=http://localhost:3003/room/1171)): peer (PC:{71c9e1ff-a724-4fbc-92d4-cbadcde46b1a} 1662504838246511 (id=53687091201 url=http://localhost:3003/room/1171):default) starting grace period timer for 5000 ms

ICE(PC:{71c9e1ff-a724-4fbc-92d4-cbadcde46b1a} 1662504838246511 (id=53687091201 url=http://localhost:3003/room/1171)): peer (PC:{71c9e1ff-a724-4fbc-92d4-cbadcde46b1a} 1662504838246511 (id=53687091201 url=http://localhost:3003/room/1171):default) no streams with non-empty check lists

ICE(PC:{71c9e1ff-a724-4fbc-92d4-cbadcde46b1a} 1662504838246511 (id=53687091201 url=http://localhost:3003/room/1171)): peer (PC:{71c9e1ff-a724-4fbc-92d4-cbadcde46b1a} 1662504838246511 (id=53687091201 url=http://localhost:3003/room/1171):default) no streams with pre-answer requests

ICE(PC:{71c9e1ff-a724-4fbc-92d4-cbadcde46b1a} 1662504838246511 (id=53687091201 url=http://localhost:3003/room/1171)): peer (PC:{71c9e1ff-a724-4fbc-92d4-cbadcde46b1a} 1662504838246511 (id=53687091201 url=http://localhost:3003/room/1171):default) no checks to start, but gathering is not done yet, cancelling grace period timer

STUN-CLIENT(srflx(IP4:192.168.0.103:64512/UDP|IP4:0.0.0.0:19302/UDP)): Received response; processing

ICE(PC:{71c9e1ff-a724-4fbc-92d4-cbadcde46b1a} 1662504838246511 (id=53687091201 url=http://localhost:3003/room/1171)): peer (PC:{71c9e1ff-a724-4fbc-92d4-cbadcde46b1a} 1662504838246511 (id=53687091201 url=http://localhost:3003/room/1171):default) pairing local trickle ICE candidate srflx(IP4:192.168.0.103:64512/UDP|IP4:0.0.0.0:19302/UDP)

ICE(PC:{71c9e1ff-a724-4fbc-92d4-cbadcde46b1a} 1662504838246511 (id=53687091201 url=http://localhost:3003/room/1171)): peer (PC:{71c9e1ff-a724-4fbc-92d4-cbadcde46b1a} 1662504838246511 (id=53687091201 url=http://localhost:3003/room/1171):default) starting grace period timer for 5000 ms

ICE(PC:{71c9e1ff-a724-4fbc-92d4-cbadcde46b1a} 1662504838246511 (id=53687091201 url=http://localhost:3003/room/1171)): All candidates initialized

ICE(PC:{71c9e1ff-a724-4fbc-92d4-cbadcde46b1a} 1662504838246511 (id=53687091201 url=http://localhost:3003/room/1171)): peer (PC:{71c9e1ff-a724-4fbc-92d4-cbadcde46b1a} 1662504838246511 (id=53687091201 url=http://localhost:3003/room/1171):default) Trickle grace period is over; marking every component with only failed pairs as failed.

+++++++ END (process id 15117) ++++++++

mantou132 avatar Sep 06 '22 22:09 mantou132