Skip to content

Failed webRTC upgrade leads to dropped relay p2p-circuit connection #3015

@julienmalard

Description

@julienmalard

Version:

  • "@libp2p/circuit-relay-v2": "^3.2.4",
  • "@libp2p/webrtc": "^5.2.5",
  • "libp2p": "^2.7.4",

Platform:

  • macOS 12.5.1
  • Firefox browser (135.0.1 (64 bits))
  • Chrome browser (Version 133.0.6943.127 (Build officiel) (x86_64))
  • Subsystem:
    webRTC and Circuit Relay

Severity:

High - The main functionality of the application does not work, API breakage, repo format breakage, etc.

Description:

When webRTC connections fail (e.g., because of a corporate firewall), the connection between the two peers is dropped instead of falling back to the relay server. This leads to an infinite loop, where both peers connect to the relay, connect to each other over their respective p2p-circuit addresses, attempt to upgrade to webRTC, and then drop the connection and start all over again.

I would expect that, if the upgrade fails, the peers would remain on the relayed connected (and potentially try to upgrade again eventually, but without dropping the relayed connection if webRTC fails).

I wonder if this is perhaps related to the fix for #2646.

Steps to reproduce the error:

Start two browser nodes (same machine, in my test) with webRTC and circuit relay enabled and a known circuit relay node in the bootstrap list over a network with a firewall that will prevent ICE from working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    need/author-inputNeeds input from the original author

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions