libp2p / libp2p/rust-libp2p

bug(webrtc): Chrome data-channels not closing

Open
#4,333 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
5.6k
Forks
1.3k
Avg merge
8h 47m
Merged PRs (30d)
19

Description

Summary

When connecting a js-libp2p (browser) peer and rust-libp2p peer via webrtc, data channels are no properly closing.
The first reason for that is js-libp2p never closes them to begin with. That is being addressed here: https://github.com/libp2p/js-libp2p/pull/1976

The next issue is that the rust-libp2p WebRTC implementation webrtc-rs doesn't properly respond to the browsers stream reset, leaving the browser in a closing state.

And in case of switching to str0m https://github.com/libp2p/rust-libp2p/issues/3659, it also has the same issue:

Possible Solution

I am opening this issue for visibility, and to possibly get some support with the PR reviews on these repositories.
This can be closed when bumping the dependency version.

Would you like to work on fixing this bug?

Yes

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing js-libp2p PR 1976 and the linked webrtc-rs issue 468 and str0m issue 286 to confirm the upstream stream-reset behavior. Done means the relevant upstream fix is available and rust-libp2p can bump the dependency so browser data channels leave the closing state.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
audio-video-rtc, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.