Skip to content

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

@Don-Quichot

Description

@Don-Quichot

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
  • No

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

  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions