[Bug] Websocket connection failure
RomM version 3.2.0
Describe the bug The browser is reporting WebSocket connection failures during scanning.
- Firefox:
Firefox can’t establish a connection to the server at ws://games.x/ws/socket.io/?EIO=4&transport=websocket. - Chrome:
index.ec7ff87d.js:60 WebSocket connection to 'ws://games.x/ws/socket.io/?EIO=4&transport=websocket' failed:
To Reproduce Steps to reproduce the behavior:
- Conduct a library scan
- Open the developer tools of your browser to the console tab
Expected behavior WebSocket does not fail to connect.
User
- OS: Windows 10
Server
- OS: Docker on Open Media Vault (Debian)
Network
- Home network: 192.168.x.x/24
Additional context I cannot tell if my scans run super long without finding new content because my library is massive or because of this defect.
Can you post the container logs? And are you running romm behind a reverse-proxy like caddy or npm?
Docker logs using docker logs -f --since=2m a581794de758
- "GET /ws/socket.io/?EIO=4&transport=websocket HTTP/1.1" 400
INFO: [nginx][2024-06-23 00:36:58] 172.29.0.1 - - "GET /ws/socket.io/?EIO=4&transport=websocket HTTP/1.1" 400 38 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0" rt=0.021 uct="0.000" uht="0.021" urt="0.021"
- "GET /ws/socket.io/?EIO=4&transport=websocket HTTP/1.1" 400
INFO: [nginx][2024-06-23 00:37:58] 172.29.0.1 - - "GET /ws/socket.io/?EIO=4&transport=websocket HTTP/1.1" 400 38 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0" rt=0.025 uct="0.000" uht="0.025" urt="0.025"
I am not running it behind any proxy or reverse proxy.
Firefox says this is the failing code, the ternary:
try {
this.ws = sv &&
!ov ? n ? new wa(t, n) : new wa(t) : new wa(t, n, i)
} catch (o) {
return this.emitReserved('error', o)
}
I had also this issue. Scan the library with https://romm.exampleurl.net -> did not work for me Scan the library with http://192.168.178.27:1028 -> worked for me
For the https://romm.exampleurl.net I use I reverse proxy in Synology to route from http://192.168.178.27:1028 to https://romm.exampleurl.net
Hello, I have the same thing happening to me, if I use a reverse proxy for romm the scans don't work, if I access directly through the IP they do - is there a config I might be missing>
@likegdz https://docs.romm.app/latest/Getting-Started/Reverse-Proxy/
Thank you, that did it!