Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebRTC: E2E test does not work on Firefox #2047

Closed
marcus-pousette opened this issue Sep 12, 2023 · 6 comments
Closed

WebRTC: E2E test does not work on Firefox #2047

marcus-pousette opened this issue Sep 12, 2023 · 6 comments
Labels
kind/stale need/author-input Needs input from the original author

Comments

@marcus-pousette
Copy link
Contributor

  • Version:

0.46.9

  • Platform:

MacBook-Pro-3.local 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 arm64

  • Subsystem:

WebRTC

Severity:

Medium

Description:

I am running a simple WebRTC E2E test with Playwright

The test does the following

  1. Create two browser contexts (A,B) with one protocol handler that allows you to send data from one to the other.

  2. Start a relay.

  3. Connect A to relay to obtain reservation for WebRTC address

  4. Connect B to A using the circuit relay address.

  5. Shutdown relay and make sure data still can be sent between the browser sessions

Test works on Chrome and Safari, but fails on Firefox.

I have also tested all the steps in a real browser sessions and the results are identical.
Below is the log from running the E2E test by opening the browser sessions manually and reading the logs:


WebRTC: ICE failed, add a STUN server and see about:webrtc for more details
Uncaught (in promise) Error: RTCPeerConnection was closed
    <anonymous> util.ts:54
[util.ts:54:23](http://localhost:5211/node_modules/@libp2p/webrtc/src/private-to-private/util.ts)
Error: RTCPeerConnection was closed
    <anonymous> util.ts:54
[App.tsx:88:12](http://localhost:5211/src/App.tsx)
Error: RTCPeerConnection was closed
    <anonymous> util.ts:54
[App.tsx:88:12](http://localhost:5211/src/App.tsx)
FINALLY 2 [App.tsx:91:12](http://localhost:5211/src/App.tsx)
Uncaught (in promise) CodeError: Timed out while trying to connect
    CodeError errors.ts:29
    onabort handler.ts:32
[errors.ts:29:4](http://localhost:5211/node_modules/@libp2p/interface/src/errors.ts)
    onabort handler.ts:32
---------- about:webrtc ----------------
    +++++++ BEGIN (process id 4863) ++++++++

insert 'ice' (registry) succeeded: ice

insert 'ice.pref' (registry) succeeded: ice.pref

insert 'ice.pref.type' (registry) succeeded: ice.pref.type

insert 'ice.pref.type.srv_rflx' (UCHAR) succeeded: 0x64

insert 'ice.pref.type.peer_rflx' (UCHAR) succeeded: 0x6e

insert 'ice.pref.type.host' (UCHAR) succeeded: 0x7e

insert 'ice.pref.type.relayed' (UCHAR) succeeded: 0x05

insert 'ice.pref.type.srv_rflx_tcp' (UCHAR) succeeded: 0x63

insert 'ice.pref.type.peer_rflx_tcp' (UCHAR) succeeded: 0x6d

insert 'ice.pref.type.host_tcp' (UCHAR) succeeded: 0x7d

insert 'ice.pref.type.relayed_tcp' (UCHAR) succeeded: 0x00

insert 'stun' (registry) succeeded: stun

insert 'stun.client' (registry) succeeded: stun.client

insert 'stun.client.maximum_transmits' (UINT4) succeeded: 7

insert 'ice.trickle_grace_period' (UINT4) succeeded: 5000

insert 'ice.tcp' (registry) succeeded: ice.tcp

insert 'ice.tcp.so_sock_count' (INT4) succeeded: 0

insert 'ice.tcp.listen_backlog' (INT4) succeeded: 10

insert 'ice.tcp.disable' (char) succeeded: \000

insert 'ice.forced_interface_name' (string) succeeded:

insert 'ice.udp' (registry) succeeded: ice.udp

insert 'ice.udp.use_nr_resolver' (char) succeeded: \001

PR_Connect failed: -5927

ICE(PC:{4d0ab538-4cbd-4c35-9c70-ca51462f1db2} 1694542998315079 (id=8589934593 url=http://localhost:5211/?relay=/ip4/127.0.0.1/tcp/8002/ws/p2p/12D3KooWPh7DwBH2xELDuyCZxExaXhaBexhskBPYUJCKvjb9fkwq/p2p-circuit/webrtc/p2p/12D3KooWLtdq1gcveQp3si7y88UEcwgEdaKxh4pXRjRV): failed to find default addresses

PR_Connect failed: -5927

ICE(PC:{4d0ab538-4cbd-4c35-9c70-ca51462f1db2} 1694542998315079 (id=8589934593 url=http://localhost:5211/?relay=/ip4/127.0.0.1/tcp/8002/ws/p2p/12D3KooWPh7DwBH2xELDuyCZxExaXhaBexhskBPYUJCKvjb9fkwq/p2p-circuit/webrtc/p2p/12D3KooWLtdq1gcveQp3si7y88UEcwgEdaKxh4pXRjRV): failed to find default addresses

PR_Connect failed: -5927

ICE(PC:{201e486a-a4b5-4a5f-8fdb-230c96f2e3d9} 1694542998305108 (id=6442450946 url=http://localhost:5211/?relay=/ip4/127.0.0.1/tcp/8002/ws/p2p/12D3KooWPh7DwBH2xELDuyCZxExaXhaBexhskBPYUJCKvjb9fkwq)): failed to find default addresses

PR_Connect failed: -5927

ICE(PC:{201e486a-a4b5-4a5f-8fdb-230c96f2e3d9} 1694542998305108 (id=6442450946 url=http://localhost:5211/?relay=/ip4/127.0.0.1/tcp/8002/ws/p2p/12D3KooWPh7DwBH2xELDuyCZxExaXhaBexhskBPYUJCKvjb9fkwq)): failed to find default addresses

+++++++ END (process id 4863) ++++++++
    
  

@marcus-pousette marcus-pousette added the need/triage Needs initial labeling and prioritization label Sep 12, 2023
@marcus-pousette
Copy link
Contributor Author

Main issue from the logs is

failed to find default addresses

@maschad maschad moved this to 🤨Needs Investigation in js-libp2p Sep 15, 2023
@maschad maschad self-assigned this Sep 19, 2023
@maschad maschad removed their assignment Oct 2, 2023
@maschad
Copy link
Member

maschad commented Oct 2, 2023

We are currently undergoing a big refactor of webRTC #2073 we will revisit once that is merged.

@maschad
Copy link
Member

maschad commented May 14, 2024

@marcus-pousette is this still an issue?

@maschad maschad added need/author-input Needs input from the original author and removed need/triage Needs initial labeling and prioritization labels May 14, 2024
@dhuseby dhuseby moved this from 🤨Needs Investigation to 🥸In Review in js-libp2p May 14, 2024
@dhuseby dhuseby moved this from 🥸In Review to 🧱Blocked in js-libp2p May 14, 2024
Copy link
Contributor

Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days.

Copy link
Contributor

This issue was closed because it is missing author input.

@github-project-automation github-project-automation bot moved this from 🧱Blocked to 🎉Done in js-libp2p May 28, 2024
@sfroment
Copy link
Contributor

sfroment commented Jan 12, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/stale need/author-input Needs input from the original author
Projects
Archived in project
Development

No branches or pull requests

3 participants