Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TimeoutError & Unhandled promise rejection #106

Closed
dekatWin opened this issue Dec 4, 2022 · 3 comments · Fixed by #134
Closed

TimeoutError & Unhandled promise rejection #106

dekatWin opened this issue Dec 4, 2022 · 3 comments · Fixed by #134
Assignees
Labels

Comments

@dekatWin
Copy link
Contributor

dekatWin commented Dec 4, 2022

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
Copy link
Contributor Author

dekatWin commented Dec 4, 2022

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
Copy link
Contributor Author

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
Copy link
Owner

This is another example of an unhandled promise rejection:
image

@MiSchroe MiSchroe self-assigned this Oct 26, 2023
@MiSchroe MiSchroe added the bug label Oct 27, 2023
MiSchroe pushed a commit that referenced this issue Oct 27, 2023
MiSchroe pushed a commit that referenced this issue Feb 9, 2024
-   (Michael Schroeder) [#126](#126) Fixed Adapter-Checker warning.
-   (Michael Schroeder) [#124](#124) Added help message for password in configuration dialog.
-   (Michael Schroeder) [#106](#106) Fixed an unhandled rejection exception.
-   (Michael Schroeder) [#135](#135) Fixed warning for Admin settings.
-   (Michael Schroeder) [#137](#137) Fixed Github Workflows.
-   (Michael Schroeder) [#40](#40) The scene list can be refreshed.
-   (Michael Schroeder) [#129](#129) The state targetPositionRaw is writable to support additional scenarios.
-   (Michael Schroeder) [#133](#133) Added a refreshProduct state to manually refresh the state of a product.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants