rommapp / romm

A beautiful, powerful, self-hosted rom manager
https://romm.app
GNU Affero General Public License v3.0
1.52k stars 69 forks source link

[Bug] Websocket connection failure #946

Open prettydiff opened 1 week ago

prettydiff commented 1 week ago

RomM version 3.2.0

Describe the bug The browser is reporting WebSocket connection failures during scanning.

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

Server

Network

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.

gantoine commented 1 week ago

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

prettydiff commented 1 week ago

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