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

Crash on iCloud Calendar #15

Closed nano9g closed 2 years ago

nano9g commented 4 years ago

Using 0.4.0 on Node 11.9.0 (the latest version supported on ARMv6) I get a crash when trying to load a calendar from iCloud. If I revert to 0.3.6 it works fine. I've downloaded and attached the ics file.

TypeError: Cannot read property 'toJSDate' of null
    at getTimes (/opt/node/lib/node_modules/homebridge-calendar/node_modules/ical-expander/index.js:40:53)
    at events.filter.forEach (/opt/node/lib/node_modules/homebridge-calendar/node_modules/ical-expander/index.js:110:38)
    at Array.forEach (<anonymous>)
    at IcalExpander.between (/opt/node/lib/node_modules/homebridge-calendar/node_modules/ical-expander/index.js:63:57)
    at CalendarPoller._refreshCalendar (/opt/node/lib/node_modules/homebridge-calendar/src/CalendarPoller.js:78:30)
    at IncomingMessage.resp.on (/opt/node/lib/node_modules/homebridge-calendar/src/CalendarPoller.js:54:14)
    at IncomingMessage.emit (events.js:202:15)
    at endReadableNT (_stream_readable.js:1129:12)
    at processTicksAndRejections (internal/process/next_tick.js:76:17)
nano9g commented 2 years ago

Resolved by running in a child bridge as recommended in https://github.com/grover/homebridge-calendar/issues/29#issuecomment-787440377