Grizzelbee/ioBroker.robonect

"Error: Unhandled promise rejection."

Closed this issue · 1 comments

Many thanks to @Grizzelbee for this adapter update, and especially for implementing a 'STOP Mower' datapoint!

Today I experienced the following sequence of iobroker failure messages after issuing the 'STOP Mower' command a second time (approx. 5 minutes after the first 'STOP Mower' command):

2023-09-26 15:33:16.752 - error: robonect.0 (315) 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().
2023-09-26 15:33:16.752 - error: robonect.0 (315) unhandled promise rejection: undefined
2023-09-26 15:33:16.752 - error: robonect.0 (315) undefined
2023-09-26 15:33:16.943 - info: robonect.0 (315) cleaned everything up...
2023-09-26 15:33:16.944 - info: robonect.0 (315) terminating
2023-09-26 15:33:16.946 - warn: robonect.0 (315) Terminated (UNCAUGHT_EXCEPTION): Without reason
2023-09-26 15:33:17.569 - error: host.iobroker Caught by controller[0]: 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(). The promise rejected with the reason:
2023-09-26 15:33:17.570 - error: host.iobroker Caught by controller[1]: {
2023-09-26 15:33:17.571 - error: host.iobroker Caught by controller[1]: successful: false,
2023-09-26 15:33:17.571 - error: host.iobroker Caught by controller[1]: error_code: 7,
2023-09-26 15:33:17.571 - error: host.iobroker Caught by controller[1]: error_message: 'Automower already stopped'
2023-09-26 15:33:17.571 - error: host.iobroker Caught by controller[1]: }
2023-09-26 15:33:17.571 - error: host.iobroker instance system.adapter.robonect.0 terminated with code 6 (UNCAUGHT_EXCEPTION)
2023-09-26 15:41:54.388 - info: host.iobroker Restart adapter system.adapter.robonect.0 because enabled

This repeats again if the 'STOP Mower' command is issued a third and fourth time (then, the adapter restart is suppressed by the iobroker host 'because restart loop detected').

As a consequence, I re-programmed my application to only issue the stop command once. However I guess the error described above could easily be handled in the robonect adapter as well.

@vowill
Thanx for your warm words...

I totally agree that this error should be handeled inside the adapter. I flagged this issue as a bug and will fix it asap.