luvolondon / fvtt-module-jitsiwebrtc

Jitsi WebRTC client for FVTT
32 stars 7 forks source link

Issue connecting to custom server #51

Closed flexstrongo closed 3 years ago

flexstrongo commented 3 years ago

Previous versions of the module were able to connect fine, but the latest version kicks off a bunch of error messages in the console when connecting to a custom/private jitsi server.

Module does work when using standard jitsi beta meet site


Logger.js:154 2020-12-09T03:02:25.376Z [modules/RTC/BridgeChannel.js] <l._send>:  Bridge Channel send: no opened channel.
bekriebel commented 3 years ago

Can you turn on debugging from the module settings and post the logs with the additional information? Mostly likely, this is caused by the config.js on your jitsi server not having correct values. If needed, you can override some of these values from the module by enabling "Use Custom Jitsi URLs" in the module settings and putting in the needed values. image

flexstrongo commented 3 years ago

Thanks for the quick response. I double checked my config.js settings and they seem to match the defaults of what the custom urls are looking for as well. This setup was working previously, and does work with regular client connections to my custom jitsi server

flexstrongo.forge-vtt.com-1607519328692.log

bekriebel commented 3 years ago

Hrmm... it seems like the root cause the the error is:

Logger.js:154 2020-12-09T13:04:21.357Z [JitsiConference.js] Failed to accept incoming Jingle session {code: undefined, reason: "service-unavailable", session: "JingleSessionPC[p2p=false,initiator=false,sid=cpv4tfh31mldi]"}code: undefinedreason: "service-unavailable"session: "JingleSessionPC[p2p=false,initiator=false,sid=cpv4tfh31mldi]"proto: Object o @ Logger.js:154

Based on that and the bridge channel issues, my guess is that something is not working right with the BOSH/Websocket connections. Previously, we always assumed a BOSH connection with custom servers. We now read what your config has set for openBridgeChannel. Older versions of Jitsi used BOSH, while some newer ones use Websocket. However, if your server is not set up to handle whichever one is in use (ports blocked or nginx not configured to handle it), that can cause issues like this.

What is openBridgeChannel set to in your config? Also, how old is your Jitsi install? I've certainly seen some Jitsi versions that just flat-out don't work using lib-jitsi-meet - it may be worth upgrading.

For reference, you can also compare your config against https://beta.meet.jit.si/config.js and https://meet.jit.si/config.js.

flexstrongo commented 3 years ago

This is good info. The openBridgeChannel wasn't set in my config, so it defaults to 'datachannel'. If I set it to 'websocket' the "no opened channel" error goes away, but the Jingle Session error still remains.

I suspect you're probably right about a misconfigured service somewhere. Hitting the Jitsi server via the web interface and phone apps works just fine, that's what seems to be so odd about the whole thing.

Is there a way to force the old BOSH connection, or should setting that openBridgeChannel to datachannel do that?

The Jitsi install looks to be up to date.

As a bit of more info on my setup, this is what I used as a guide to get it going Jitsi Setup

Again, thanks for taking the time to investigate

flexstrongo commented 3 years ago

I did a little digging into some of my logs too. Not sure if this is helpful, but when I try to connect via the Jitsi module, my jicofo logs spit out this: Jicofo 2020-12-11 01:13:52.781 SEVERE: [611] org.jitsi.jicofo.AbstractChannelAllocator.log() jvbbrewery@internal.auth.customJitsiServer.com/0eca5cc1-e95e-4e71-815c-c8b44196bbfb - conference ID not found (expired?):null

I don't see this error shoot back on any regular web connections to the site. Attached is the full log from that specific connection. UserID and URL scrubbed.

JicofoScrubbed.log

bekriebel commented 3 years ago

As you said, datachannel is the default which is using BOSH. That should be fine.

I'm not familiar with those jicofo errors. Some things I'm finding seem to indicate that it may be something you can ignore because it just means the conference had expired and was being re-created.

In the module settings, if you enabled "Allow standalone Jitsi users" and then navigate a different window to the Sandalone Jitsi URL, what happens? From that jitsi-meet connection, can you see a user signed in through foundry or vice-versa?

bekriebel commented 3 years ago

Oh, also - if you haven't restarted your Jitsi server lately, can you try that? I saw at least one person reporting that the server can get in a bad state that a restart resolves.

flexstrongo commented 3 years ago

Great debug ideas again. I allowed standalone users and went to the site. Some very weird things happen. I'll end up with like 70 or so participants in the meeting with random names, a lot of them being repeats as well. Any outside user that tries to connect to that server will show up in foundry as a blank box with no video.

I was trying to see if I could set up a room outside of foundry and force it to connect to that (as this is working as expected), doesn't look like there's an option to set a room in the module settings though.

I'll dig through some of these logs some more to see if anything else sticks out

Screenshot 2020-12-13 135738

bekriebel commented 3 years ago

@flexstrongo can you try the latest release? v0.4.11 includes a patch that may help.

flexstrongo commented 3 years ago

Hey Thanks, @bekriebel ! I appreciate the follow up, looks like the same issue persists in the new patch.

bekriebel commented 3 years ago

@flexstrongo would you be willing to provide me with temporary prosody credentials to your jitsi server and/or a login to your foundry server? I'm not sure how to debug this one and haven't been able to replicate it. If that would be okay, you can message me via DM on discord (bekit#8423) or you can email github@bekit.net.

bekriebel commented 3 years ago

I still think this may be server specific. Is there any way I could test this out on the server having the issue? Otherwise, I'm not sure if there's anything I can do to fix this.

flexstrongo commented 3 years ago

@bekriebel yes! Sorry, got tied up with some things. I will set you up with logins and info this weekend. I really appreciate the help.

bekriebel commented 3 years ago

Thanks for sending me additional info!

It looks like you tracked this down to the conference room name somehow getting corrupted. The room name used to get reset by FVTT any time server settings were changed, but it looks like that doesn't happen anymore. In the future, I'll build in a way to reset this in the UI.

For the time being, you can run the following command in the developer console and it will reset the room name with a new random string:

game.webrtc.client.settings.set("world", "server.room", randomID(32));`

Let me know if this works out for you!

bekriebel commented 3 years ago

Just heard back that this worked out. Thanks for working with me to debug!