romm icon indicating copy to clipboard operation
romm copied to clipboard

[Bug] Websocket connection failure

Open prettydiff opened this issue 1 year ago • 3 comments

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:

  1. Conduct a library scan
  2. 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.

prettydiff avatar Jun 22 '24 00:06 prettydiff

Can you post the container logs? And are you running romm behind a reverse-proxy like caddy or npm?

gantoine avatar Jun 22 '24 16:06 gantoine

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)
    }

prettydiff avatar Jun 23 '24 00:06 prettydiff

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

update-freak avatar Aug 10 '24 13:08 update-freak

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 avatar Sep 02 '25 22:09 likegdz

@likegdz https://docs.romm.app/latest/Getting-Started/Reverse-Proxy/

gantoine avatar Sep 03 '25 01:09 gantoine

Thank you, that did it!

likegdz avatar Sep 03 '25 08:09 likegdz