nextcloud / nextcloud/spreed

Forced reconnections may not be noticed by the clients of other participants when the HPB is not used

Open
#7,089 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug feature: call 📹
Dominant language
PHP
Stars
2.2k
Forks
587
Avg merge
18h 27m
Merged PRs (30d)
333

Description

If the inCall property for the participant who is reconnecting never becomes not in the call other participants would not notice that the participant in fact reconnected (as without HPB the same session ID is used) and then not update their connection with that participant (for example, to stop it if the participant is no longer publishing).

This might be fixed by the second commit (Create and destroy Peers based on call flag changes) in https://github.com/nextcloud/spreed/pull/6934

How to test

  • Delay getting the users for the usersInRoom event (so if a participant leaves and quickly joins again, like in a forced reconnection, the clients will not receive the disconnected state) by adding if ($this->userId) { sleep(5); } before https://github.com/nextcloud/spreed/blob/2e26a232da65fe90042b97afeab2eb4abfbfaa51/lib/Controller/SignalingController.php#L362
  • Add audio and video permissions by default in a conversation
  • Start a call as a moderator
  • In a private window, join the call as a guest with audio and/or video
  • Wait until the connection is established (it may take a while due to the delayed signaling messages)
  • In the original window, remove all permissions from the other participant
Result with this pull request

In the original window the other participant is seen as in the call, although without audio or video

Result without this pull request

In the original window the connection is lost with the other participant and never recovered

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 with the usersInRoom handling in lib/Controller/SignalingController.php around line 362, then review the second commit, “Create and destroy Peers based on call flag changes,” in pull request #6934. Reproduce the delayed signaling and permission-removal scenario described in the issue. Done means other participants notice the forced reconnection and correctly update the connection when the participant no longer publishes.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php
Domain
audio-video-rtc, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.