Closed Bug 1868843 Opened 2 years ago Closed 2 years ago

"ParserError: invalid ical body" when opening invites from outlook (office 365)

Categories

(Calendar :: E-mail based Scheduling (iTIP/iMIP), defect)

Thunderbird 121
defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: wzhou, Unassigned)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36

Steps to reproduce:

  1. Receive an email with an attached calendar invite, sent by someone using outlook (office 365)

Actual results:

  1. When viewing the email, the details of the calendar invite are parsed and displayed

An error message can be seen in the console:

Calendar: ParserError: invalid ical body. component began but did not end'ParserError: invalid ical body. component began but did not end' when calling method: [calIICSService::parseICS] when parsing:
[ical contents here]
CalIcsParser.jsm:155

uncaught exception: ParserError: invalid ical body. component began but did not end
CalIcsParser.jsm:152:39

Expected results:

  1. The details of the invite are not shown and only the body of the email is displayed

Some things I noticed while trying to debug this issue:

  1. This started happening around 2023-12-04. As recently as the day before I've received invites that could be parsed by Thunderbird. However invites received starting 2023-12-05 failed to be parsed.
  2. Invites from old emails, even when I resend/forward them continue to be parsed successfully
  3. After extracting the ical files from working and broken invites, and then comparing them, it seems like the cause is that certain parts of the files are missing in the broken ones. My guess is that outlook suddenly started not including them, which caused the parser to break. I've attached a screenshot of a comparison between a working invite (left) and a broken invite (right). Sensitive details have been redacted.
Summary: ParserError: invalid ical body when opening invites from outlook (office 365) → "ParserError: invalid ical body" when opening invites from outlook (office 365)

I can confirm this bug occurs on Linux (115.5.1), macOS (102.13 and 102.15.1), and Windows (102.15.1). This does appear to be due in part to a change on Office 365, as there was no update of Thunderbird before the error started occurring. That being said, it's also in part due to a bug in Thunderbird, as I can see and process the invites fine in other apps, like K-9 Mail.

See Also: → 1868632
Duplicate of this bug: 1868362

Confirming based on a few reports.

Status: UNCONFIRMED → NEW
Ever confirmed: true
See Also: → 1868779
See Also: → 1869214
Duplicate of this bug: 1869368

From the screenshot, it looks like there's a missing END:VCALENDAR at the end of the file. Since this is technically invalid, my guess is that ical.js gets there, expects to see the end of the calendar, and since it doesn't, it fails parsing. We should make it more accepting; if it hits EOF and our calendar structure is valid but we're missing ENDs for the still-open components, we should just assume they've ended and move on.

Reproduced on Thunderbird 115.5.1 with Kubuntu 22.04. Lightning 115.0 and TBSync 4.8 .

From the main screen, there is no way to request download of the ics. You have to display the message in a separate window to get the ics.

If you attempt to import the ics, you get an error with "No importable items found in the file" and it displays "Loading items".

This certainly confirms that thunderbird can't handle this ics. For what it is worth, KDE konversation and google calendar can't seem to deal with it either. It generates an error and either fails to import or creates a bogus event.

W

I reported this same issue yesterday (referenced above as 1869214). This evening I realized my phone calendar wasn't syncing with my work account (also Outlook) as it should, and digging into it I found an error of "Couldn't parse iCalendar."

Doing a bit of searching on that phrase I found mention on a Microsoft answer forum (https://answers.microsoft.com/en-us/outlook_com/forum/all/ics-files-are-missing-end-nodes/fb2e1cc7-eed5-43e2-a62f-bebc653e119f) of a very recent bug in Outlook where their .ics files are missing both the END:VCALENDAR line as well as every END:VEVENT line except the very last one. The story doesn't give a bug reference, but it sounds like Microsoft is aware of it, so hopefully they will fix it soon.

Seems to be fixed on microsoft's end as of this morning

Thanks, lets' close this.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INVALID
Duplicate of this bug: 1869214
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: