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

Handle an invalid value for trigger duration gracefully #790

Closed
Tracked by #10797
kesselb opened this issue Feb 11, 2025 · 1 comment · Fixed by #795
Closed
Tracked by #10797

Handle an invalid value for trigger duration gracefully #790

kesselb opened this issue Feb 11, 2025 · 1 comment · Fixed by #795
Assignees
Labels
3. to review bug Something isn't working

Comments

@kesselb
Copy link

kesselb commented Feb 11, 2025

Steps to reproduce

  1. Open outlook.com
  2. Create a new event
  3. Pick "At time of event" as reminder
  4. Invite an external attendee

Expected behavior

It should be possible to parse the calendar invitation

Actual behavior

Parsing the calendar invitations fails

Error: invalid duration value: Not enough duration components in ""
    icalduration_from_string ical.js:4153
    decorate ical.js:811
    _decorate ical.js:2957
    _hydrateValue ical.js:2940
    getFirstValue ical.js:3086

Library version

No response

Additional info

Georg's recommendation:
kewisch/ical.js#400 (comment)

Example event:

BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:Microsoft Exchange Server 2010
VERSION:2.0
BEGIN:VTIMEZONE
TZID:W. Europe Standard Time
BEGIN:STANDARD
DTSTART:16010101T030000
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T020000
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
ORGANIZER;CN=Bob:mailto:bob@example.org
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=alice@example.org:mailto:alice@example.org
DESCRIPTION;LANGUAGE=en-US:\n
UID:100020003000
SUMMARY;LANGUAGE=en-US:Remind me test
DTSTART;TZID=W. Europe Standard Time:20250219T080000
DTEND;TZID=W. Europe Standard Time:20250219T083000
CLASS:PUBLIC
PRIORITY:5
DTSTAMP:20250211T161355Z
TRANSP:OPAQUE
STATUS:CONFIRMED
SEQUENCE:0
LOCATION;LANGUAGE=en-US:
X-MICROSOFT-CDO-APPT-SEQUENCE:0
X-MICROSOFT-CDO-OWNERAPPTID:2123520737
X-MICROSOFT-CDO-BUSYSTATUS:TENTATIVE
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-CDO-INSTTYPE:0
X-MICROSOFT-DONOTFORWARDMEETING:FALSE
X-MICROSOFT-DISALLOW-COUNTER:FALSE
X-MICROSOFT-REQUESTEDATTENDANCEMODE:DEFAULT
X-MICROSOFT-ISRESPONSEREQUESTED:TRUE
X-MICROSOFT-LOCATIONS:[]
BEGIN:VALARM
DESCRIPTION:REMINDER
TRIGGER;RELATED=START:P
ACTION:DISPLAY
END:VALARM
END:VEVENT
END:VCALENDAR
@kesselb kesselb added 0. to triage bug Something isn't working labels Feb 11, 2025
@kesselb kesselb changed the title Handle an invalid value for duration gracefully Handle an invalid value for trigger duration gracefully Feb 11, 2025
@st3iny
Copy link
Member

st3iny commented Feb 11, 2025

Outlook seems to set invalid alarms with a trigger value of P instead of PT0S or P0D. We could add another repair step to fix those and then continue parsing as usual.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review bug Something isn't working
Projects
Status: ☑️ Done
Development

Successfully merging a pull request may close this issue.

2 participants