beele / homebridge-unifi-protect-camera-motion

Camera & Motion sensor support for Unifi Protect cameras in Homekit via Homebridge
Apache License 2.0
103 stars 12 forks source link

UnhandledPromiseRejectionWarning: Error: Cannot load image! #22

Closed danieljbnz closed 4 years ago

danieljbnz commented 4 years ago

Receiving the following error in my logs anytime motion is detected if enable anonymous snapshots is not enable. This Error should be handled more gracefully to advise the user what the issue is.


(node:3606) UnhandledPromiseRejectionWarning: Error: Cannot load image!
    at Function.<anonymous> (/usr/local/lib/node_modules/homebridge-unifi-protect-camera-motion/src/coco/loader.js:42:23)
    at Generator.throw (<anonymous>)
    at rejected (/usr/local/lib/node_modules/homebridge-unifi-protect-camera-motion/src/coco/loader.js:6:65)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
(node:3606) 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(). (rejection id: 25)```
beele commented 4 years ago

Will look into this