Iobroker lovelace-UI permamently crashes under Node.js 18.18.2
marian-t-web-de opened this issue · 5 comments
Describe the bug
Iobroker lovelace instance permamently terminates after upgrade of NPM to 9.8.1 and Node.js from 16.x to 18.18.2
To Reproduce
Steps to reproduce the behavior:
- After upgrade of Node.js to 18.18.2 start lovelace
- Go to Iobroker log
- look for lovelace entries
- See error in log
Expected behavior
lovelace instance works without terminate
Screenshots & Logfiles
`
lovelace.0 | 2023-11-01 14:42:51.981 | warn | Terminated (UNCAUGHT_EXCEPTION): Without reason |
---|---|---|---|
lovelace.0 | 2023-11-01 14:42:51.979 | info | terminating |
lovelace.0 | 2023-11-01 14:42:51.974 | info | cleaned everything up... |
lovelace.0 | 2023-11-01 14:42:51.939 | error | Error The pattern "typeof window.socketLoadedHandler === 'function' && window.socketLoadedHandler()" is not a valid ID pattern |
lovelace.0 | 2023-11-01 14:42:51.938 | error | ReplyError: Error The pattern "typeof window.socketLoadedHandler === 'function' && window.socketLoadedHandler()" is not a valid ID pattern at parseError (/opt/iobroker/node_modules/redis-parser/lib/parser.js:179:12) at parseType (/opt/iobroker/node_modules/redis-parser/lib/parser.js:302:14) |
lovelace.0 | 2023-11-01 14:42:51.937 | error | unhandled promise rejection: Error The pattern "typeof window.socketLoadedHandler === 'function' && window.socketLoadedHandler()" is not a valid ID pattern |
lovelace.0 | 2023-11-01 14:42:51.936 | error | Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). |
host.raspberrypi | 2023-11-01 14:42:51.924 | warn | host.raspberrypi-Server States 127.0.0.1:60824 Error from InMemDB: Error: The pattern "typeof window.socketLoadedHandler === 'function' && window.socketLoadedHandler()" is not a valid ID pattern at Object.pattern2RegEx (/opt/iobroker/node_modules/@iobroker/js-controller-common/src/lib/common/tools.ts:2497:15) at StatesInMemoryServer.handleSubscribe (/opt/iobroker/node_modules/@iobroker/db-base/src/lib/inMemFileDB.ts:324:59) at StatesInMemoryServer._subscribeForClient (/opt/iobroker/node_modules/@iobroker/db-states-file/src/lib/states/statesInMemFileDB.js:258:14) at RedisHandler. (/opt/iobroker/node_modules/@iobroker/db-states-jsonl/src/lib/states/statesInMemServerRedis.js:395:26) at RedisHandler.emit (node:events:517:28) at RedisHandler.emit (node:domain:489:12) at Immediate._onImmediate (/opt/iobroker/node_modules/@iobroker/db-base/src/lib/redisHandler.ts:209:37) at processImmediate (node:internal/timers:476:21) |
lovelace.0 | 2023-11-01 14:42:50.406 | error | Malformed rgb string null expecting six hex digits. |
lovelace.0 | 2023-11-01 14:42:50.079 | warn | Got duplicate for entity sensor.rpi4_cpu_load5. Overwriting old value. Was for rpi2.0.cpu.load5 and new one is for alias.0.rpi4.cpu_load5 |
lovelace.0 | 2023-11-01 14:42:49.972 | warn | Got duplicate for entity switch.Shelly1PM_840d8e_Bad. Overwriting old value. Was for shelly.0.SHSW-PM#840D8EB1E1C5#1 and new one is for shelly.0.SHSW-PM#840D8EB1E1C5#1.Relay0.Switch |
lovelace.0 | 2023-11-01 14:42:46.403 | info | http server listening on port 8091 |
lovelace.0 | 2023-11-01 14:42:46.154 | warn | Information for Developer: Using the direct "Let's encrypt" module import is deprecated and will be removed in the next js-controller version, use @iobroker/webserver instead |
lovelace.0 | 2023-11-01 14:42:46.081 | info | starting. Version 3.0.1 (non-npm: ioBroker/ioBroker.lovelace) in /opt/iobroker/node_modules/iobroker.lovelace, node: v18.18.2, js-controller: 5.0.12 |
Versions:
raspberrypi
Plattform
linux
Betriebssystem
linux
Architektur
arm
CPUs
4
Geschwindigkeit
1500 MHz
Modell
ARMv7 Processor rev 3 (v7l)
RAM
3.75 GB
System-Betriebszeit
01:33:50
Node.js
v18.18.2
time
1698846851742
timeOffset
-60
NPM
9.8.1
Anzahl der Adapter
507
Datenträgergröße
28.14 GB
freier Festplattenspeicher
20.78 GB
Aktive Instanzen
24
Pfad
/opt/iobroker/
Betriebszeit
01:05:56
Hostname
raspberrypi
Additional context
Some new errors in log acc. to lovelace crash
host.raspberrypi | 2023-11-01 15:19:23.535 | info | Restart adapter system.adapter.lovelace.0 because enabled |
---|---|---|---|
host.raspberrypi | 2023-11-01 15:19:23.535 | error | instance system.adapter.lovelace.0 terminated with code 6 (UNCAUGHT_EXCEPTION) |
host.raspberrypi | 2023-11-01 15:19:23.534 | error | Caught by controller[5]: Unknown request: {"type":"config/area_registry/list","id":32} |
host.raspberrypi | 2023-11-01 15:19:23.534 | error | Caught by controller[4]: Unknown request: {"type":"config/device_registry/list","id":31} |
host.raspberrypi | 2023-11-01 15:19:23.534 | error | Caught by controller[3]: Unknown request: {"type":"config/entity_registry/list","id":30} |
host.raspberrypi | 2023-11-01 15:19:23.534 | error | Caught by controller[2]: Unknown request: {"type":"config/area_registry/list","id":28} |
host.raspberrypi | 2023-11-01 15:19:23.534 | error | Caught by controller[1]: Unknown request: {"type":"config/device_registry/list","id":27} |
host.raspberrypi | 2023-11-01 15:19:23.533 | error | Caught by controller[0]: Unknown request: {"type":"config/entity_registry/list","id":26} |
lovelace.0 | 2023-11-01 15:19:22.863 | warn | Terminated (UNCAUGHT_EXCEPTION): Without reason |
New installation of iobroker on other raspi 3A with on debian 12 / bookworm, lovelace-UI 3.0.1 same error:
host.raspberrypi | 2023-11-04 15:11:40.035 | error | Caught by controller[1]: Unknown request: {"type":"config/device_registry/list","id":38} |
---|---|---|---|
host.raspberrypi | 2023-11-04 15:11:40.035 | error | Caught by controller[0]: Unknown request: {"type":"config/entity_registry/list","id":37} |
lovelace.0 | 2023-11-04 15:11:39.941 | info | terminating |
lovelace.0 | 2023-11-04 15:11:39.437 | warn | Terminated (UNCAUGHT_EXCEPTION): Without reason |
lovelace.0 | 2023-11-04 15:11:39.432 | info | terminating |
lovelace.0 | 2023-11-04 15:11:39.421 | info | cleaned everything up... |
lovelace.0 | 2023-11-04 15:11:39.381 | error | Error The pattern "typeof window.socketLoadedHandler === 'function' && window.socketLoadedHandler()" is not a valid ID pattern |
lovelace.0 | 2023-11-04 15:11:39.380 | error | ReplyError: Error The pattern "typeof window.socketLoadedHandler === 'function' && window.socketLoadedHandler()" is not a valid ID pattern at parseError (/opt/iobroker/node_modules/redis-parser/lib/parser.js:179:12) at parseType (/opt/iobroker/node_modules/redis-parser/lib/parser.js:302:14) |
lovelace.0 | 2023-11-04 15:11:39.377 | error | unhandled promise rejection: Error The pattern "typeof window.socketLoadedHandler === 'function' && window.socketLoadedHandler()" is not a valid ID pattern |
lovelace.0 | 2023-11-04 15:11:39.375 | error | Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). |
host.raspberrypi-Server | 2023-11-04 15:11:39.045 | warn | States 127.0.0.1:37204 Error from InMemDB: Error: The pattern "typeof window.socketLoadedHandler === 'function' && window.socketLoadedHandler()" is not a valid ID pattern at Object.pattern2RegEx (/opt/iobroker/node_modules/@iobroker/js-controller-common/src/lib/common/tools.ts:2497:15) at StatesInMemoryServer.handleSubscribe (/opt/iobroker/node_modules/@iobroker/db-base/src/lib/inMemFileDB.ts:324:59) at StatesInMemoryServer._subscribeForClient (/opt/iobroker/node_modules/@iobroker/db-states-file/src/lib/states/statesInMemFileDB.js:258:14) at RedisHandler. (/opt/iobroker/node_modules/@iobroker/db-states-jsonl/src/lib/states/statesInMemServerRedis.js:395:26) at RedisHandler.emit (node:events:517:28) at RedisHandler.emit (node:domain:489:12) at Immediate._onImmediate (/opt/iobroker/node_modules/@iobroker/db-base/src/lib/redisHandler.ts:209:37) at processImmediate (node:internal/timers:476:21) |
lovelace.0 | 2023-11-04 15:11:36.958 | info | http server listening on port 8091 |
lovelace.0 | 2023-11-04 15:11:36.552 | warn | Information for Developer: Using the direct "Let's encrypt" module import is deprecated and will be removed in the next js-controller version, use @iobroker/webserver instead |
lovelace.0 | 2023-11-04 15:11:36.491 | info | starting. Version 3.0.1 in /opt/iobroker/node_modules/iobroker.lovelace, node: v18.18.2, js-controller: 5.0.12 |
host.raspberrypi | 2023-11-04 15:11:28.918 | info | instance system.adapter.lovelace.0 started with pid 3339 |
host.raspberrypi | 2023-11-04 15:10:58.805 | info | Restart adapter system.adapter.lovelace.0 because enabled |
System info:
Plattform: linux
Betriebssystem: linux
Architektur: arm
CPUs: 4
Geschwindigkeit: 1200 MHz
Modell: ARMv7 Processor rev 4 (v7l)
RAM: 921.9 MB
System-Betriebszeit: 06:35:07
Node.js: v18.18.2
time: 1699111308545
timeOffset: --
NPM: 9.8.1
Adapter-Anzahl: 507
Datenträgergröße: 27.9 GB
Freier Festplattenspeicher: 25.0 GB
Aktive Instanzen: 3
Pfad: /opt/iobroker/
Betriebszeit: 16:59:24
aktiv:
For me seems the following log-entry describes the reason:
'Error The pattern "typeof window.socketLoadedHandler === 'function' && window.socketLoadedHandler()" is not a valid ID pattern at Object.pattern2RegEx'
On the second Installation on RPi3 with Debian Bookworm I've downgreaded node.js to ver. 18.13.0 (acc. to howto-nodejs-installation-und-upgrades-unter-debian). Lovelace is working again, vis UI not more - but it is an another problem.
Resumee: lovelace is working with node.js 18.13.0, but - by me - with 18.18.2 not more.
Deleting Lovelace Adapter, downloading cards again into it - leaving obsolete cards, removing obsolete cards from cofig.yaml, restarting iobroker helps - no more lovelace crashes. Update node.js to 18.18.2: everything is working.
I did not find the time to answer, sorry. Glad you solved it yourself.
On my system lovelace runs fine with node 18 since some time. I'm not sure, if really cards could be the issue. 🤔