admin管理员组文章数量:1316660
I want to develop a WebRTC based streaming application and I am learning about the protocol starting from the basics. In particular, I followed this extremely simple example on GitHub (also shown in this YouTube video) that just opens a WebRTC channel between two browser tabs, and was able to run it on Microsoft Edge in my local machine. However, if I use the same JavaScript code in Firefox (version 102.0 on Windows 11), I receive an error WebRTC: ICE failed, add a STUN server and see about:webrtc for more details
on both sender and receiver tabs.
I have therefore tried to include the STUN, TURN and TURNS servers provided by Open Relay in the configuration, but the same error message always appears.
I would like my application to work on the most used internet browsers, so I am wondering how this can be fixed before digging deeper. Similar questions seemed a bit outdated or related to different errors.
Thank you all in advance for your help and suggestion.
Considering the simplest case with no STUN nor TURN server (which should work in a local network or at least on the same localhost), WebRTC's connection registry contains this:
+++++++ BEGIN (process id 21692) ++++++++
(generic/CRIT) PR_Connect failed: -5980
(ice/WARNING) /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/WARNING) ICE-STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf): failed to create passive TCP host candidate: 3
(ice/INFO) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home)): All candidates initialized
(generic/CRIT) PR_Connect failed: -5980
(ice/WARNING) /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/WARNING) ICE-STREAM(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home) transport-id=transport_0 - c71730bb:54ae3990a18fe7c5e8e67bddb6f56bbb): failed to create passive TCP host candidate: 3
(ice/INFO) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): peer (PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default) starting grace period timer for 5000 ms
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): peer (PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default) no streams with non-empty check lists
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): peer (PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default) no streams with pre-answer requests
(ice/INFO) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): peer (PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default) no checks to start, but gathering is not done yet, cancelling grace period timer
(ice/ERR) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): peer (PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default) pairing local trickle ICE candidate host(IP4:192.168.1.28:56443/UDP)
(ice/INFO) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): peer (PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default) starting grace period timer for 5000 ms
(ice/ERR) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): peer (PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default) pairing local trickle ICE candidate host(IP4:192.168.1.28:63946/TCP) active
(ice/INFO) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): All candidates initialized
(ice/INFO) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): peer (PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default) Trickle grace period is over; marking every ponent with only failed pairs as failed.
(ice/INFO) ICE-PEER(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default)/STREAM(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home) transport-id=transport_0 - c71730bb:54ae3990a18fe7c5e8e67bddb6f56bbb)/COMP(1): All pairs are failed, and grace period has elapsed. Marking ponent as failed.
(ice/ERR) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home))/STREAM(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home) transport-id=transport_0 - c71730bb:54ae3990a18fe7c5e8e67bddb6f56bbb): state dump
(ice/ERR) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home))/ICE-STREAM(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home) transport-id=transport_0 - c71730bb:54ae3990a18fe7c5e8e67bddb6f56bbb): Local ponent 1 - dumping candidates
(ice/ERR) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home))/ICE-STREAM(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home) transport-id=transport_0 - c71730bb:54ae3990a18fe7c5e8e67bddb6f56bbb)/CAND(5fk0): host(IP4:192.168.1.28:56443/UDP)
(ice/ERR) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home))/ICE-STREAM(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home) transport-id=transport_0 - c71730bb:54ae3990a18fe7c5e8e67bddb6f56bbb)/CAND(vE/5): host(IP4:192.168.1.28:63946/TCP) active
(ice/ERR) ICE-PEER(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default)/STREAM(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home) transport-id=transport_0 - c71730bb:54ae3990a18fe7c5e8e67bddb6f56bbb): state dump
(ice/ERR) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home))/ICE-STREAM(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home) transport-id=transport_0 - c71730bb:54ae3990a18fe7c5e8e67bddb6f56bbb): Remote ponent 1 in state 3 - dumping candidates
(ice/INFO) ICE-PEER(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default): all checks pleted success=0 fail=1
(ice/INFO) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home)): peer (PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default) starting grace period timer for 5000 ms
(ice/NOTICE) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home)): peer (PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default) no streams with non-empty check lists
(ice/NOTICE) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home)): peer (PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default) no streams with pre-answer requests
(ice/INFO) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default)/CAND-PAIR(S2jI): setting pair to state FROZEN: S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)
(ice/INFO) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home))/CAND-PAIR(S2jI): Pairing candidate IP4:192.168.1.28:56005/UDP (7e7f00ff):IP4:192.168.1.28:56443/UDP (7e7f00ff) priority=9115005270282338815 (7e7f00fffcfe01ff)
(ice/INFO) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default)/ICE-STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf): Starting check timer for stream.
(ice/INFO) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default)/CAND-PAIR(S2jI): setting pair to state WAITING: S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)
(ice/INFO) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default)/CAND-PAIR(S2jI): setting pair to state IN_PROGRESS: S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)
(ice/NOTICE) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home)): peer (PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default) is now checking
(stun/INFO) Responding with error 400: ICE Failure
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): Message does not correspond to any registered stun ctx
(stun/INFO) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Received response; processing
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): nr_stun_process_error_response failed
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Error processing response: Retry may be possible, stun error code 400.
(ice/INFO) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default): no FROZEN/WAITING pairs for PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf
(stun/INFO) Responding with error 400: ICE Failure
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): Message does not correspond to any registered stun ctx
(stun/INFO) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Received response; processing
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): nr_stun_process_error_response failed
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Error processing response: Retry may be possible, stun error code 400.
(stun/INFO) Responding with error 400: ICE Failure
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): Message does not correspond to any registered stun ctx
(stun/INFO) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Received response; processing
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): nr_stun_process_error_response failed
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Error processing response: Retry may be possible, stun error code 400.
(stun/INFO) Responding with error 400: ICE Failure
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): Message does not correspond to any registered stun ctx
(stun/INFO) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Received response; processing
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): nr_stun_process_error_response failed
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Error processing response: Retry may be possible, stun error code 400.
(stun/INFO) Responding with error 400: ICE Failure
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): Message does not correspond to any registered stun ctx
(stun/INFO) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Received response; processing
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): nr_stun_process_error_response failed
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Error processing response: Retry may be possible, stun error code 400.
(stun/INFO) Responding with error 400: ICE Failure
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): Message does not correspond to any registered stun ctx
(stun/INFO) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Received response; processing
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): nr_stun_process_error_response failed
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Error processing response: Retry may be possible, stun error code 400.
(ice/INFO) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home)): peer (PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default) Trickle grace period is over; marking every ponent with only failed pairs as failed.
(stun/INFO) Responding with error 400: ICE Failure
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): Message does not correspond to any registered stun ctx
(stun/INFO) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Received response; processing
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): nr_stun_process_error_response failed
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Error processing response: Retry may be possible, stun error code 400.
(stun/INFO) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Timed out
(ice/INFO) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default)/CAND-PAIR(S2jI): setting pair to state FAILED: S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)
(ice/INFO) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default)/STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf)/COMP(1): All pairs are failed, and grace period has elapsed. Marking ponent as failed.
(ice/ERR) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home))/STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf): state dump
(ice/ERR) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home))/ICE-STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf): Local ponent 1 - dumping candidates
(ice/ERR) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home))/ICE-STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf)/CAND(R6E4): host(IP4:192.168.1.28:56005/UDP)
(ice/ERR) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home))/ICE-STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf)/CAND(xSO3): host(IP4:192.168.1.28:60680/TCP) active
(ice/ERR) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default)/STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf): state dump
(ice/ERR) CAND-PAIR(S2jI): pair S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host): state=FAILED, priority=0x7e7f00fffcfe01ff
(ice/ERR) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home))/ICE-STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf): Remote ponent 1 in state 3 - dumping candidates
(ice/ERR) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home))/ICE-STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf)/CAND(giJB): candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host
(ice/ERR) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home))/ICE-STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf)/CAND(eRB0): candidate:1 1 TCP 2105524479 192.168.1.28 9 typ host tcptype active
(ice/INFO) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default): all checks pleted success=0 fail=1
+++++++ END (process id 21692) ++++++++
while local and remote SDPs respectively look like this:
v=0
o=mozilla...THIS_IS_SDPARTA-99.0 1501128418895448605 0 IN IP4 0.0.0.0
s=-
t=0 0
a=fingerprint:sha-256 26:27:49:F1:75:8E:96:56:D6:A9:3F:E9:28:A9:D8:3A:E3:99:CA:52:4B:22:3C:6C:9D:02:FD:C7:AE:21:17:3F
a=group:BUNDLE 0
a=ice-options:trickle
a=msid-semantic:WMS *
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=sendrecv
a=ice-pwd:7ce62f845d4f5b83df2a70e1bac037bf
a=ice-ufrag:a9c7cadd
a=mid:0
a=setup:actpass
a=sctp-port:5000
a=max-message-size:1073741823
v=0
o=mozilla...THIS_IS_SDPARTA-99.0 5475832728403267594 0 IN IP4 0.0.0.0
s=-
t=0 0
a=sendrecv
a=fingerprint:sha-256 DC:E2:A0:CE:08:9B:25:D6:63:E0:6A:D8:94:05:82:1A:9B:27:47:4B:83:30:95:72:B4:BD:0B:62:2F:44:7C:9D
a=group:BUNDLE 0
a=ice-options:trickle
a=msid-semantic:WMS *
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=candidate:0 1 UDP 2122252543 eb5fb3b1-f3d1-4add-afff-e9cde1bf07a2.local 56443 typ host
a=candidate:1 1 TCP 2105524479 eb5fb3b1-f3d1-4add-afff-e9cde1bf07a2.local 9 typ host tcptype active
a=sendrecv
a=end-of-candidates
a=ice-pwd:54ae3990a18fe7c5e8e67bddb6f56bbb
a=ice-ufrag:c71730bb
a=mid:0
a=setup:active
a=sctp-port:5000
a=max-message-size:1073741823
Strangely, connection can be established between tabs of different browsers (sender in Edge and receiver in Firefox, or vice versa). Remote SDPs of the Firefox client (therefore describing Edge session) look like this:
v=0
o=- 6799550255512083034 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0
a=extmap-allow-mixed
a=msid-semantic: WMS
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=candidate:2606571665 1 udp 2113937151 5b5fd4e1-64b5-421c-b103-ca4a29c106dc.local 62776 typ host generation 0 network-cost 999
a=ice-ufrag:Gc38
a=ice-pwd:zxGRR6Dlm+usOA+Xx4BmuN2x
a=ice-options:trickle
a=fingerprint:sha-256 6C:23:49:63:D3:60:78:D2:AF:1E:68:4F:7C:EC:19:1C:29:5C:64:A0:5B:29:7B:D3:5B:5F:CC:81:7E:EA:56:97
a=setup:actpass
a=mid:0
a=sctp-port:5000
a=max-message-size:262144
I want to develop a WebRTC based streaming application and I am learning about the protocol starting from the basics. In particular, I followed this extremely simple example on GitHub (also shown in this YouTube video) that just opens a WebRTC channel between two browser tabs, and was able to run it on Microsoft Edge in my local machine. However, if I use the same JavaScript code in Firefox (version 102.0 on Windows 11), I receive an error WebRTC: ICE failed, add a STUN server and see about:webrtc for more details
on both sender and receiver tabs.
I have therefore tried to include the STUN, TURN and TURNS servers provided by Open Relay in the configuration, but the same error message always appears.
I would like my application to work on the most used internet browsers, so I am wondering how this can be fixed before digging deeper. Similar questions seemed a bit outdated or related to different errors.
Thank you all in advance for your help and suggestion.
Considering the simplest case with no STUN nor TURN server (which should work in a local network or at least on the same localhost), WebRTC's connection registry contains this:
+++++++ BEGIN (process id 21692) ++++++++
(generic/CRIT) PR_Connect failed: -5980
(ice/WARNING) /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/WARNING) ICE-STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf): failed to create passive TCP host candidate: 3
(ice/INFO) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home)): All candidates initialized
(generic/CRIT) PR_Connect failed: -5980
(ice/WARNING) /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/WARNING) ICE-STREAM(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home) transport-id=transport_0 - c71730bb:54ae3990a18fe7c5e8e67bddb6f56bbb): failed to create passive TCP host candidate: 3
(ice/INFO) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): peer (PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default) starting grace period timer for 5000 ms
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): peer (PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default) no streams with non-empty check lists
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): peer (PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default) no streams with pre-answer requests
(ice/INFO) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): peer (PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default) no checks to start, but gathering is not done yet, cancelling grace period timer
(ice/ERR) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): peer (PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default) pairing local trickle ICE candidate host(IP4:192.168.1.28:56443/UDP)
(ice/INFO) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): peer (PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default) starting grace period timer for 5000 ms
(ice/ERR) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): peer (PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default) pairing local trickle ICE candidate host(IP4:192.168.1.28:63946/TCP) active
(ice/INFO) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): All candidates initialized
(ice/INFO) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): peer (PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default) Trickle grace period is over; marking every ponent with only failed pairs as failed.
(ice/INFO) ICE-PEER(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default)/STREAM(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home) transport-id=transport_0 - c71730bb:54ae3990a18fe7c5e8e67bddb6f56bbb)/COMP(1): All pairs are failed, and grace period has elapsed. Marking ponent as failed.
(ice/ERR) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home))/STREAM(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home) transport-id=transport_0 - c71730bb:54ae3990a18fe7c5e8e67bddb6f56bbb): state dump
(ice/ERR) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home))/ICE-STREAM(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home) transport-id=transport_0 - c71730bb:54ae3990a18fe7c5e8e67bddb6f56bbb): Local ponent 1 - dumping candidates
(ice/ERR) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home))/ICE-STREAM(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home) transport-id=transport_0 - c71730bb:54ae3990a18fe7c5e8e67bddb6f56bbb)/CAND(5fk0): host(IP4:192.168.1.28:56443/UDP)
(ice/ERR) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home))/ICE-STREAM(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home) transport-id=transport_0 - c71730bb:54ae3990a18fe7c5e8e67bddb6f56bbb)/CAND(vE/5): host(IP4:192.168.1.28:63946/TCP) active
(ice/ERR) ICE-PEER(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default)/STREAM(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home) transport-id=transport_0 - c71730bb:54ae3990a18fe7c5e8e67bddb6f56bbb): state dump
(ice/ERR) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home))/ICE-STREAM(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home) transport-id=transport_0 - c71730bb:54ae3990a18fe7c5e8e67bddb6f56bbb): Remote ponent 1 in state 3 - dumping candidates
(ice/INFO) ICE-PEER(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default): all checks pleted success=0 fail=1
(ice/INFO) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home)): peer (PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default) starting grace period timer for 5000 ms
(ice/NOTICE) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home)): peer (PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default) no streams with non-empty check lists
(ice/NOTICE) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home)): peer (PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default) no streams with pre-answer requests
(ice/INFO) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default)/CAND-PAIR(S2jI): setting pair to state FROZEN: S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)
(ice/INFO) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home))/CAND-PAIR(S2jI): Pairing candidate IP4:192.168.1.28:56005/UDP (7e7f00ff):IP4:192.168.1.28:56443/UDP (7e7f00ff) priority=9115005270282338815 (7e7f00fffcfe01ff)
(ice/INFO) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default)/ICE-STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf): Starting check timer for stream.
(ice/INFO) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default)/CAND-PAIR(S2jI): setting pair to state WAITING: S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)
(ice/INFO) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default)/CAND-PAIR(S2jI): setting pair to state IN_PROGRESS: S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)
(ice/NOTICE) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home)): peer (PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default) is now checking
(stun/INFO) Responding with error 400: ICE Failure
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): Message does not correspond to any registered stun ctx
(stun/INFO) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Received response; processing
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): nr_stun_process_error_response failed
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Error processing response: Retry may be possible, stun error code 400.
(ice/INFO) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default): no FROZEN/WAITING pairs for PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf
(stun/INFO) Responding with error 400: ICE Failure
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): Message does not correspond to any registered stun ctx
(stun/INFO) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Received response; processing
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): nr_stun_process_error_response failed
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Error processing response: Retry may be possible, stun error code 400.
(stun/INFO) Responding with error 400: ICE Failure
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): Message does not correspond to any registered stun ctx
(stun/INFO) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Received response; processing
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): nr_stun_process_error_response failed
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Error processing response: Retry may be possible, stun error code 400.
(stun/INFO) Responding with error 400: ICE Failure
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): Message does not correspond to any registered stun ctx
(stun/INFO) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Received response; processing
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): nr_stun_process_error_response failed
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Error processing response: Retry may be possible, stun error code 400.
(stun/INFO) Responding with error 400: ICE Failure
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): Message does not correspond to any registered stun ctx
(stun/INFO) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Received response; processing
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): nr_stun_process_error_response failed
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Error processing response: Retry may be possible, stun error code 400.
(stun/INFO) Responding with error 400: ICE Failure
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): Message does not correspond to any registered stun ctx
(stun/INFO) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Received response; processing
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): nr_stun_process_error_response failed
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Error processing response: Retry may be possible, stun error code 400.
(ice/INFO) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home)): peer (PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default) Trickle grace period is over; marking every ponent with only failed pairs as failed.
(stun/INFO) Responding with error 400: ICE Failure
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): Message does not correspond to any registered stun ctx
(stun/INFO) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Received response; processing
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): nr_stun_process_error_response failed
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Error processing response: Retry may be possible, stun error code 400.
(stun/INFO) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Timed out
(ice/INFO) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default)/CAND-PAIR(S2jI): setting pair to state FAILED: S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)
(ice/INFO) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default)/STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf)/COMP(1): All pairs are failed, and grace period has elapsed. Marking ponent as failed.
(ice/ERR) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home))/STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf): state dump
(ice/ERR) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home))/ICE-STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf): Local ponent 1 - dumping candidates
(ice/ERR) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home))/ICE-STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf)/CAND(R6E4): host(IP4:192.168.1.28:56005/UDP)
(ice/ERR) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home))/ICE-STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf)/CAND(xSO3): host(IP4:192.168.1.28:60680/TCP) active
(ice/ERR) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default)/STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf): state dump
(ice/ERR) CAND-PAIR(S2jI): pair S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host): state=FAILED, priority=0x7e7f00fffcfe01ff
(ice/ERR) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home))/ICE-STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf): Remote ponent 1 in state 3 - dumping candidates
(ice/ERR) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home))/ICE-STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf)/CAND(giJB): candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host
(ice/ERR) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home))/ICE-STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf)/CAND(eRB0): candidate:1 1 TCP 2105524479 192.168.1.28 9 typ host tcptype active
(ice/INFO) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default): all checks pleted success=0 fail=1
+++++++ END (process id 21692) ++++++++
while local and remote SDPs respectively look like this:
v=0
o=mozilla...THIS_IS_SDPARTA-99.0 1501128418895448605 0 IN IP4 0.0.0.0
s=-
t=0 0
a=fingerprint:sha-256 26:27:49:F1:75:8E:96:56:D6:A9:3F:E9:28:A9:D8:3A:E3:99:CA:52:4B:22:3C:6C:9D:02:FD:C7:AE:21:17:3F
a=group:BUNDLE 0
a=ice-options:trickle
a=msid-semantic:WMS *
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=sendrecv
a=ice-pwd:7ce62f845d4f5b83df2a70e1bac037bf
a=ice-ufrag:a9c7cadd
a=mid:0
a=setup:actpass
a=sctp-port:5000
a=max-message-size:1073741823
v=0
o=mozilla...THIS_IS_SDPARTA-99.0 5475832728403267594 0 IN IP4 0.0.0.0
s=-
t=0 0
a=sendrecv
a=fingerprint:sha-256 DC:E2:A0:CE:08:9B:25:D6:63:E0:6A:D8:94:05:82:1A:9B:27:47:4B:83:30:95:72:B4:BD:0B:62:2F:44:7C:9D
a=group:BUNDLE 0
a=ice-options:trickle
a=msid-semantic:WMS *
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=candidate:0 1 UDP 2122252543 eb5fb3b1-f3d1-4add-afff-e9cde1bf07a2.local 56443 typ host
a=candidate:1 1 TCP 2105524479 eb5fb3b1-f3d1-4add-afff-e9cde1bf07a2.local 9 typ host tcptype active
a=sendrecv
a=end-of-candidates
a=ice-pwd:54ae3990a18fe7c5e8e67bddb6f56bbb
a=ice-ufrag:c71730bb
a=mid:0
a=setup:active
a=sctp-port:5000
a=max-message-size:1073741823
Strangely, connection can be established between tabs of different browsers (sender in Edge and receiver in Firefox, or vice versa). Remote SDPs of the Firefox client (therefore describing Edge session) look like this:
v=0
o=- 6799550255512083034 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0
a=extmap-allow-mixed
a=msid-semantic: WMS
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=candidate:2606571665 1 udp 2113937151 5b5fd4e1-64b5-421c-b103-ca4a29c106dc.local 62776 typ host generation 0 network-cost 999
a=ice-ufrag:Gc38
a=ice-pwd:zxGRR6Dlm+usOA+Xx4BmuN2x
a=ice-options:trickle
a=fingerprint:sha-256 6C:23:49:63:D3:60:78:D2:AF:1E:68:4F:7C:EC:19:1C:29:5C:64:A0:5B:29:7B:D3:5B:5F:CC:81:7E:EA:56:97
a=setup:actpass
a=mid:0
a=sctp-port:5000
a=max-message-size:262144
Share
Improve this question
edited Jul 5, 2022 at 7:26
brio97
asked Jul 4, 2022 at 21:15
brio97brio97
911 gold badge2 silver badges6 bronze badges
3 Answers
Reset to default 3The issue is probably caused by this:
#1659672 - WebRTC ICE gathering fails in pletely pure LAN environment.
Turns out that Firefox does things different than other browsers: it won't consider 127.0.0.1 (aka. localhost) when gathering ICE candidates on local-only applications, which IMHO is a bad decision because it breaks using WebRTC for localhost testing and/or development.
As Byron Campen mentions in Comment 1, opening about:config and setting media.peerconnection.ice.loopback
to true
, fixed this same issue for me (Firefox 126.0.1).
Tangent ment:
Byron's additional suggestion
Try reaching the webserver on your machine's "real" IP address, and see if that helps.
is not practical at all, because the Security Context exception of localhost only applies to localhost, so reaching the webserver on an IP such as "192.168.1.2" es with a whole set of added problems. The URL would now need to be HTTPS so certs would be needed, and WebSocket connections to ws://localhost
would break because HTTPS only allows connecting to WSS. So, for devs who were using "http://localhost", changing to machine's "real" IP address is a hassle.
This answer es very late, but I'm answering anyways because this question was one of the first google results when searching for the issue.
For me just using google stun server worked OOTB.
var configuration = {
"iceServers": [{ "url": "stun:stun2.1.google.:19302" }]
};
var pc = new RTCPeerConnection(configuration);
Just found this while debugging the same issue.
This was my solution: While debugging the FF error with Wireshark I noticed that it is not sending any data to my stun / turn server. So it had to be something withing FF.
So I tried around and found out, that switching from calling my code http://localost:[port]
to http://[local-nic-ip]:[port]
solved the issue for me.
I think that has something to do with the about:config
setting media.peerconnection.ice.link_local
. But changing it did not work for me.
Hope this helps somebody else.
本文标签: javascriptWebRTC ICE failed in Firefoxbut working in MS EdgeStack Overflow
版权声明:本文标题:javascript - WebRTC: ICE failed in Firefox, but working in MS Edge - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741997487a2410335.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论