Closed Bug 1952669 Opened 10 months ago Closed 4 months ago

Mail indexing hangs when encountering a malformed .ics attachment

Categories

(Calendar :: General, defect)

Thunderbird 128
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1919400

People

(Reporter: rob, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached file Apple_Support_Appt.ics β€”

What did you do? (steps to reproduce)

Connect an IMAP account containing messages with malformed .ics attachments. Example is attached.

What happened? (actual results)

Indexing hangs and browser console reports the following errors:

TypeError: RecurIterator._expandMap[this.rule.freq] is undefined Ical.sys.mjs:5082:24
    setup_defaults resource:///modules/calendar/Ical.sys.mjs:5082
    init resource:///modules/calendar/Ical.sys.mjs:3949
    fromData resource:///modules/calendar/Ical.sys.mjs:3887
    RecurIterator resource:///modules/calendar/Ical.sys.mjs:3761
    iterator resource:///modules/calendar/Ical.sys.mjs:5387
    _expandComponent resource:///modules/calendar/Ical.sys.mjs:2882
    _ensureCoverage resource:///modules/calendar/Ical.sys.mjs:2791
    utcOffset resource:///modules/calendar/Ical.sys.mjs:2682
    convert_time resource:///modules/calendar/Ical.sys.mjs:2458
    convertToZone resource:///modules/calendar/Ical.sys.mjs:1531
    getInTimezone resource:///modules/CalDateTime.sys.mjs:133
    getItemDates resource:///modules/calendar/utils/calDateTimeFormatter.sys.mjs:453
    formatItemInterval resource:///modules/calendar/utils/calDateTimeFormatter.sys.mjs:474
    updateInvitationOverlay resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:432
    setField resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:380
    updateInvitationOverlay resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:418
    createInvitationOverlay resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:292
    convertToHTML resource:///modules/CalMimeConverter.sys.mjs:59
NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS: [JavaScript Error: "RecurIterator._expandMap[this.rule.freq] is undefined" {file: "resource:///modules/calendar/Ical.sys.mjs" line: 5082}]'[JavaScript Error: "RecurIterator._expandMap[this.rule.freq] is undefined" {file: "resource:///modules/calendar/Ical.sys.mjs" line: 5082}]' when calling method: [calIDateTime::getInTimezone] calDateTimeFormatter.sys.mjs:453
    getItemDates resource:///modules/calendar/utils/calDateTimeFormatter.sys.mjs:453
    formatItemInterval resource:///modules/calendar/utils/calDateTimeFormatter.sys.mjs:474
    updateInvitationOverlay resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:432
    setField resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:380
    updateInvitationOverlay resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:418
    createInvitationOverlay resource:///modules/calendar/utils/calInvitationUtils.sys.mjs:292
    convertToHTML resource:///modules/CalMimeConverter.sys.mjs:59

What should have happened? (expected results)

I expect indexing to continue, despite the attachment issues.

More details

I have attached the problematic .ics attachment. It is an old Apple Store appointment invitation that is missing the "FREQ" portion of the "RRULE" identifier (hence [this.rule.freq] is undefined]). Once I removed the message containing the problematic attachment from webmail, indexing was able to run with no problems.

Component: Untriaged → General
Product: Thunderbird → Calendar
See Also: → 1916063
Depends on: 1916063

https://icalendar.org/validator.html says (about the test case)

Errors

    Invalid RRULE value (FREQ is required) near line # 10Reference: 3.8.5.3. Recurrence Rule
    Invalid RRULE value (FREQ is required) near line # 17Reference: 3.8.5.3. Recurrence Rule
    Missing DTSTAMP property near line # 25Reference: RFC 5545 3.6.1. Event Component
    Missing UID property near line # 25Reference: RFC 5545 3.6.1. Event Component

The event cannot be imported either.
Seems this should be handled gracefully still.

Came across the same issue. My .ics where old Google Calendar entries.

Searched for and deleted the attachments in question just now, then went ahead and delete that whole email.
Restarted TB. Now I am still getting the error above, just right when TB tries to start re-index.

In Activity Monitor it says
"Determining which messages to index in Inbox - [inbox name]"
the error messages from above appear, and that's that.

I emptied the deleted folder and restarted, but got the exact same result.

Update 1 day later:
Deleting global-messages-db.sqlite again, did restart the process. Weirdly enough it still hangs for me around the same percentage of 82-86% - happens in the first inbox it goes through.
I deleted every email with an .ics attachment from that inbox now, deleted global-messages-db.sqlite again, and it still hangs - same percentage, same error.

Flags: needinfo?(mkmelin+mozilla)

Can you try 138 beta? xref bug 1916063 which is now fixed there.

Flags: needinfo?(mkmelin+mozilla)

Magnus, I tested in 138.0b1 with my main email account, where I have the issue in 128.9.1esr. Tried a few searches and it is looking good! :)

Status: UNCONFIRMED → NEW
Ever confirmed: true
Status: NEW → RESOLVED
Closed: 4 months ago
Duplicate of bug: 1919400
Resolution: --- → DUPLICATE
No longer depends on: 1916063
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: