Closed Bug 1735601 Opened 3 years ago Closed 3 years ago

Mapi attachments disappear from moz-mapi folder before email sent, causing "Sending of the message failed." after update to 91.2.0

Categories

(MailNews Core :: Composition, defect)

Thunderbird 91
Unspecified
All
defect

Tracking

(thunderbird_esr91+ fixed, thunderbird94+ fixed)

RESOLVED FIXED
95 Branch
Tracking Status
thunderbird_esr91 + fixed
thunderbird94 + fixed

People

(Reporter: dom, Assigned: rnons)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files, 2 obsolete files)

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

Steps to reproduce:

After an automatic update of v 78.14.0 to 91.2.0 every 5th or 6th email sent by attaching pdf via mapi from a Filemaker database failed with the error message:

'SEND MESSAGE ERROR
Sending of the message failed.
There was an error attaching Email_Attachment.pdf. Please check that you have access to the file.'

Reproduced on several Windows 10 Pro computers with either Windows Defender or Bitdefender Endpoint Security Tools, both 32 and 64 bit versions of Thunderbird, both v 91.0.1 and v 91.2.0 TB installs and both fresh install or updated within Thunderbird.

Actual results:

Every time the sent email failed the temporary attachment file located in the moz_mapi temp folder was removed/deleted before the email was completed (i.e. To: and Subject: filled and send button clicked), causing the error.

Expected results:

Temporary attachment file located in the moz_mapi temp folder should remain there until email is sent and only then removed/deleted, which is what happens ~80% of the time.

Keywords: regression
Assignee: nobody → remotenonsense
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

nsMsgCompose::CloseWindow may be called multiple times.

Attachment #9246082 - Attachment description: Bug 1735601 - Remove temporary attachments before closing window in MsgComposeCommands.js. r=mkmelin → Bug 1735601 - Remove temporary attachments in nsMsgCompose dtor. r=mkmelin
Blocks: tb91found
Regressed by: 1710323
Target Milestone: --- → 95 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/c6f878207aa5
Remove temporary attachments in nsMsgCompose dtor. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Component: Untriaged → Composition
OS: Unspecified → All
Product: Thunderbird → MailNews Core
Summary: Mapi attachments disappear from moz-mapi folder before email sent, creating send error after update to 91.2.0 → Mapi attachments disappear from moz-mapi folder before email sent, causing "Sending of the message failed." after update to 91.2.0
Regressions: 1736258

(In reply to Ping Chen (:rnons) from comment #2)

Can you help me test by downloading an artifact build from https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/MYYDyHkITr-JPBzqsnFpSg/runs/0/artifacts/public/build/target.zip? It's built on https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=6031e30657d0f4bb594fd8555fc4ede811c50a56. Thanks

Hello, sorry it took me so long, but I've tested the daily and the same issue occurs. Thanks.

Flags: needinfo?(dom)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

This is only a workaround, the root cause is nsMsgAttachment dtor is not called reliably.

Anje, Walt, fyi

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/7296c1c8bbbf
Do not remove temporary attachments in nsMsgAttachment dtor. r=mkmelin

Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED

I have been testing the latest Daily build - 95.0a1 (2021-10-21) (64-bit) - and that does indeed seem to have resolved the issue. Is there any rough timeline to when this bugfix might appear in the production version? Thanks.

Probably a few weeks.

Comment on attachment 9246785 [details]
Bug 1735601 - Do not remove temporary attachments in nsMsgAttachment dtor. r=mkmelin

Request for the two patches in this bug, and the patch in bug 1736258 to make tests pass.
[Approval Request Comment]
Regression caused by (bug #): bug 1710323
User impact if declined: Temporary attachments are lost when trying to send mails.
Testing completed (on c-c, etc.): c-c
Risk to taking this patch (and alternatives if risky): low

Attachment #9246785 - Flags: approval-comm-esr91?
Attachment #9246785 - Flags: approval-comm-beta?

Comment on attachment 9246785 [details]
Bug 1735601 - Do not remove temporary attachments in nsMsgAttachment dtor. r=mkmelin

[Triage Comment]
Approved for beta

Attachment #9246785 - Flags: approval-comm-beta? → approval-comm-beta+

The second path (with all of the LazyLogModule stuff) causes build failures on beta, backing out both patches as well as bug 1736258 which is entangled with this bug.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch 1735601-tb94-beta.patch (obsolete) — Splinter Review

Rebased the second patch in this bug to beta. Please import to beta in this order:

  1. https://hg.mozilla.org/comm-central/rev/c6f878207aa5
  2. https://hg.mozilla.org/comm-central/rev/1fbbcaf72510
  3. 1735601-tb94-beta.patch
Attached patch 1735601-tb94-beta.patch (obsolete) — Splinter Review
Attachment #9247916 - Attachment is obsolete: true

Comment on attachment 9246785 [details]
Bug 1735601 - Do not remove temporary attachments in nsMsgAttachment dtor. r=mkmelin

This won't be uplifted to beta as the next beta is going to be 95.0b1, next week.
However, the modified patch will be needed for uplifting to Thunderbird 91.

Attachment #9246785 - Flags: approval-comm-beta+

Comment on attachment 9246785 [details]
Bug 1735601 - Do not remove temporary attachments in nsMsgAttachment dtor. r=mkmelin

[Triage Comment]
removing comm-esr91 flag to avoid confusion - please renominate after beta testing of the patch set is complete

Attachment #9246785 - Flags: approval-comm-esr91?

[Approval Request Comment]
Rebased to esr91.

Please import in this order:

  1. https://hg.mozilla.org/comm-central/rev/c6f878207aa5
  2. 1736258-esr91.patch in bug 1736258
  3. 1735601-part2-esr91.patch here
Attachment #9247920 - Attachment is obsolete: true
Attachment #9249330 - Flags: approval-comm-esr91?

Comment on attachment 9249330 [details] [diff] [review]
1735601-part2-esr91.patch

[Triage Comment]
Approved for esr91

Note patch order

Flags: needinfo?(rob)
Attachment #9249330 - Flags: approval-comm-esr91? → approval-comm-esr91+
Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED
Flags: needinfo?(rob)
Regressions: 1741596
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: