grover / homebridge-calendar

A calendar plugin for homebridge (https://github.com/nfarina/homebridge), which allows flexible scheduling of triggers using any iCal calendar.
MIT License
73 stars 13 forks source link

UnhandledPromiseRejectionWarning #28

Open Glurz opened 3 years ago

Glurz commented 3 years ago

Every once in a while, I see the following warning in the Log. Is that something that can be fixed in homebridge-calendar?

[27.11.2020, 06:37:53] [Calendar] Polling calendar XXX has raised error: Error: getaddrinfo EAI_AGAIN p51-caldav.icloud.com
(node:559) UnhandledPromiseRejectionWarning: Error: send ENETUNREACH 224.0.1.187:5683
    at doSend (dgram.js:692:16)
    at defaultTriggerAsyncIdScope (internal/async_hooks.js:429:12)
    at afterDns (dgram.js:638:5)
    at processTicksAndRejections (internal/process/task_queues.js:81:21)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:559) 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:559) [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.

This error crashes the plugin and homebridge must be restarted.

Thanks for looking into it!