Skip to content

In 2.70 again Websocket error: frontend:ws: Failed to connect to WebSocket #358

@rionshin

Description

@rionshin

Describe the bug

With latest release I again start to experience web socket error, it was not present in November release.
However everything is working on the frontend, I can see in the Activity tab, all changes and so on.

Zigbee2MQTT version
[2.7.0]
commit: 110149fa

[12/6/2025, 8:47:43 PM] frontend:ws: Failed to connect to WebSocket
[12/6/2025, 8:55:58 PM] frontend:ws: Failed to connect to WebSocket
[12/6/2025, 9:05:57 PM] frontend:ws: Failed to connect to WebSocket
[12/6/2025, 9:12:01 PM] frontend:ws: Failed to connect to WebSocket
[12/6/2025, 9:14:31 PM] frontend:ws: Failed to connect to WebSocket
[12/6/2025, 9:16:41 PM] frontend:ws: Failed to connect to WebSocket
[12/6/2025, 9:20:09 PM] frontend:ws: Failed to connect to WebSocket
[12/6/2025, 9:22:28 PM] frontend:ws: Failed to connect to WebSocket
[12/6/2025, 9:24:03 PM] frontend:ws: Failed to connect to WebSocket
[12/6/2025, 9:25:57 PM] frontend:ws: Failed to connect to WebSocket
[12/6/2025, 9:27:12 PM] frontend:ws: Failed to connect to WebSocket
[12/6/2025, 9:29:12 PM] frontend:ws: Failed to connect to WebSocket
[12/6/2025, 9:30:56 PM] frontend:ws: Failed to connect to WebSocket
[12/6/2025, 9:32:38 PM] frontend:ws: Failed to connect to WebSocket
[12/6/2025, 9:34:32 PM] frontend:ws: Failed to connect to WebSocket
[12/6/2025, 9:36:05 PM] frontend:ws: Failed to connect to WebSocket
[12/6/2025, 9:37:45 PM] frontend:ws: Failed to connect to WebSocket
[12/6/2025, 9:46:40 PM] frontend:ws: Failed to connect to WebSocket
[12/6/2025, 9:49:10 PM] frontend:ws: Failed to connect to WebSocket
[12/6/2025, 9:50:35 PM] frontend:ws: Failed to connect to WebSocket
[12/6/2025, 9:53:40 PM] frontend:ws: Failed to connect to WebSocket
[12/6/2025, 9:54:43 PM] frontend:ws: Failed to connect to WebSocket
[12/6/2025, 9:56:00 PM] frontend:ws: Failed to connect to WebSocket
[12/6/2025, 9:57:29 PM] frontend:ws: Failed to connect to WebSocket

Proxy Setup Nginx

server {
listen 80;
server_name zm.*******.pet;
return 301 https://zm.*****.pet$request_uri;
}

server {
listen 443 ssl;
http2 on;

# In case you want to use basic authentication:
#auth_basic "Login";
#auth_basic_user_file /zigbee2mqtt_htpasswd;

ssl_certificate     /etc/letsencrypt/live/a***.pet/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/a***.pet/privkey.pem;

server_name zm.a****.pet;


location / {
    allow 192.168.30.0/24;
    allow 192.168.20.0/24;
    allow 192.168.1.0/24;
    allow 192.168.2.0/24;
    deny all;
    proxy_pass http://192.168.20.4:8181/;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location /api {
    allow 192.168.30.0/24;
    allow 192.168.20.0/24;
    allow 192.168.1.0/24;
    proxy_pass         http://192.168.20.4:8181/api;
    proxy_set_header Host $host;

    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}

Include global error locations

include /etc/nginx/snippets/errors.conf;

}

To Reproduce

When connect directly with no proxy there is no issue.

Expected behavior

No web socket error

Affected browsers

Firefox, Safari

Stacktrace

Metadata

Metadata

Assignees

No one assigned

    Labels

    StalebugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions