Can't connect via API to a password protected meeting

In order to programmatically have all users share the same password, I use the following:

meetAPI = new JitsiMeetExternalAPI(“meet.jit.si”, options);
meetAPI.executeCommand(‘displayName’, userName);
meetAPI.addEventListener(‘videoConferenceJoined’, SetPassword);
meetAPI.addEventListener(‘passwordRequired’, SetPassword);
meetAPI.addEventListener(‘videoConferenceLeft’, AllDone);

and

function SetPassword() {
meetAPI.executeCommand(‘password’, ‘something’);
}

This worked fine earlier in the week. The first person in, set the password for the room via the videoConferenceJoined event. Subsequent joiners entered the room automatically without having to enter the password because it was supplied via the passwordRequired.

Today, the first person in sets the password OK. Subsequent joiners see the meeting room flash up then disappear.

In the console log for the failing session, I see:

app.bundle.min.js:126 2020-05-07T17:43:58.283Z [conference.js] <ee._onConferenceFailed>: CONFERENCE FAILED: conference.passwordRequired
app.bundle.min.js:126 2020-05-07T17:43:58.294Z [features/base/connection] conference.passwordRequired

I read that as saying that the password I supplied is blank, but it definitely isn’t. I can see by debugging it’s setting it correctly. I don’t use any fancy characters.

I thought it might be a timing issue, but delaying the addEventListeners by a second. Removing them altogether allowed both parties to join.

I’ve seen this behaviour in Windows 10 (Chrome and Edge-Chrome), Android Chrome and IOS.

I hope you can help,