Lock failed on JitsiMeetExternalAPI

I think that there is something that those guys don’t want to say about this.
But thank you anyway for everything.

Maybe prosody version ??

It should not switch two times. On default install it will switch when moderator reloads

Which prosody is this?

@damencho With default install, Prosody version is Prosody 0.10.0

It switches two times on Firefox and Chrome (did not test with Safari and Edge) when firstly joining a room, without any manual reloads.
I think you will be able to reproduce this with a default fresh install of jitsi-meet, i’m pretty sure you will find the same.

Tried to upgrade Prosody and same role switch (from none to moderator).

Prosody 0.11.5
Lua version: Lua 5.2

Same here, there is something different between the self hosted install from github and what meet.jit.si uses.

Seems like this is actually some kind of bug, because it is clear this isn’t the intended functionality. I’ve tried with a delay, and it still wont work on my install.

Same issue here on my self-hosted install. Also after several diferent test on it and with Prosody 0.10.0 and 0.11.5

I think we could try to open a issue on github and see if someone could help

2 Likes

So, due to the lack of any kind of answer (it makes me think), I’ve just opened an issue here.

It seems that on meet.jit.si the difference is when the role is changed in moderator.
For example, on my jitsi, the change is made at the end of all processes but in meet.jit.si it is done before.

Does anyone know what could be the cause of this?

I am facing similar issue :-

api.addEventListeners({        
        videoConferenceJoined: videoConferenceJoiningListener,                    
});

function videoConferenceJoiningListener(object) {
        api.executeCommand('password', 'random');
}

However, this works fine with jitsi server.

@damencho can you please check this one? Lot of people are facing the same issue.

We need to expose moderator changed event in the api, and use that when becoming a moderator and then setting the password.
PRs for that are welcome.

Hi @damencho, I got the same error. How can we fix it?

@damencho I’ve made the necessary changes to add a: participantRoleChanged API event on my site and the password command works as you said it would.
Would it help to submit a patch? I’m not sure how to speed this up for others…

Yes, please. Thank you.

Done - thanks for the suggestion!

If approved, the following code can be used to send the password command at the proper time:

api.addEventListener("participantRoleChanged", function(event) {
  if (event.role == "moderator") {
    api.executeCommand("password", "conference_password");
  }
});

Lock failed issue solved in my server. I have add delay in javascript then its working fine in my jitsi server. attached the code below

var yourRoomPass = ‘P@55w0rd’;

        setTimeout(() => {
        // why timeout: I got some trouble calling event listeners without setting a timeout :)

            // when local user is trying to enter in a locked room 
            api.addEventListener('passwordRequired', () => {
                
                api.executeCommand('password', yourRoomPass);
            });

            // when local user has joined the video conference 
            api.addEventListener('videoConferenceJoined', (response) => {
              setTimeout(function(){ api.executeCommand('password', yourRoomPass);}, 300);
            });

        }, 10);

Hi there, I also have the same problem. I updated my jitsi installation with the latest version, which should include this patch. But, still I get the same Lock error! Any more ideas?

My install is brand new from git today.

image

image