Page Refresh does not call room.leave()?

I’m trying to quit the room if browser page gets refreshed. I have tried all the way, but still I’m not able to quit gracefully and its leaving a blank user in the system for some time (1-2 minutes).

What I have tried is:

window.onbeforeunload = function(event){
   return null;
window.beforeunload = function(event){
   return null;

What prosody version are you using?

Sir it is

We have seen this with 0.10 prosody, upgrading to 0.11 will fix it. You don’t need any special handling for that, that is already handled on lib-jitsi-meet.

Since, a year you cannot use beforeunload or unload with tasks that will take time, like sending a packet … you need to use sendBeacon and that is already the case for lib-jitsi-meet.

Very good. Thank you very much sir. It is very helpful and appreciate your time given to look into it.

Sir, I have upgraded Prosody to 0.11.8 as suggested but still there is no success in getting rid of blank users after refresh of the page. Still it is taking around 1 minute to go away.

Is there some configuration at server side to handle it?

How did you upgrade?

Sorry my mistake, I’m still at 0.10.0

I had upgraded it using the following instructions

So it put in some issues, and finally I removed everything and re-installed jitsi which is working fine. But I just checked prosody again it is 0.10.0 :frowning:

If reinstalling Jitsi is an option, then I suggest after purging, FIRST upgrade your prosody to 0.11 (confirm it’s 0.11), then install Jitsi.

Yes sir, I did it. I kept prosody.cfg.lua and safe before upgrading to 0.11 using

Finally I’m able to run the show, but still on refreshing the page, same sticky user is taking almost 1 minute to go away. I mean its same behaviour which was before the upgrade.

If you’re purging and reinstalling Jitsi, I wouldn’t bother keeping those lua files. Your cfg.lua in particular contains secrets that are used to connect components and those secrets change with each installation. Just wipe everything off, then reinstall fresh.

Hi Freddie, Now my setup is working fine. You mean cfg.lua may be the cause of issue related to blank users left after page refresh?

No, it’s more likely a prosody-version issue, but the fact that you were reinstalling Jitsi with an old cfg.lua file meant your deployment wasn’t configured properly. In an upgrade, yes the old cfg.lua is fine, but with a purge and reinstall, you need the fresh cfg.lua.

So far it did not cause any other issue. If it malfunction then I will follow the steps you suggested. So as an experiment let’s continue for sometime with it. What do you suggest on this?

By the way where is this file cfg.lua located?

I think you are talking about prosody.cfg.lua

Thank you very much Freddie and Damencho. Finally I’m able to resolve my issue on page refresh and closing window. In 99% cases, user is getting out of the conference, still there is 1% case which I don’t know I can see user still stays in the conference, which is fine, atleast now its very rare.