MiSchroe / ioBroker.klf200

Adapter for ioBroker to connect to a KLF200 interface and run scenes and products.
MIT License
17 stars 14 forks source link

TimeoutError & Unhandled promise rejection #106

Closed dekatWin closed 1 year ago

dekatWin commented 1 year ago

Hab mir zufällig den Debug Log genauer angeschaut um Informationen zu einen Fehler beim Admin Adapter zu finden, dabei ist mir folgende Stelle sofort ins Auge gesprungen:

2022 - 12 - 04 05: 55: 12.083 - �[32minfo�[39m: admin.1(6216) <== Disconnect system.user.admin from 192.12.14.XX admin
2022 - 12 - 04 05: 59: 35.302 - �[31merror�[39m: klf200.0(6264) 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().
2022 - 12 - 04 05: 59: 35.306 - �[31merror�[39m: klf200.0(6264) unhandled promise rejection: Timeout
2022 - 12 - 04 05: 59: 35.306 - �[31merror�[39m: klf200.0(6264) Error
    at new module.exports.TimeoutError(C: \Program Files\iobroker\XYXYYX\node_modules\promise - timeout\index.js: 44: 16)
    at module.exports.timeout(C: \Program Files\iobroker\XYXYYX\node_modules\promise - timeout\index.js: 20: 15)
    at Connection.sendFrameAsync(C: \Program Files\iobroker\XYXYYX\node_modules\klf - 200 - api\dist\connection.js: 158: 50)
    at Product.setTargetPositionAsync(C: \Program Files\iobroker\XYXYYX\node_modules\klf - 200 - api\dist\products.js: 476: 61)
    at PercentageStateChangeHandler.< anonymous > (C: \Program Files\iobroker\XYXYYX\node_modules\iobroker.klf200\build\util\propertyLink.js: 161: 43)
        at process.processTicksAndRejections(node: internal / process / task_queues: 95: 5)
2022 - 12 - 04 05: 59: 35.307 - �[31merror�[39m: klf200.0(6264) Timeout
2022 - 12 - 04 05: 59: 35.308 - �[31merror�[39m: klf200.0(6264) Unhandled promise rejection detected.reason: { "stack": "Error\n    at new module.exports.TimeoutError (C:\\Program Files\\iobroker\\XYXYYX\\node_modules\\promise-timeout\\index.js:44:16)\n    at module.exports.timeout (C:\\Program Files\\iobroker\\XYXYYX\\node_modules\\promise-timeout\\index.js:20:15)\n    at Connection.sendFrameAsync (C:\\Program Files\\iobroker\\XYXYYX\\node_modules\\klf-200-api\\dist\\connection.js:158:50)\n    at Product.setTargetPositionAsync (C:\\Program Files\\iobroker\\XYXYYX\\node_modules\\klf-200-api\\dist\\products.js:476:61)\n    at PercentageStateChangeHandler.<anonymous> (C:\\Program Files\\iobroker\\XYXYYX\\node_modules\\iobroker.klf200\\build\\util\\propertyLink.js:161:43)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)", "message": "Timeout" }, promise: {}
2022 - 12 - 04 05: 59: 35.311 - �[33mwarn�[39m: klf200.0(6264) Terminated(JS_CONTROLLER_STOPPED): unhandled promise rejection
2022 - 12 - 04 05: 59: 35.316 - �[32minfo�[39m: klf200.0(6264) Remove socket listener...
2022 - 12 - 04 05: 59: 35.316 - �[32minfo�[39m: klf200.0(6264) Shutting down event handlers...
2022 - 12 - 04 05: 59: 35.318 - �[32minfo�[39m: klf200.0(6264) Disconnecting from the KLF - 200...
2022 - 12 - 04 05: 59: 35.321 - �[32minfo�[39m: klf200.0(6264) Cleaned everything up...
2022 - 12 - 04 05: 59: 35.903 - �[31merror�[39m: host.YXYX - Win11 instance system.adapter.klf200.0 terminated with code 1(JS_CONTROLLER_STOPPED)
2022 - 12 - 04 05: 59: 35.904 - �[32minfo�[39m: host.YXYX - Win11 Restart adapter system.adapter.klf200.0 because enabled

Ich bin mir nicht sicher ob das Wirklich ein Fehler ist aber es steht zumindest Error dabei.

System Betriebssystem: Windows 11 Architektur: x64 CPU Modell: Intel(R) Celeron(R) J4005 CPU @ 2.00GHz RAM: 7.68 GB Node.js: v18.12.1 NPM: 8.19.2 js-controller: 4.0.23

dekatWin commented 1 year ago

Außerdem ist der Teil hier vielleicht auch interessant, das ist jedoch nur als Debug Info gekennzeichnet:

2022-12-04 14:47:31.043  - �[34mdebug�[39m: admin.1 (7792) Please add to "system.adapter.klf200" common.adminUI={"config":"materialize"}
dekatWin commented 1 year ago

Noch mehr Fehlermeldungen:

klf200.0 | 2022-12-10 16:06:35.235 | error | Unhandled promise rejection detected. reason: {"stack":"Error\n at new module.exports.TimeoutError (C:\\Program Files\\iobroker\\BigBoss\\node_modules\\promise-timeout\\index.js:44:16)\n at module.exports.timeout (C:\\Program Files\\iobroker\\BigBoss\\node_modules\\promise-timeout\\index.js:20:15)\n at Connection.sendFrameAsync (C:\\Program Files\\iobroker\\BigBoss\\node_modules\\klf-200-api\\dist\\connection.js:158:50)\n at Product.setTargetPositionAsync (C:\\Program Files\\iobroker\\BigBoss\\node_modules\\klf-200-api\\dist\\products.js:476:61)\n at PercentageStateChangeHandler.<anonymous> (C:\\Program Files\\iobroker\\BigBoss\\node_modules\\iobroker.klf200\\build\\util\\propertyLink.js:161:43)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","message":"Timeout"}, promise: {}
-- | -- | -- | --
klf200.0 | 2022-12-10 16:06:35.234 | error | Timeout
klf200.0 | 2022-12-10 16:06:35.233 | error | Error at new module.exports.TimeoutError (C:\Program Files\iobroker\BigBoss\node_modules\promise-timeout\index.js:44:16) at module.exports.timeout (C:\Program Files\iobroker\BigBoss\node_modules\promise-timeout\index.js:20:15) at Connection.sendFrameAsync (C:\Program Files\iobroker\BigBoss\node_modules\klf-200-api\dist\connection.js:158:50) at Product.setTargetPositionAsync (C:\Program Files\iobroker\BigBoss\node_modules\klf-200-api\dist\products.js:476:61) at PercentageStateChangeHandler.<anonymous> (C:\Program Files\iobroker\BigBoss\node_modules\iobroker.klf200\build\util\propertyLink.js:161:43) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
klf200.0 | 2022-12-10 16:06:35.233 | error | unhandled promise rejection: Timeout
klf200.0 | 2022-12-10 16:06:35.230 | 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().
MiSchroe commented 1 year ago

This is another example of an unhandled promise rejection: image