Closed Bug 615272 Opened 9 years ago Closed 3 years ago

Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIMsgFolder.getStringProperty]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://messenger/content/folderPane.js :: getSmartFolderName :: lin

Categories

(Thunderbird :: Folder and Message Lists, defect, major)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 54.0

People

(Reporter: jbecerra, Unassigned)

References

Details

(Whiteboard: [fixed by bug 562965])

While using 3.1.7pre, set up a new profile, entered my account details (automatic IMAP mozilla account setup), it synchronized, got a bunch of mail, but when I tried to create a new folder nothing happened. Maybe that action has nothing to do with anything, but the error console has a lot of messages like these:

Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIMsgFolder.getStringProperty]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://messenger/content/folderPane.js :: getSmartFolderName :: line 2441"  data: no]
Source File: chrome://messenger/content/folderPane.js
Line: 2443

It's a brand new profile, so I don't know what I could be doing wrong.
Could there be a problem with my account on the server end, something that can be diagnosed by server ops? I keep trying to create a new profile and getting the same problem, whether it is a pop or imap account setup.
if you have the issue over pop then it's not a server issue.

What's the name of the folder you are trying to create ? (do you have write access to your profile ?)
I can confirm this issue with
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.14pre) Gecko/20110117 Lightning/1.0b3pre Lanikai/3.1.8pre

In my case, no new folder has been created and I have write access to the profile.

I've just created a gmail account (IMAP) and downloaded 113 mail. Before that, there was another account (a fake account) used only for testing that has never caused any kind of problem since November 2010.
The folder pane is set to "All folder".

The errors reported in comment #0 are continuously generated if I move the Thunderbird's window (dragging the window title); when I stop moving the window (still dragging though) the errors stop generating. Nevertheless not sure if it's related, sounds like the errors are generated anyway, but they wait a cause to appear in the console.
It happens also with TB 3.3x

It seems it happens only when a new account has just been created. I can't reproduce after the restart.
David I'm currently seeing this juts after a clean install on a new machine after account creation , is there anything you would like me to look into while I'm reproducing ?
Ludo, does anything go wrong when you see this exception? And did you switch into unified folder mode somehow before setting up the first account? I thought we defaulted to all folders now.
(In reply to David :Bienvenu from comment #6)
> Ludo, does anything go wrong when you see this exception? And did you switch

Not that I can remember.

> into unified folder mode somehow before setting up the first account? I
> thought we defaulted to all folders now.

We do and I didn't switch to the unified folder view on this profile yet.
Hi gents,
During the Thunderbird test day of TB14, I got my error console full of this kind of warning: 
Horodatage : 15/06/2012 07:01:08
Erreur : [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIMsgFolder.getStringProperty]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://messenger/content/folderPane.js :: getSmartFolderName :: line 2468"  data: no]
Fichier Source : chrome://messenger/content/folderPane.js
Ligne : 2470

I was using a Fresh profile and just set up an IMAP account at laposte.net

Please tell me if I can help you to identify the issue.
OS: Mac OS X → All
Hardware: x86 → All
Version: 3.1 → Trunk
Can you see this too in current TB? If yes, are you in the Unified folder view? Which folder do you click when this error appears?
after a recent crash, i got the same error as in comment 8.  the error is due to the folderpane code trying to resolve a pretty name, calling getStringProperty which will try panacea.dat and then the folder's .msf.  in cases of a non account folder, the problem can be resolved (folder is reparsed/rebuit) by doing a Properties->Repair explicitly, or usually by selecting the folder.

in the case of account folders, it is inconsistent if msgDatabase is available, as the underlying .msf may or may not be created.  i believe it is for imap (and newsgroups), but not pop3 or feeds accounts.  the problem is that there is no way to 'rebuild' an account folder's .msf file.

in my crash case, the only solution was to rename panacea.dat.  note that if one does not have the error console open, this wouldn't be noticed, except that it would lead to very bad folderpane scrolling/repainting performance.

since account folder names are derived from the value stored in prefs.js it isn't necessary to attempt getting a pretty name from msgDatabase, so a cheap fix could be to only attempt getStringProperty on non server folders only.

also, it seems msgDatabase files aren't getting created at account creation time for all necessary folders.  thus folder related operations fail until restart.  for feeds, the patch in bug 787186 makes sure Trash .msf is created with

+server.msgStore.discoverSubFolders(server.rootMsgFolder, false);
(In reply to alta88 from comment #10)
> in my crash case, the only solution was to rename panacea.dat.  note that if
> one does not have the error console open, this wouldn't be noticed, except
> that it would lead to very bad folderpane scrolling/repainting performance.

Thanks for mentioning that. This made both 0x80004003 and 0x80004005 stop spamming my error console. It also solved the issue of weird folder names in folderpane for short time after startup when they contained accented characters. Newly created panacea.dat is also much smaller, down to 53K from initial 546K.
(sounds like major disruption to me)
Severity: normal → major
Component: General → Folder and Message Lists
(In reply to alta88 from comment #10)
> after a recent crash, i got the same error as in comment 8.  the error is
> due to the folderpane code trying to resolve a pretty name, calling
> getStringProperty which will try panacea.dat and then the folder's .msf.  in
> cases of a non account folder, the problem can be resolved (folder is
> reparsed/rebuit) by doing a Properties->Repair explicitly, or usually by
> selecting the folder.

For my newsgroup account, enacting a Repair in this way causes Thunderbird to do something (not listed in the Activity Manager) that never completes.  All messages disappear until a restart and my cursor indicates that the application is busy when viewing that particular newsgroup.

What is an account folder as opposed to a non-accout folder?

> in my crash case, the only solution was to rename panacea.dat.  note that if
> one does not have the error console open, this wouldn't be noticed, except
> that it would lead to very bad folderpane scrolling/repainting performance.

This issue manifests for me such that messages appear blank in any view, including messsage source.  Deleting panacea.dat resolves this issue for the beginning of the next launch after restart, but the issue appears again rapidly.

This issue is critical for me, as it renders Thunderbird unusable for newsgroup use.
As correction:
(In reply to meanderingcode from comment #13)
> For my newsgroup account, enacting a Repair in this way causes Thunderbird
> to do something (not listed in the Activity Manager) that never completes. 
> All messages disappear until a restart and my cursor indicates that the
> application is busy when viewing that particular newsgroup.

The messages don't "reappear" after a restart.  Thunderbird re-downloads all the headers.

As addendum:

Running Thunderbird in gdb produces a rather long stream of the following output:

The MsgHdrToMimeMessage callback threw an exception: TypeError: aPart is null
this should not be happening! arrgggggh!

I believe this is related, though i have not researched what this means, and the number of times the above message repeated had to do with how many headers I was downloading to "reacquire" the newsgroup that was emptied when i quit Thunderbird (though the File menu, without hang) while "Repairing".  After the message flood stopped, i browsed through my newsgroups in that account for a while, until the problem occurred again, at which point no messages are logged to the debug console, nor in the Error Console, where I normally see the error this thread is titled for upon occurrence of this problem. Of note may be that my cursor shows the application as busy again.

So now i'm more confused, though I still feel my problem of empty messages is at least partially related to the occurrence of this error.
(In reply to meanderingcode from comment #13)
> (In reply to alta88 from comment #10)
> > after a recent crash, i got the same error as in comment 8.  the error is
> > due to the folderpane code trying to resolve a pretty name, calling
> > getStringProperty which will try panacea.dat and then the folder's .msf.  in
> > cases of a non account folder, the problem can be resolved (folder is
> > reparsed/rebuit) by doing a Properties->Repair explicitly, or usually by
> > selecting the folder.
> 
> For my newsgroup account, enacting a Repair in this way causes Thunderbird
> to do something (not listed in the Activity Manager) that never completes. 
> All messages disappear until a restart and my cursor indicates that the
> application is busy when viewing that particular newsgroup.
> 
> What is an account folder as opposed to a non-accout folder?

Is there general agreement this would fix bug 794401?
Flags: needinfo?(alta88)
Flags: needinfo?(acelists)
(In reply to meanderingcode from comment #14)
> As correction:
> (In reply to meanderingcode from comment #13)
> > For my newsgroup account, enacting a Repair in this way causes Thunderbird
> > to do something (not listed in the Activity Manager) that never completes. 
> > All messages disappear until a restart and my cursor indicates that the
> > application is busy when viewing that particular newsgroup.
> 
> The messages don't "reappear" after a restart.  Thunderbird re-downloads all
> the headers.

so you are saying your messages would not appear until headers are redownloaded, and then restarting thunderbird?

FWIW I've had headers (and iirc message bodies) redownload to imap folders after blowing away panacea.dat. Don't recall whether it affected news.
(In reply to Wayne Mery (:wsmwk) from comment #15)

> Is there general agreement this would fix bug 794401?

unknown.  it could be changing the idle pref helps, or waiting for gloda to finish indexing (could be hours), or getStringProperty throwing on a .msf/panacea problem.

there was a gloda schema change and an update from a much older Tb would cause a reindex.
Flags: needinfo?(alta88)
Sorry, I have no new ideas to add.
Flags: needinfo?(acelists)
It is still a problem as of Feb 2016; I am getting lots of:

The MsgHdrToMimeMessage callback threw an exception: TypeError: aPart is null
this should not be happening! arrgggggh!

and shortly afterwards Thunderbird 38.5.1 (under Kubuntu trusty 4.2.0-27-generic #32~14.04.1-Ubuntu; 64-bit) crashes after a burst of QPainter:: diagnostics.  Maybe the problem has been going on for ages but I only noticed it now because I looked at error messages to try to sort out another problem (Thunderbird popup windows loose focus sometimes and clicking on the window doesn't restore it... now I find TB dies either soon after starting or at some random time afterwards... more likely if Firefox is also running, and Firefox also tends to die - often (if TB is already running) within seconds of starting - even in safe mode, and even if I do nothing.  So maybe the problems are related?  Can supply more info if required, but at present still working out what goes wrong when.
(In reply to Mark Aitchison from comment #19)
I should have pointed out my comment was in reply to/related to: meanderingcode@aetherislands.net comment #14)
Duplicate of this bug: 584832
Duplicate of this bug: 1132553
the call to getSmartFolderName() in ftvItem.getProperties() needs to be ripped out.

see Bug 562965.
Duplicate of this bug: 772420
So I did not see this error again because panacea.dat was deleted in my last big cleaning of profile directory. Thanks for the workaround.
(In reply to Mark Aitchison from comment #19)
> It is still a problem as of Feb 2016; I am getting lots of:
> 
> The MsgHdrToMimeMessage callback threw an exception: TypeError: aPart is null
> this should not be happening! arrgggggh!
> 

Please file this as a separate bug as the relation to this one is not clearly seen. It is a different message in very different part of code.
fixed in Bug 562965.

btw, the problem in comment 26 is known (well, to those who use that callback), that nntp is not supported, and it's probably even documented somewhere (mdn).
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Depends on: 562965
Whiteboard: [fixed by bug 562965]
Target Milestone: --- → Thunderbird 54.0
You need to log in before you can comment on or make changes to this bug.