Error 403 while trying to use docker-jitsi-meet setup as backend for local dev server

Hello there,

I’m crossposting my GitHub issue here, maybe someone around here can help me with this.

I’ve installed this docker setup according to the handbook on a virtual machine on our company network (let’s call it “jitsi01.mycompany.internal”). So far, everything seems to work fine when I go to that URL on port 443. The web container will serve its frontend, and everything, including joining a call, works as expected.

Since my colleagues and I are trying to customize the look and feel of the web frontend for a specific use case, I would like to use this installation as a “backend” for locally running instances of “make dev” (so the devs don’t need to run the whole stack on their computer and two devs can test multi-user flows on the shared backend).

According to the handbook, I can use the env variable “WEBPACK_DEV_SERVER_PROXY_TARGET” for that. Used with https://alpha.jitsi.net everything works, and I can use the local frontend to create/join conferences. However, if I put https://jitsi01.mycompany.internal, the frontend will load and immediately show the message “You have been disconnected”. In my docker logs, only the following shows up when I open https://localhost:8080/test:

docker-web-1      | 10.10.86.12 - - [22/Mar/2022:09:57:24 +0100] "GET /test HTTP/1.1" 200 29248 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36 Edg/99.0.1150.46"
docker-web-1      | 10.10.86.12 - - [22/Mar/2022:09:57:25 +0100] "GET /pwa-worker.js HTTP/1.1" 200 1511 "https://localhost:8080/test" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36 Edg/99.0.1150.46"
docker-web-1      | 10.10.86.12 - - [22/Mar/2022:09:57:25 +0100] "GET /xmpp-websocket?room=test HTTP/1.1" 403 284 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36 Edg/99.0.1150.46"
docker-web-1      | 10.10.86.12 - - [22/Mar/2022:09:57:25 +0100] "GET /manifest.json HTTP/1.1" 200 752 "https://localhost:8080/test" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36 Edg/99.0.1150.46"

(Note the 403 response in the xmpp-websocket call.)

My browser console shows this:

       DOMException: Failed to register a ServiceWorker for scope ('https://localhost:8080/') with script ('https://localhost:8080/pwa-worker.js'): An SSL certificate error occurred when fetching the script.       
       Uncaught TypeError: Cannot read properties of null (reading 'vueDetected')
       WebSocket connection to 'wss://jitsi01.mycompany.internal/xmpp-websocket?room=test' failed:         
       2022-03-22T09:06:03.084Z [JitsiMeetJS.js] <Object.getGlobalOnErrorHandler>:  UnhandledError: Strophe: Websocket error [object Event] Script: null Line: null Column: null StackTrace:  Error: Strophe: Websocket error [object Event]
       2022-03-22T09:06:03.086Z [modules/xmpp/strophe.util.js] <Object.ct.Strophe.log>:  Strophe: Websocket error [object Event]
       2022-03-22T09:06:03.116Z [connection.js] <r.handleConnectionFailed>:  CONNECTION FAILED: connection.otherError
       2022-03-22T09:06:03.760Z [JitsiMeetJS.js] <Object.getGlobalOnErrorHandler>:  UnhandledError: connection.otherError Script: null Line: null Column: null StackTrace:  n/a        
       2022-03-22T09:06:03.767Z [features/base/tracks] Failed to create local tracks ['audio'] bt {gum: {…}, name: 'gum.permission_denied', message: 'User denied permission to use device(s): audio', stack: 'Error\n    at new bt (https://localhost:8080/libs/l…t:8080/libs/lib-jitsi-meet.min.js?v=5913:2:392492'}

Any ideas what might be wrong? Is this even a supported method of usage? Should the docker setup be able to be used as WEBPACK_DEV_SERVER_PROXY_TARGET?
Should I worry about the SSL error? I already tried to “trust” the self-signed localhost certificate to no avail.

Also, does anyone have any pointers on how to debug this issue further? I tried enabling a debug log in nginx, but haven’t been able to modify the nginx config so far from outside the container. What’s the preferred way to do that?

Thanks in advance!

Best,
Lars

I think you may need to set XMPP_CROSS_DOMAIN=true in your .env file.

THANK YOU! That’s it - I suspected I was just missing a simple configuration, but I didn’t know where to start looking. Works as intended now.