Closed Bug 1907603 Opened 4 months ago Closed 3 months ago

TypeError: aPart is null MimeMessage.sys.mjs:142:7

Categories

(Thunderbird :: General, defect)

Thunderbird 120
x86_64
Linux
defect

Tracking

(thunderbird_esr128+ fixed, thunderbird130 affected)

RESOLVED FIXED
131 Branch
Tracking Status
thunderbird_esr128 + fixed
thunderbird130 --- affected

People

(Reporter: DaAnda, Assigned: mkmelin)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression, Whiteboard: [datalossy])

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0

Steps to reproduce:

this error shows up in the JS console after startup

Actual results:

not sure if it is related, but in the activity window I can see that Thunderbird tries to index the messages of an IMAP mailbox and it seems to be stuck there. As this happens on every startup (TB trying to index + this error) I think they could be related. Also none of the messages of the mailbox are actually indexed (do not show up in global search) - so there certainly is a bug with indexing, but as said, not sure if the indexing bug is related to this error as I am not familiar with TBs codebase.

Full error message in the console:

TypeError: aPart is null MimeMessage.sys.mjs:142:7
    stripEncryptedParts resource:///modules/gloda/MimeMessage.sys.mjs:142
    wrapCallback resource:///modules/gloda/MimeMessage.sys.mjs:216
    _finalize resource:///modules/gloda/MimeMessage.sys.mjs:108
    OnStopRunningUrl resource:///modules/gloda/MimeMessage.sys.mjs:80

Expected results:

the respective method stripEncryptedParts should check of a null value before attempting to process the data, or the check should be done further up the chain before calling this method.

Summary: TypeError: "aPart is null" in MimeMessage.sys.mjs:149:17 → TypeError: aPart is null MimeMessage.sys.mjs:142:7
OS: Unspecified → Linux
Hardware: Unspecified → x86_64

forgot to mention the detailed version used since I was not able to select it in the form. I am running 128.0b6 (64-Bit) via flatpak from flathub

Blocks: tb128found
Component: Untriaged → General

still present in 129.0b4 (64-Bit)

Flags: needinfo?(john)
Regressed by: 1851074

I'm having a similar problem running Thunderbird 128.1.0esr on macOS. Indexing a particular local folder gets stuck and never finishes. When I'm looking at the Error Console, I see that same "aPart is null" error when indexing gets stuck. My guess is, one of the emails in the local folder has something weird that's causing GLODA to choke. I get 3 errors in a row, and the 3rd one is the "TypeError: aPart is null". All three are shown below:

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
TypeError: aPart is nullMimeMessage.sys.mjs:142:7
    stripEncryptedParts resource:///modules/gloda/MimeMessage.sys.mjs:142
    wrapCallback resource:///modules/gloda/MimeMessage.sys.mjs:216
    _finalize resource:///modules/gloda/MimeMessage.sys.mjs:108
    OnStopRunningUrl resource:///modules/gloda/MimeMessage.sys.mjs:80
Assignee: nobody → mkmelin+mozilla
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → 131 Branch
See Also: → 1913320

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/e8cbb1f0460f
Fix "TypeError: aPart is null MimeMessage.sys.mjs". r=john.bieling

Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED

Comment on attachment 9420071 [details]
Bug 1907603 - Fix "TypeError: aPart is null MimeMessage.sys.mjs". r=john.bieling

[Approval Request Comment]
Regression caused by (bug #): bug 1851074
User impact if declined: unclear, but failures on various occasions
Testing completed (on c-c, etc.): c-c, beta
Risk to taking this patch (and alternatives if risky): safe

Attachment #9420071 - Flags: approval-comm-esr128?

Thanks for requesting the uplift, because this is a high value issue, due to its impact on search results. And A regression of v120, according to bug 1851074.

Are there no tests behind this?

Flags: needinfo?(john)
Whiteboard: [datalossy]
Version: Thunderbird 128 → Thunderbird 120

Not sure. I think the code in general is actually tested. But it's unclear what data would produce this error situation.

Yeah. To be more specific, can we test whether messages that might be affected by this situation do get indexed.

Only if we get a test case for what such a message looks like.

I'd like to help but after I have deleted (like emptied trash) and moved some messages into archive folders, I no longer seem to get this error. So whatever message might have caused this seems to be gone on my end and this accounts mailbox is also indexed now.

Comment on attachment 9420071 [details]
Bug 1907603 - Fix "TypeError: aPart is null MimeMessage.sys.mjs". r=john.bieling

[Triage Comment]
Approved for esr128

Attachment #9420071 - Flags: approval-comm-esr128? → approval-comm-esr128+
Duplicate of this bug: 1913320
See Also: 1913320
See Also: → 1919400
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: