Adapter Crash js-controller 5.x
mharms1 opened this issue · 2 comments
mharms1 commented
Adpater crash with js-controller since 5.0 (currently 5.0.8):
`sureflap.1 | 2023-07-20 21:49:21.601 | error | undefined is not a valid state value |
---|---|---|---|
sureflap.1 | 2023-07-20 21:49:21.600 | error | Error: undefined is not a valid state value at Object.maybeCallbackWithError (/opt/iobroker/node_modules/@iobroker/js-controller-common/build/lib/common/maybeCallback.js:35:17) at Sureflap._setState (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:5388:49) at Sureflap.setState (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:5349:21) at Sureflap.setSerialNumberToAdapter (/opt/iobroker/node_modules/iobroker.sureflap/main.js:1288:9) at /opt/iobroker/node_modules/iobroker.sureflap/main.js:576:13 at new Promise () at Sureflap.getDeviceStatusFromData (/opt/iobroker/node_modules/iobroker.sureflap/main.js:554:39) at /opt/iobroker/node_modules/iobroker.sureflap/main.js:300:21 |
sureflap.1 | 2023-07-20 21:49:21.597 | error | unhandled promise rejection: undefined is not a valid state value |
sureflap.1 | 2023-07-20 21:49:21.596 | 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().` |
Sickboy78 commented
Strange that there is a device with an undefined serial number.
Anyway, I fixed it with v1.1.9.
Could you please you confirm?
mharms1 commented
Yes, really strange, and I have not seen this behavior with controllers <5.
Now it works fine with your fix. Perfect, thanks a lot.