"Edit Message as New" broken for eml messages

Bug #259387 reported by trzmiel
6
Affects Status Importance Assigned to Milestone
Mozilla Thunderbird
Fix Released
High
thunderbird (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: thunderbird

Open your Inbox and save a message to EML file.

Open this file in Thunderbird.

Go to Message->Edit Message As New.

I'm getting this error message: "An error occurred while creating a message compose window. Please try again."

I tried Thunderbird 2.0.0.16 on Win XP and Ubuntu 8.04.

ProblemType: Bug
Architecture: i386
Date: Tue Aug 19 14:50:07 2008
DistroRelease: Ubuntu 8.04
Package: mozilla-thunderbird 2.0.0.16+nobinonly-0ubuntu0.8.04.1
PackageArchitecture: all
ProcEnviron:
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/username/pentaho/java/bin:/home/username/pentaho-i/java/bin
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: thunderbird
Uname: Linux 2.6.24-19-generic i686

Tags: apport-bug
Revision history for this message
In , Hskupin (hskupin) wrote :

Created attachment 250992
Open eml file will break the compose window

Revision history for this message
In , Mcow (mcow) wrote :

I think the 'gMsgCompose has no properties' error is from something else; that occurs when you close the window.

I didn't get that, but I did get the NS_ERROR_INVALID_POINTER problem when trying to Edit As New into a cached compose window. No error appears in the Error Console if you try to Edit As New into a new compose window.

Also, that error only occurs (in my early testing, at least) when the cached compose window is plain text. If it's HTML, I only see the messagebox with "Error creating compose window" in it.

Revision history for this message
In , Mcow (mcow) wrote :

Reproduced with TB 3a1-0108.

In Seamonkey 1.5a, I get a different message in the error console:
==========
Error: [Exception... "Component returned failure code: 0x80040154 (NS_ERROR_FACTORY_NOT_REGISTERED) [nsIMsgComposeService.InitCompose]" nsresult: "0x80040154 (NS_ERROR_FACTORY_NOT_REGISTERED)" location: "JS frame :: chrome://messenger/content/messengercompose/MsgComposeCommands.js :: ComposeStartup :: line 1315" data: no]
Source File: chrome://messenger/content/messengercompose/MsgComposeCommands.js
Line: 1315
==========

Revision history for this message
In , Hskupin (hskupin) wrote :

I see the same exception on some situation but not every time. Clicking multiple times on the eml attachment just raises an "mailbox is not a registered protocol" error! *sigh*

Revision history for this message
In , Hskupin (hskupin) wrote :

Created attachment 250995
screenshot of broken compose window

Thats the reply window after the eml attachment was opened:

- all 'l' letters are visible as ','
- no cursor is available
- not styled correctly
- body is empty

Revision history for this message
In , Aqualon (aqualon) wrote :

The testcase in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2pre)
Gecko/20061223 SeaMonkey/1.1 shows the following error in -console (command
line):

EX: = [Exception... "Component returned failure code: 0x80004005
(NS_ERROR_FAILURE)
[nsIMsgComposeService.InitCompose]" nsresult: "0x80004005 (NS_ERROR_FAILURE)"
location: "JS frame ::
chrome://messenger/content/messengercompose/MsgComposeCommands.js ::
ComposeStartup :: line 1303" data: no]

When mail.compose.max_recycled_windows is set to 1, I get the error in -console
and error console and a Window with greyed out subject and to fields (like the
one described in bug 307672). At the next try to Edit as New I get the "An
error occurred while creating a message compose window. Please try again."
error dialog like Henrik in Thunderbird. With mail.compose.max_recycled_windows
set to 0 I get the error dialog at first try.

The difference to Thunderbird is that composing a new mail works fine in
SeaMonkey after those errors.

Revision history for this message
In , Aqualon (aqualon) wrote :

(In reply to comment #6)

> When mail.compose.max_recycled_windows is set to 1, I get the error in -console
> and error console...
That's wrong, I only see it in -console at first try, error console only shows it, when the error dialog appears.

(In reply to comment #3)

> In Seamonkey 1.5a, I get a different message in the error console:
> ==========
> Error: [Exception... "Component returned failure code: 0x80040154
> (NS_ERROR_FACTORY_NOT_REGISTERED) [nsIMsgComposeService.InitCompose]"
> nsresult: "0x80040154 (NS_ERROR_FACTORY_NOT_REGISTERED)" location: "JS frame
> :: chrome://messenger/content/messengercompose/MsgComposeCommands.js ::
> ComposeStartup :: line 1315" data: no]
> Source File: chrome://messenger/content/messengercompose/MsgComposeCommands.js
> Line: 1315
> ==========

I see this too in suiterunner, the code where it occurs is the same like in 1.1: gMsgCompose = sMsgComposeService.InitCompose(window, params);

Revision history for this message
In , Hskupin (hskupin) wrote :

As I described in comment 0 this bug is reported explicitly for Thunderbird and not SeaMonkey while this is covered in bug 307672. MsgComposeCommands.js is forked so will get a different behavior in SeaMonkey.

http://landfill.mozilla.org/mxr-test/mozilla/find?string=MsgComposeCommands.js

If you like to create a new bug for SeaMonkey feel free but I don't think its good to watch both products at the same time. The results are too different.

Revision history for this message
In , Iann-bugzilla (iann-bugzilla) wrote :

I think the problem is nothing to do with the front end but the back end.

In nsMsgCompose::CreateMessage http://lxr.mozilla.org/seamonkey/source/mailnews/compose/src/nsMsgCompose.cpp#1729
because the originalMsgURI used to contain &type=application/x-message-display (which was removed and &realtype=message/rfc822 appended at the end), rv = GetMsgDBHdrFromURI(uri, getter_AddRefs(msgHdr)); returns a failure which means CreateMessage fails.

We should probably remove the NS_ENSURE_SUCCESS, check for a failure and return NS_OK or remove the NS_ENSURE_SUCCESS, check for a success as well as msgHdr and at the end of the function (about line 1983) return NS_OK or something along those lines. I would say the latter because the former would probably cause leakage and there may be multiple uris passed through to be dealt with.

Revision history for this message
In , Iann-bugzilla (iann-bugzilla) wrote :

Created attachment 266817
Add origMsgHdr to stream patch v0.1 (comm-central checkin: Comment 19, cvs checkin: Comment 20)

This patch:
* Passes msgHdr into msgComposeService.OpenComposeWindow removing need to refetch it
* Passes msgHdr into LoadDraftOrTemplate so it can be added to the stream
* Passes msgHdr into CreateTheComposeWindow so it can be added to the compose params

Revision history for this message
In , Iann-bugzilla (iann-bugzilla) wrote :

Just as a note this patch resolves the issue in comment 9 as mOrigMsgHdr is now defined, so there is no attempt to try a fetch the msgHdr. Whether there is a way of making sure that when CreateMessage is called that it is always defined and then we are able to removed the fetching part completely is a different matter.

Revision history for this message
In , Bienvenu (bienvenu) wrote :

Ian - thx for tackling this.

Is adding Requires mailnews to cthandlers this needed for this bug?

+ mailnews \

An alternate way of fixing this might be to change the mimedrft code to get the msg window from the msg url, a la this code:

http://mxr.mozilla.org/mailnews/source/mailnews/mime/src/mimecms.cpp#451

get the dummy msg hdr from there, and set the orig msg hdr from that, if we can't get it from the original msg uri.

But I'm OK with your fix as well. Just let me know about the cthandler part of the patch...

Revision history for this message
In , Bienvenu (bienvenu) wrote :

Comment on attachment 266817
Add origMsgHdr to stream patch v0.1 (comm-central checkin: Comment 19, cvs checkin: Comment 20)

r=bienvenu, pending the question about the makefile.

Revision history for this message
In , Iann-bugzilla (iann-bugzilla) wrote :

(In reply to comment #12)
> Ian - thx for tackling this.
>
> Is adding Requires mailnews to cthandlers this needed for this bug?
>
> + mailnews \
>
Without the above, when building you get the following:
In file included from ../../../../dist/include/mime/nsIMimeStreamConverter.h:26,
                 from ../../../../dist/include/mime/modlmime.h:48,
                 from ../../../../dist/include/mime/mimehdrs.h:41,
                 from ../../../../dist/include/mime/mimei.h:231,
                 from ../../../../dist/include/mime/mimecth.h:48,
                 from ../../../../dist/include/mime/nsIMimeContentTypeHandler.h:59,
                 from /mozdev/bug366482/mozilla/mailnews/mime/cthandlers/glue/nsMimeContentTypeHandler.h:54,
                 from /mozdev/bug366482/mozilla/mailnews/mime/cthandlers/glue/nsMimeContentTypeHandler.cpp:43:
../../../../dist/include/msgbase/nsIMsgHdr.h:14:28: error: MailNewsTypes2.h: No such file or directory
../../../../dist/include/msgbase/nsIMsgHdr.h:21:27: error: MailNewsTypes.h: No such file or directory
../../../../dist/include/msgbase/nsIMsgHdr.h:71: error: ‘nsMsgPriorityValue’ has not been declared
../../../../dist/include/msgbase/nsIMsgHdr.h:72: error: ‘nsMsgPriorityValue’ has not been declared
../../../../dist/include/msgbase/nsIMsgHdr.h:88: error: ‘nsMsgKey’ has not been declared
../../../../dist/include/msgbase/nsIMsgHdr.h:89: error: ‘nsMsgKey’ has not been declared
../../../../dist/include/msgbase/nsIMsgHdr.h:92: error: ‘nsMsgKey’ has not been declared
../../../../dist/include/msgbase/nsIMsgHdr.h:93: error: ‘nsMsgKey’ has not been declared
../../../../dist/include/msgbase/nsIMsgHdr.h:96: error: ‘nsMsgKey’ has not been declared
../../../../dist/include/msgbase/nsIMsgHdr.h:97: error: ‘nsMsgKey’ has not been declared
../../../../dist/include/msgbase/nsIMsgHdr.h:184: error: ‘nsMsgLabelValue’ has not been declared
../../../../dist/include/msgbase/nsIMsgHdr.h:185: error: ‘nsMsgLabelValue’ has not been declared
gmake[7]: *** [nsMimeContentTypeHandler.o] Error 1
gmake[7]: Leaving directory `/mozdev/bug366482/mozilla/suite-opt/mailnews/mime/cthandlers/glue'

I am looking at the alternate suggestion at the moment too.

Revision history for this message
In , Worcester12345 (worcester12345) wrote :

Similar, but on branch:

Bug 392585 – Unable to "edit as new" .EML files attached in an e-mail

Revision history for this message
In , Neil-httl (neil-httl) wrote :

Comment on attachment 266817
Add origMsgHdr to stream patch v0.1 (comm-central checkin: Comment 19, cvs checkin: Comment 20)

I think the idl change might give Calendar a headache?

Revision history for this message
In , Mvl (mvl) wrote :

Comment on attachment 266817
Add origMsgHdr to stream patch v0.1 (comm-central checkin: Comment 19, cvs checkin: Comment 20)

Daniel, can you look at this? You know the code that calls the compose window from lightning much better then I do...

Revision history for this message
In , Dbo-moz (dbo-moz) wrote :

Comment on attachment 266817
Add origMsgHdr to stream patch v0.1 (comm-central checkin: Comment 19, cvs checkin: Comment 20)

looks good for trunk calendar; r=dbo

Revision history for this message
trzmiel (konrad-garus) wrote :

Binary package hint: thunderbird

Open your Inbox and save a message to EML file.

Open this file in Thunderbird.

Go to Message->Edit Message As New.

I'm getting this error message: "An error occurred while creating a message compose window. Please try again."

I tried Thunderbird 2.0.0.16 on Win XP and Ubuntu 8.04.

ProblemType: Bug
Architecture: i386
Date: Tue Aug 19 14:50:07 2008
DistroRelease: Ubuntu 8.04
Package: mozilla-thunderbird 2.0.0.16+nobinonly-0ubuntu0.8.04.1
PackageArchitecture: all
ProcEnviron:
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/username/pentaho/java/bin:/home/username/pentaho-i/java/bin
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: thunderbird
Uname: Linux 2.6.24-19-generic i686

Revision history for this message
trzmiel (konrad-garus) wrote :
Revision history for this message
Andreas Moog (ampelbein) wrote : Confirmed, need testing with original package.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm getting the same issue on Intrepid, will try with a binary from
mozilla.org. I'll check back later.

 status confirmed
 subscribe

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkit9X4ACgkQ06FgkPZwicRcYwCgrnkU1lNMgX4XdrqSRIeJmPMt
JC8AnRqK3ybsL7AHl8axwcUlltUTs27p
=xIW/
-----END PGP SIGNATURE-----

Changed in thunderbird:
status: New → Confirmed
Revision history for this message
Andreas Moog (ampelbein) wrote :

confirmed with vanilla-binary. will report this upstream.

Revision history for this message
Andreas Moog (ampelbein) wrote :

bugwatch added, problem was known upstream. thanks for reporting.

Changed in thunderbird:
status: Unknown → In Progress
Revision history for this message
trzmiel (konrad-garus) wrote :

Thanks.

Revision history for this message
In , Iann-bugzilla (iann-bugzilla) wrote :

Comment on attachment 266817
Add origMsgHdr to stream patch v0.1 (comm-central checkin: Comment 19, cvs checkin: Comment 20)

http://hg.mozilla.org/comm-central/index.cgi/rev/0137db13395c

Revision history for this message
In , Iann-bugzilla (iann-bugzilla) wrote :

Comment on attachment 266817
Add origMsgHdr to stream patch v0.1 (comm-central checkin: Comment 19, cvs checkin: Comment 20)

Checking in
sun-calendar-event-dialog.js; new revision: 1.83; previous revision: 1.82
done

Changed in thunderbird:
status: In Progress → Fix Released
Changed in thunderbird:
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
In , Iann-bugzilla (iann-bugzilla) wrote :

http://hg.mozilla.org/comm-central/index.cgi/rev/3f93f937cce7 to fix missing comma from mail/base/content/mailOverlay.xul in pushed versus reviewed patch

Revision history for this message
In , Jsabash (jsabash) wrote :

Close,but no "cuppie doll" on this one.

The compose window does in fact open, but inline image url's are munged and are not available in the new composition.
IE:<img alt=""
 src="file:///C:/saveas/test%20eml%20image.eml?fetchCompleteMessage=true&amp;part=1.2&amp;filename=tb16a1.gif"
 height="79" width="290">
Does not display in the compose window on a saved eml.
So the eml format is still worthless for saving inline image content.

Tested with:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1a2pre) Gecko/20080823161750 Shredder/3.0b1pre ID:20080823161750

Revision history for this message
In , Iann-bugzilla (iann-bugzilla) wrote :

Could you attach an example?

Revision history for this message
In , Mcow (mcow) wrote :

I don't think comment 22 is related to this bug; it looks like bug 351109 to me.

Revision history for this message
In , Jsabash (jsabash) wrote :

Created attachment 335221
eml with inline image

Revision history for this message
In , Jsabash (jsabash) wrote :

(In reply to comment #24)
> I don't think comment 22 is related to this bug; it looks like bug 351109 to
> me.
>
Probably so Mike.
I usually can edit around those munged img url's but no luck on this one.
Good to see you posting again.

Micah Gersten (micahg)
Changed in thunderbird:
milestone: none → 3.0
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (6.7 KiB)

This bug was fixed in the package thunderbird - 3.0+nobinonly-0ubuntu1

---------------
thunderbird (3.0+nobinonly-0ubuntu1) lucid; urgency=low

  * New Upstream Release 3.0 (THUNDERBIRD_3_0_RELEASE)
    - LP: #50902 - Thunderbird displays useless dialog
    - LP: #52667 - Thunderbird doesn't support RFC-2369
    - LP: #49033 - Doesn't recognize upper case extension (.JPG)
    - LP: #56465 - Per folder column widths
    - LP: #68456 - CTRL-Shift-K bound to 2 functions
    - LP: #79337 - Typo in Server Information for Add Account Wizard
    - LP: #1084 - No scroll on full headers list
    - LP: #62071 - Middle click on scrollbar pastes instead of jumping
    - LP: #119358 - Weak default authentication mode
    - LP: #120672 - No option to empty junk folder with right click
    - LP: #96566 - movemail doesn't work with default privs
    - LP: #122529 - Non-Thunderbird IMAP folders not visible to Thunderbird
    - LP: #241276 - Not able to paste image into thunderbird compose window
    - LP: #244635 - scrollboxes scroll to offset 0 when resized
    - LP: #259387 - "Edit Message as New" broken for eml messages
    - LP: #120281 - Editing a message from the drafts folder leaves line breaks
    - LP: #115484 - Dialogue boxes too large for 1024x768 resolution
    - LP: #320034 - Mail with self referencing headers breaks threading
    - LP: #160794 - shortcuts different in windows and linux
    - LP: #280987 - thunderbird keeps asking a password when working off-line
    - LP: #369150 - Thunderbird splits email addresses with non-ascii characters
                    and a comma in From: field
    - LP: #135066 - Thunderbird doesn't use Ubuntu icon theme
    - LP: #297301 - after authentication error the password is forgotten
    - LP: #487541 - thunderbird-bin crashed with SIGSEGV (AFS filesystem)
    - LP: #485224 - Thunderbird saves double attachment file name endings on
                    FAT32 and NTFS
    - LP: #482496 - When using SCIM ANTHY, autosaving fails, and then get asked
                    about sending in UTF-8

  [ Fabien Tassin <email address hidden> ]
  * Add build-depends on autoconf2.13, autotolls-dev, mozilla-devscripts
    libglib2.0-dev (>= 2.12), libstartup-notification0-dev, libbz2-dev,
    libpixman-1-dev, libdbus-1-dev (>= 1.0.0), libdbus-glib-1-dev (>= 0.60),
    libhal-dev (>= 0.5.8), libasound2-dev, libreadline5-dev | libreadline-dev,
    libkrb5-dev
  * Update build-depends minimums for libx11-dev (>= 2:1.0),
    libgtk2.0-dev (>= 2.12), zlib1g-dev (>= 1:1.2.3), libpng12-dev (>= 1.2.0),
    libjpeg62-dev (>= 6b), libcairo2-dev (>= 0.5.8), libgnome2-dev (>= 2.16),
    libgnomevfs2-dev (>= 1:2.16), libgnomeui-dev (>= 2.16),
    libnss3-dev (>= 3.12.0~1.9b3)
  * Bump standards version to 3.8.0
  * Replace ${Source-Version} by ${binary:Version} in control file
    - update debian/control
  * Bump requirement for system nspr to >= 4.8 since Mozilla bug 492464 landed
  * Bump requirement for system nss to >= 3.12.3 since Mozilla bug 485052 landed
  * Use in-source hunspell when hunspell 1.2 is not available
  * Add conditionnal support for --with-libxul-sdk controlled by
    $(USE_SYSTEM_XUL)
    - update debian/rules
  * Add p...

Read more...

Changed in thunderbird (Ubuntu):
status: Triaged → Fix Released
Changed in thunderbird:
importance: Unknown → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.