nurikk / zigbee2mqtt-frontend

Zigbee2MQTT frontend
https://www.zigbee2mqtt.io/
GNU General Public License v3.0
259 stars 183 forks source link

Front end keeps restarting Z2M #2129

Open qery opened 1 month ago

qery commented 1 month ago

What happened?

After adding device (Aqara H1 switch) to my network (~40 devices), the Z2M started to crash with following error in log:

[18:39:12] INFO: Preparing to start... [18:39:12] INFO: Socat not enabled [18:39:13] INFO: Starting Zigbee2MQTT... Starting Zigbee2MQTT without watchdog. RangeError: Invalid time value at Date.toISOString () at Object.formatDate (/app/lib/util/utils.ts:86:52) at Frontend.onWebSocketConnection (/app/lib/extension/frontend.ts:147:43) at WebSocketServer.emit (node:events:517:28) at /app/lib/extension/frontend.ts:111:30 at Frontend.authenticate (/app/lib/extension/frontend.ts:104:9) at /app/lib/extension/frontend.ts:109:18 at WebSocketServer.completeUpgrade (/app/node_modules/ws/lib/websocket-server.js:436:5) at WebSocketServer.handleUpgrade (/app/node_modules/ws/lib/websocket-server.js:344:10) at Frontend.onUpgrade (/app/lib/extension/frontend.ts:108:18)

Adding of device seems to be unsuccessfull because I can't see it in HA. Z2M resets as long as I try to open frontend, if I do not, the network works. I was not able to download state.json.zip from error message (blinking link) - does nothing on chrome and firefox and frontend is unusable. I tried to switch from emby to ezsp adapter with no change.

After removing last device from database.db the frontend works again: {"id":56,"type":"Unknown","ieeeAddr":"0x54ef44**********","nwkAddr":12690,"epList":[],"endpoints":{},"interviewCompleted":false,"meta":{}}

2024-09-15

What browsers are you seeing the problem on?

Firefox, Chrome

Relevant stacktrace

**Current url**: http://192.168.0.4:8123/api/hassio_ingress/dEubc3KyhCs1vZARA4csI_SaNPef8SRFrI8Zi9f-njM/#/
**Previous url**: http://192.168.0.4:8123/hassio

**Error type**: Error
**Error message**: Unable to preload CSS for http://192.168.0.4:8123/api/hassio_ingress/dEubc3KyhCs1vZARA4csI_SaNPef8SRFrI8Zi9f-njM/assets/index-e4174e1c.css

Ja/</</<@http://192.168.0.4:8123/api/hassio_ingress/dEubc3KyhCs1vZARA4csI_SaNPef8SRFrI8Zi9f-njM/assets/index-74e84a13.js:64:28897

Did you download state.json.zip?

I will not attach state.json.zip

qery commented 1 month ago

After removing the "unknown" device (which was device I fas adding but failed) from database.db and starting pairing, closing frontend window, and pairing device again it is working fine.