Closed Bug 1731008 Opened 4 years ago Closed 4 years ago

Crashes and other issues when opening the compose window with no email account

Categories

(Thunderbird :: Account Manager, defect)

defect

Tracking

(thunderbird_esr91 unaffected, thunderbird94? affected)

RESOLVED FIXED
95 Branch
Tracking Status
thunderbird_esr91 --- unaffected
thunderbird94 ? affected

People

(Reporter: aleca, Assigned: aleca)

References

Details

Attachments

(1 file)

This is a bit of an extreme edge case, but nonetheless can happen and can cause Thunderbird to crash, so we should fix it.

STR:

  • Launch Thunderbird with a new profile.
  • Close the account setup tab and use TB without an email account.
  • File > Open > Saved message
  • Click on Reply or Forward

Actual result:
When clicking on "Reply" the app crashes right away with this error:

JavaScript error: chrome://messenger/content/messengercompose/MsgComposeCommands.js, line 1655: 
TypeError: can't access property "getUnicharAttribute", gCurrentIdentity is null
console.debug: "exception in getMsgHdr: [Exception... \"Component returned failure code: 0x80040154 (NS_ERROR_FACTORY_NOT_REGISTERED) [nsIMessenger.messageServiceFromURI]\"  nsresult: \"0x80040154 (NS_ERROR_FACTORY_NOT_REGISTERED)\"  location: \"JS frame :: chrome://openpgp/content/ui/enigmailMsgComposeOverlay.js :: getMsgHdr :: line 372\"  data: no]"
Exiting due to channel error.

When clicking on "Forward" the compose message appears with an empty "From" field and the same console error.

After bug 942615, is now possible to use TB without an email account, so this situation might arise more often.

We should disable the Forward and Reply actions when a saved message is opened without an email account, and we should have some safeguards in place in case the user is able to launch the compose window without an email account.

I ended up hiding all the buttons and menu items from the menu bar and app menu related to the composition window in case no accounts is defined.
Maybe not the cleanest and nicest implementation, but that code needs a lot of love so this quick fix should be good for now.

Status: NEW → ASSIGNED
Target Milestone: --- → 95 Branch

Pushed by alessandro@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/476d3a218860
Hide all composition buttons and menu items when viewing saved messages if no account is defined. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: