nikkow / node-red-contrib-tahoma

Node-RED module to control a Somfy Tahoma box (Roller shutters...). Used for home automation flows.
Apache License 2.0
19 stars 11 forks source link

Error unhandled Promise rejection #31

Closed dk5ax closed 3 years ago

dk5ax commented 4 years ago

This is what gets logged when I send a customPosition command to a shutter: (node:1684) UnhandledPromiseRejectionWarning: 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(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1969) (node:1684) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'finished' of undefined at /home/pi/.node-red/node_modules/node-red-contrib-tahoma/dist/nodes/tahoma.js:105:42 at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:97:5)

nikkow commented 3 years ago

Hi @dk5ax,

Thanks for the report. I added additional error catching :). The root cause of the behavior you are encountering might be related to the token management specified in other issues (#27). It will be fixed in the next release.