matrix-org / matrix-org/waterfall
Certain participants cannot establish a WebRTC connection to the SFU for the first time
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 105
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
This so far has happened only with @robintown, but it's not clear why it happens.
We do get an incoming connection in the SFU, and the ICE connection gets established without any errors. Still, the peer connection never goes to the connected state, i.e. we never get an onStateChanged() callback in the SFU.
We would need to dig deeper to understand why despite a successful creation of an ICE connection, the peer connection is not established.
AFAIK, after the connecting stage (connecting with the ICE) the following happens: first, the DTLS handshake is done over the connection established with ICE, it compares the certificates used for DTLS to match the fingerprints exchanged during the signaling phase. DTLS is used for DataChannel messages later on. RTP is used for media communication secured by SRTP that extracts keys from the negotiated DTLS session. At this point is considered established (and we get the onStateChanged callback with the state connected).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by tracing the SFU peer-connection lifecycle around ICE, the DTLS handshake, and the missing onStateChanged() callback, then reproduce the first connection with the affected participant. Done means the cause of the stalled transition is identified and the connection reliably reaches connected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- audio-video-rtc, backend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100