Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uncaught exception: No toISOString function in exdate[name] #172

Open
marsmaennchen opened this issue Dec 28, 2021 · 5 comments
Open

uncaught exception: No toISOString function in exdate[name] #172

marsmaennchen opened this issue Dec 28, 2021 · 5 comments

Comments

@marsmaennchen
Copy link

No toISOString function in exdate[name]
TypeError: No toISOString function in exdate[name] at Object.EXDATE (/opt/iobroker/node_modules/node-ical/ical.js:299:17) at Object.handleObject (/opt/iobroker/node_modules/node-ical/ical.js:571:39) at Object.parseLines (/opt/iobroker/node_modules/node-ical/ical.js:623:18) at Immediate.<anonymous> (/opt/iobroker/node_modules/node-ical/ical.js:638:16) at processImmediate (internal/timers.js:464:21)

@xRealNeon
Copy link

Got the same error, any updates @jens-maus ?

@Apollon77
Copy link
Contributor

Apollon77 commented Jan 12, 2023

Can you try to get a minimal ics File that can reproduce this error?

Tis error happensd when exDate is somehow strange becaue it contains something BUT mot a valid date object, so finding the reason would be ideal

@sdetweil
Copy link
Contributor

@marsmaennchen @xRealNeon I had to put a fix in our application as the dates are returned from rrule.between() , not by ical.

                                        let dates=rrule.between(x,y) // get the list of rule matching dates
					dates = dates.filter((d) => {    // filter out any garbage dates.. usually when TZ is trash
						if (JSON.stringify(d) === "null") return false;
						else return true;
					});

@sdetweil
Copy link
Contributor

this should be closed as a dup of
#144

@johnhundley
Copy link

johnhundley commented Aug 5, 2024

I am getting this error after updating to a new version of node-ical. I have isolated the version in which the behavior changed, it changed between 0.12.6 and 0.12.7. The attached code will recreate the error (works in versions earlier than 0.12.7)

const ical = require('node-ical');

const myevents = "BEGIN:VEVENT\r\nDTSTART:20230105T191500Z\r\nDTEND:20230105T193000Z\r\nRRULE:FREQ=WEEKLY;INTERVAL=1\r\nDTSTART:20230105T193000Z\r\nDTEND:20230105T194500Z\r\nRRULE:FREQ=WEEKLY;INTERVAL=1\r\nEND:VEVENT\r\n";


async function doit(){
    var events = await ical.async.parseICS(myevents);
}
console.log("Starting....");
doit()
  .then(() => {
    console.log("Finished....");
    process.exit(0);
  })
  .catch(err => {
    console.error(err);
    process.exit(1);
  });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants