onfoot / homebridge-valetudo-xiaomi-vacuum

A Homebridge plugin for Xiaomi/Roborock vacuum cleaners running Valetudo
MIT License
31 stars 9 forks source link

UnhandledPromiseRejectionWarning #10

Closed mrlitchyb closed 3 years ago

mrlitchyb commented 4 years ago

Just wanted to leave this here so the problem is not forgotten ;)

Did not find the issue in the code myself on first glance but this shows up when I send my vaccum back home:


    at /usr/local/lib/node_modules/homebridge-valetudo-xiaomi-vacuum/index.js:270:17
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:2238) 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: 1)
(node:2238) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```
onfoot commented 4 years ago

Yeah, it was missing the local log variable, which wasn't set from this.log at the beginning of the goHome function. Fixed this too in the 0.1.4, although now I noticed that parsing the go home response will still fail, but at least it will actually start going home when told to. ;)

onfoot commented 3 years ago

Oh crap. Just found a fix for home request handling on my other computer. Will post it soon™!

T-Bone90 commented 3 years ago

Could you make your plugin working with Valetudo RE too? :)

onfoot commented 3 years ago

Yeah, given the amount of requests for that I think I'll finally do it!

onfoot commented 3 years ago

If you're still interested, @T-Bone90, version 0.1.5 is there to check out with some updates!

And the go home response issue should be fixed as well.