Closed Bug 1374948 Opened 7 years ago Closed 6 years ago

After updating, Unnamed folder instead of a long time existing one (with localized name). error "Discovering folders for account failed with exception: [Exception... "Component returned failure code: 0x80550016 [nsIMsgFolder.subFolders]"

Categories

(Thunderbird :: Folder and Message Lists, defect)

52 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: megamanus, Unassigned)

References

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:54.0) Gecko/20100101 Firefox/54.0
Build ID: 20170616104247

Steps to reproduce:

After an update (I don't remember exactly which one) an old folder ("Hírek és blogok" = "News and blogs") disappeared from the tree of folders and another but unnamed folder created (or shown) instead.
This folder was not used since years ago, I had no RSS subscriptions or such.


Actual results:

Now an unnamed folder is shown in the tree of folders, but outside of "Local folders" ("Helyi mappák"). It can be right clicked, but no actions will be applied to it (ie. delete or rename).

In Javascript consol the output is the followings after startup:

Could not read chrome manifest 'file:///usr/lib/thunderbird/chrome.manifest'.
Discovering folders for account failed with exception: [Exception... "Component returned failure code: 0x80550016 [nsIMsgFolder.subFolders]"  nsresult: "0x80550016 (<unknown>)"  location: "JS frame :: resource:///modules/MailUtils.js :: MailUtils_discoverFolders :: line 36"  data: no]
Discovering children for mailbox://nobody@H%EDrek%20%E9s%20blogok failed with exception: [Exception... "Component returned failure code: 0x80550016 [nsIMsgFolder.subFolders]"  nsresult: "0x80550016 (<unknown>)"  location: "JS frame :: chrome://messenger/content/folderPane.js :: get children :: line 2404"  data: no]
NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIMsgFolder.server]  folderUtils.jsm:61
	getFolderProperties resource://gre/modules/folderUtils.jsm:61:3
	ftvItem.prototype.getProperties chrome://messenger/content/folderPane.js:2373:22
	ftv_getRowProperties chrome://messenger/content/folderPane.js:969:12
NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIMsgFolder.server]  folderPane.js:919
	gFolderTreeView.getImageSrc chrome://messenger/content/folderPane.js:919:1
NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIMsgFolder.abbreviatedName]  folderPane.js:2296
	getText chrome://messenger/content/folderPane.js:2296:11
	ftv_getCellText chrome://messenger/content/folderPane.js:905:14
NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIMsgFolder.getTotalMessages]  folderPane.js:2329
	getText chrome://messenger/content/folderPane.js:2329:27
	ftv_getCellText chrome://messenger/content/folderPane.js:905:14
NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIMsgFolder.isServer]  FeedUtils.jsm:234

[the last four errors are repeated if mouse hovers the folder icon]


For an unknown reason there is no "/Mail/Hírek és blogok" directory in my profile but there is "/Mail/Hírek és blogok-1" instead.
Manually renaming or totally deleting this directory from my profile does not solves the issue.

The other issue I have can be the aftermath of this: when I try to select/change storage folders (ie. in mail filters configuration) the drop-down list shows the "no folders available" message.


Expected results:

No unnamed folders to show and all existing folders with localized name should be displayed.
Also menu actions should be applied on them.
Similar error as described in bug 1360836 comment #11.
See Also: → 1360836
I was making a hard search for the solution of my problem and now it seems that I found something that solved it and its side effect that I was not able to select folders in any mailbox settings and filter rules (There was a message like "No folders available" or such).

As I said the folder "Hírek és blogok" ("News and blogs") disappeared for an unknown reason and an other unnamed and so unusable folder appeared in the directory tree.
I found this folder name in prefs,js in the settings related to server8 (whatever it is).
After shutting down Thunderbird I was manually (in a plain text editor) removing server8 settings from my prefs.js.
Note that character were encoded as you see here, they seems like a mix of normal UTF-8 and as a result of some false transcoding, but I think this is not the reason of the problem, because I saw such characters in other places in prefs.js.

    user_pref("mail.server.server8.ageLimit", 1);
    user_pref("mail.server.server8.applyToFlaggedMessages", false);
    user_pref("mail.server.server8.check_time", 60);
    user_pref("mail.server.server8.cleanupBodies", false);
    user_pref("mail.server.server8.daysToKeepBodies", 1);
    user_pref("mail.server.server8.daysToKeepHdrs", 15);
    user_pref("mail.server.server8.directory", "/home/username/.thunderbird/221oxfez.default/Mail/HĂ­rek ĂŠs blogok-1");
    user_pref("mail.server.server8.directory-rel", "[ProfD]Mail/HĂ­rek ĂŠs blogok-1");
    user_pref("mail.server.server8.downloadByDate", false);
    user_pref("mail.server.server8.downloadUnreadOnly", false);
    user_pref("mail.server.server8.feed_options", "{\"version\":1,\"category\":{\"enabled\":false,\"prefixEnabled\":false,\"prefix\":null}}");
    user_pref("mail.server.server8.hostname", "Hírek és blogok");
    user_pref("mail.server.server8.keepUnreadOnly", false);
    user_pref("mail.server.server8.login_at_startup", true);
    user_pref("mail.server.server8.name", "HĂ­rek");
    user_pref("mail.server.server8.numHdrsToKeep", 2000);
    user_pref("mail.server.server8.quickMode", true);
    user_pref("mail.server.server8.retainBy", 2);
    user_pref("mail.server.server8.spamActionTargetAccount", "mailbox://nobody@H%EDrek%20%E9s%20blogok");
    user_pref("mail.server.server8.storeContractID", "@mozilla.org/msgstore/berkeleystore;1");
    user_pref("mail.server.server8.type", "rss");
    user_pref("mail.server.server8.userName", "nobody");

Also I found server8 in firetray's settings, so I was removing this too:
    user_pref("extensions.firetray.accounts_to_exclude", " server8");

Also server8 was related to account8, but I did not touch this setting.
    user_pref("mail.account.account8.server", "server8");
    user_pref("mail.accountmanager.accounts", "account1,account2,account3,account4,account5,account8,account10,account11,account6,account13,account19");

After restarting Thunderbird the unnamed folder disappeared and I was able to select folders in mailbox and filter settings.

I took a look at prefs js and I found that one of the above untouched lines changed:
    user_pref("mail.account.account8.server", "server8");
    user_pref("mail.accountmanager.accounts", "account1,account2,account3,account4,account5,account10,account11,account6,account13,account19");

Searching in files for "server8" and "account8" I found that xulstore.json and localstore.rdf still contains the "account8". I did not touch them yet.

So now I can say that my problem with the unnamed folder seems to be solved (by/for myself).
I hope that the above description will help others to fix their similar problems.

Don't forget that "server8" and "account8" is specifically for my profile. In your profile it may have another number in the names, so BE CAREFUL and always MAKE A FULL BACKUP before hacking it!
Looks like there may be some problem with the accented characters in the name or server path "mailbox://nobody@H%EDrek%20%E9s%20blogok". We have several reports like this one, it may be the decoding of these changed somewhere and now the existing path is no longer valid and properties of the "server" (account) can't be retrieved.

E.g. the "mail.server.server8.hostname"="Hírek és blogok" is suspicious, spaces in hostname do not seem valid. Yes, the hostname is bogus anyway, but there may be code in TB (or m-c) that does not know, this is not supposed to be a real hostname and may throw an error.

It is good that you found the solution.

Would you maybe try to recreate the News and Blogs account again to see if it gets different values in the prefs.js file?
For testing I created a newsfeeds account, but I did not made any subscritions.
The newsfeed acoount got to be "account20" in prefs.js and the server related to it is identified as "server8" (maybe because it was the first empty slot in setting, i don't know).

    user_pref("mail.account.account20.server", "server8");

server8 related settings is now:
    user_pref("mail.server.server8.ageLimit", 30);
    user_pref("mail.server.server8.applyToFlaggedMessages", false);
    user_pref("mail.server.server8.check_time", 100);
    user_pref("mail.server.server8.cleanupBodies", false);
    user_pref("mail.server.server8.daysToKeepBodies", 30);
    user_pref("mail.server.server8.daysToKeepHdrs", 30);
    user_pref("mail.server.server8.directory", "/home/gabor/.thunderbird/221oxfez.default/Mail/Feeds");
    user_pref("mail.server.server8.directory-rel", "[ProfD]Mail/Feeds");
    user_pref("mail.server.server8.downloadByDate", false);
    user_pref("mail.server.server8.downloadUnreadOnly", false);
    user_pref("mail.server.server8.feed_options", "{\"version\":1,\"category\":{\"enabled\":false,\"prefixEnabled\":false,\"prefix\":null}}");
    user_pref("mail.server.server8.hostname", "Feeds");
    user_pref("mail.server.server8.name", "Blogok ĂŠs hĂ­rforrĂĄsok");
    user_pref("mail.server.server8.numHdrsToKeep", 2000);
    user_pref("mail.server.server8.spamActionTargetAccount", "mailbox://nobody@Feeds");
    user_pref("mail.server.server8.storeContractID", "@mozilla.org/msgstore/berkeleystore;1");
    user_pref("mail.server.server8.type", "rss");
    user_pref("mail.server.server8.userName", "nobody");

As you can see the directory and directory-rel properties in prefs.js have the original english names and not the localized versions as before.
On Thunderbird's GUI the directory tree now contains a new folder ("Blogok és hírforrások") with a trash ("Törölt elemek") sub-folder in it.
Also I can access the folders in mailbox settings and filter rules.
Thanks for the experiment. I'm more happy that mail.server.server8.hostname now does not contain the localized version of the name. That is much safer. We should support localized folders in the .directory(-rel) prefs, but localized hostnames can be problematic, also with respect to the other preferences that encode the hostname, e.g. .spamActionTargetAccount .
Maybe interesting, that now I made a subscription (for testing) to a newsfeed (https://index.hu/24ora/rss/).
The newsfeed subscrition became "Index - 24 óra" in the directory tree and in its properties the storage folder is "mailbox:///home/gabor/.thunderbird/221oxfez.default/Mail/Feeds/Index - 24óra". As you can see it contains localized name.
(In reply to megamanus from comment #2)
> I found this folder name in prefs.js in the settings related to server8
> (whatever it is).
Accounts (and identities) and servers are configured in preferences (which you can view in the preferences editor) and stored in the prefs.js file. You can edit this file with an editor when TB isn't running at your own risk. You are quite correct that the configuration differs from user to user.

> Also I found server8 in firetray's settings, so I was removing this too:
>     user_pref("extensions.firetray.accounts_to_exclude", " server8");
Looks like an add-on also interfered here.

I'm glad you could solve your problem, but I'm not sure that you've done a complete cleanp-up. Since server8 which you removed was related to account8, you might have created an orphaned account now. Maybe you should check and remove all references to account8 (after doing a backup, of course), right Aceman?
(In reply to Jorg K (GMT+1) from comment #7)
> > Also I found server8 in firetray's settings, so I was removing this too:
> >     user_pref("extensions.firetray.accounts_to_exclude", " server8");
> Looks like an add-on also interfered here.

Yes, but it may only mark server8 for itself to be excluded from some processing, maybe because it is not an email account.
 
> I'm glad you could solve your problem, but I'm not sure that you've done a
> complete cleanp-up. Since server8 which you removed was related to account8,
> you might have created an orphaned account now. Maybe you should check and
> remove all references to account8 (after doing a backup, of course), right
> Aceman?

Yes, account8 should also be cleared from prefs.js (but not server8).
The new IDs are account20 and server8.
megamanus,

Assuming you have sorted this out by now ... do you have the same issue after being updated to version 60?
Flags: needinfo?(megamanus)
Summary: Unnamed folder instead of a long time existing one (with localized name) → After updating, Unnamed folder instead of a long time existing one (with localized name). error "Discovering folders for account failed with exception: [Exception... "Component returned failure code: 0x80550016 [nsIMsgFolder.subFolders]"
(In reply to Wayne Mery (:wsmwk) from comment #9)
> Assuming you have sorted this out by now ... do you have the same issue after being updated to version 60?
Now I use 60.2.1. and the issue did nor reappear.
Flags: needinfo?(megamanus)
Thanksn for the update
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.