Slash in room name is not working

I’m using per_room_max_participants plugin to limit how many users can participate in a subdomain room. This is working properly when I test it using a Chrome browser like this: https://mydomain.com/test/someroom

But when I try to use it programmatically like this:

room = connection.initJitsiConference("test/someroom", options);

The connection is not established. When I go to the same room with Chrome browser, I can’t see this new user in that same room.

I think that the problem could be in nginx routing? Or what could be the problem? I have websocket enabled if that helps.

I just checked the jicofo.log files. And there was this error.

Jicofo 2023-03-10 11:02:41.406 SEVERE: [19] org.jivesoftware.smack.parsing.ExceptionLoggingCallback.handleUnparsableStanza: Smack message parsing exception. Content: '<conference xmlns='http://jitsi.org/protocol/focus' machine-uid='dedb7f016>org.jxmpp.stringprep.XmppStringprepException: wrong room name jid format
        at org.jitsi.xmpp.extensions.jitsimeet.ConferenceIqProvider.getRoomJid(ConferenceIqProvider.java:202)
        at org.jitsi.xmpp.extensions.jitsimeet.ConferenceIqProvider.parse(ConferenceIqProvider.java:74)
        at org.jitsi.xmpp.extensions.jitsimeet.ConferenceIqProvider.parse(ConferenceIqProvider.java:39)
        at org.jivesoftware.smack.provider.IqProvider.parse(IqProvider.java:40)
        at org.jivesoftware.smack.util.PacketParserUtils.parseIQ(PacketParserUtils.java:555)
        at org.jivesoftware.smack.util.PacketParserUtils.parseStanza(PacketParserUtils.java:113)
        at org.jivesoftware.smack.AbstractXMPPConnection.parseAndProcessStanza(AbstractXMPPConnection.java:1450)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection.access$1000(XMPPTCPConnection.java:131)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:972)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$700(XMPPTCPConnection.java:916)
        at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:939)
        at java.base/java.lang.Thread.run(Thread.java:829)

We use the / as a convention for tenants, and since it also has implications when used in a URL you shouldn’t use rooms with it.

Check your config.js https://domain.com/config.js vs https://domain.com/tenant/config.js

I just checked. Only difference is this:

config.js

var subdir = '';
var subdomain = '';

test/config.js

var subdir = 'test/';
var subdomain = 'test.';

Which changes the params that you pass to lib-jitsi-meet. Its is those params changed not adding a slash in the room name is the difference when using tenant for the room.

Ok. So I should somehow alter those values when using a slash in room name? I currently have this setup, where rooms can be in these formats:

  • room
  • sub/room

Yes. Slash is not allowed char for xmpp jids.

1 Like