Skip to content

[PB-5897] Fix participant count and zombies on reload#213

Open
TamaraFinogina wants to merge 8 commits intomainfrom
fix_reload_count
Open

[PB-5897] Fix participant count and zombies on reload#213
TamaraFinogina wants to merge 8 commits intomainfrom
fix_reload_count

Conversation

@TamaraFinogina
Copy link
Copy Markdown

@TamaraFinogina TamaraFinogina commented Apr 16, 2026

Description

If the participant does a page reload, the count of users inside the room becomes incorrect (shows more users than the actual participants inside the room). Seems to be because the server doesn't receive the leaveCall request. Also, there were zombies because beforeunload was stopping normal Jitsi disconnect events and never re-sending them afterwards.

Ideally, front and server need to do ping-pong, keepalive, or similar, so front doesn't have to notify the server.
As a temporary fix, after the user confirms the intent to leave, the browser will manually send a leaveCall request. Has to be done manually with fetch because otherwise, browser reload will kill the request mid-process with NS_BINDING_ABORTED, and the server will never process it.

As for beforeunload, I tried to keep it, but it's harder than I thought.

Checklist

  • Changes have been tested locally.
  • Unit tests have been written or updated as necessary.
  • The code adheres to the repository's coding standards.
  • Relevant documentation has been added or updated.
  • No new warnings or errors have been introduced.
  • SonarCloud issues have been reviewed and addressed.
  • QA Passed

How Has This Been Tested?

Additional Notes

@TamaraFinogina TamaraFinogina self-assigned this Apr 16, 2026
@TamaraFinogina TamaraFinogina changed the title [_] Add leaveCall on page hiding action [PB-5897] Add leaveCall on page hiding action Apr 16, 2026
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 16, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
meet-web 51dc483 Commit Preview URL

Branch Preview URL
May 07 2026, 04:23 PM

@TamaraFinogina TamaraFinogina requested a review from CandelR April 20, 2026 10:14
@TamaraFinogina TamaraFinogina marked this pull request as ready for review April 20, 2026 10:14
@TamaraFinogina TamaraFinogina marked this pull request as draft April 22, 2026 08:37
@TamaraFinogina TamaraFinogina changed the title [PB-5897] Add leaveCall on page hiding action [PB-5897] Fix participant count and zombies on reload Apr 28, 2026
@TamaraFinogina TamaraFinogina marked this pull request as ready for review April 28, 2026 08:54

fetch(`${MEET_API_URL}/call/${callId}/users/leave`, {
method: "POST",
keepalive: true,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

waiting for what we discussed about handling this with a keepalive so that the browser doesn't close the request when the page is refreshed :)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, switched to sdk 1.15.14, which has post with keep alive option

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 7, 2026

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Deploying meet-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: 51dc483
Status:  ✅  Deploy successful!
Preview URL: https://796f23b7.meet-web.pages.dev
Updated (Europe/Madrid): 7/5/2026, 18:21:18

View logs

@TamaraFinogina TamaraFinogina requested a review from CandelR May 7, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants