MagicMirror icon indicating copy to clipboard operation
MagicMirror copied to clipboard

[Bug] Could not fetch calendar: *** Error: No toISOString function in curr.start undefined

Open Don-Quichot opened this issue 3 months ago • 3 comments

Environment

MagicMirror² version: 2.32 Node version: 24.8 npm version: 11.6 Platform: RaspberryPi Zero 2 W

Which start option are you using?

node --run start

Are you using PM2?

No

Module

calendar

Have you tried disabling other modules?

  • [ ] Yes
  • [x] No

Have you searched if someone else has already reported the issue on the forum or in the issues?

  • [x] Yes

What did you do?

Adding a (large) calendar to the config.js. The source is a calendar that comes from my NextCloud server.

Configuration

Import fails with error: [ERROR] Calendar Error. Could not fetch calendar: https://mynextcloudserver/remote.php/dav/public-calendars/***?export Error: No toISOString function in curr.start undefined

Relevant part of configuration:
 {
                                                fetchInterval: 30 * 60 * 1000,
                                                symbol: "calendar",
                                                url: "https://mynextcloudserverl/remote.php/dav/public-calendars/***?export",
                                       },

When the module is trying to fetch the calendar the following error message appears:

[ERROR] Calendar Error. Could not fetch calendar: https://mynextcloudserver/remote.php/dav/public-calendars/?export Error: No toISOString function in curr.start undefined at Object.END (//MagicMirror/node_modules/node-ical/ical.js:640:19) at Object.handleObject (//MagicMirror/node_modules/node-ical/ical.js:696:39) at Object.parseLines (//MagicMirror/node_modules/node-ical/ical.js:748:18) at Object.parseICS (//MagicMirror/node_modules/node-ical/ical.js:784:18) at sync.parseICS (//MagicMirror/node_modules/node-ical/node-ical.js:198:15) at autodetect.parseICS (//MagicMirror/node_modules/node-ical/node-ical.js:229:17) at //MagicMirror/modules/default/calendar/calendarfetcher.js:58:18 at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

Another, much shorter, calendar from the same NextCloud server is imported without errors.

This may or may not be a faulty calendar entry.


Steps to reproduce the issue:


### What did you expect to happen?

Import calendar without errors, or maybe after ignoring or correcting possibly faulty entries.

### What actually happened?

Calendar was not imported.

### Additional comments

_No response_

### Participation

- [ ] I am willing to submit a pull request for this change.

Don-Quichot avatar Sep 26 '25 14:09 Don-Quichot

This is a bad calendar entry

Looks like it is missing a dtstart tag

Only thing I can suggest is to download the ics file And do a half cut (cut off the bottom half) then use that file If it still fails, its in the top half, else the bottom half

And repeat til you find it

This is not an MagicMirror bug. The parser, node-iCal is the one reporting the problem I fixed a similar problem there a couple years ago, to now report the missing tag

sdetweil avatar Sep 26 '25 15:09 sdetweil

Thanks for your quick reply. I will go on a quest for the faulty entry.

Don-Quichot avatar Sep 26 '25 16:09 Don-Quichot

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Nov 29 '25 02:11 github-actions[bot]