Closed Bug 464808 Opened 16 years ago Closed 16 years ago

Duplicate folders show in folderpane

Categories

(Thunderbird :: Mail Window Front End, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
Thunderbird 3.0b1

People

(Reporter: JoeS1, Assigned: Bienvenu)

References

Details

(Keywords: regression)

Attachments

(8 files, 1 obsolete file)

Seen in:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2pre) Gecko/20081113 Lightning/1.0pre Shredder/3.0b1pre ID:20081113143618

All the "ghost" folders seem to function OK, but some newsgroup accounts also show duplicate subscriptions within the account.

See attachment
Attached image folderpane
Did this happen on startup, or can you tie it to particular actions you took?
On startup, but it looks like this is from remnants of deleted accounts in my profile.
I venture that most folks that have used the same profile for a while will see this.
See new screenshot
Attached image profile
rdf eliminates duplicate uri's; the new folder pane doesn't.
Keywords: regression
Attached patch mozmill testSplinter Review
Mozmill test which captures the problem.
Assignee: nobody → jminta
Status: NEW → ASSIGNED
Attachment #348683 - Flags: review?(bugzilla)
Attached patch patch (obsolete) — Splinter Review
Really disappointing that we have to do this, but...
Attachment #348690 - Flags: review?(bienvenu)
I know you ignore the c++ part of the code :-), but I would fix this in the code that loads the accounts pref list, to make sure we don't have duplicate accounts. That is, assuming that's the cause of the problem. Perhaps someone who is having this problem could post their prefs.js, or at least, the accounts list pref...
it isnt a duplicate account problem.  I will post my prefs.js
Attached file accounts from prefs
Is this the section you want.
(In reply to comment #9)
> I know you ignore the c++ part of the code :-), but I would fix this in the
> code that loads the accounts pref list, to make sure we don't have duplicate
> accounts. 
I probably won't be able to fix this then, and someone else will need to pick this up (unless the fix is "rewrite the account manager in js", an approach I'd fully support, but likely beyond our timeframe).
Assignee: jminta → nobody
Status: ASSIGNED → NEW
Joey, it doesn't look like duplicate accounts is the problem, at least in Joe's prefs, so maybe your patch is the way to go. Joe, can you paste the prefs for the accounts that are duplicated? In particular, the prefs for the servers that correspond to the accounts that are duplicated in the folder pane? Or e-mail them to me. Thx!
I cleaned up my profile some since I originally filed, but kept the dups for secnews.netscape.com There are 4 displays in the folder pane. 

email sent subject "Bug 464808 profile data"
 so what I see is multiple servers with the same uri - since we identify servers and folders by their uri, it's never going to do anything useful to have multiple accounts/servers with the same uri, either in the backend or the frontend.

Since the account manager UI is still using RDF (right?), we will only show one copy of the account/server, but the folder pane will show multiple. 

Getting rid of duplicates when we load the accounts and create the servers feels like the right thing to do. It makes me nervous to see multiple directories in the profile dir, but I think the first server object/account will always win, so getting rid of the subsequent prefs seems OK. I'm going to try to whip up a patch for this. I'm tentatively marking this as a blocker because we just don't know how many users will run into this.
Flags: blocking-thunderbird3+
Target Milestone: --- → Thunderbird 3.0b1
taking - we may still go with Joey's patch, but I'm going to look at the backend first.
Assignee: nobody → bienvenu
David, sorry if you already know this.
I think the condition happens if you delete an account, then re-create it.
Also might be related to the fact that if you use user.js to add, let's say a "caps" policy, then later remove the user.js you will then have to manually edit the prefs.js file to remove the policy.
what do you mean by multiple servers?  I have multiple POP accounts on the same pop server (gmail).  I only have one directory in my profile directory, though.  also, note that I have not deleted and recreated any accounts (at least not since install).
Whiteboard: will probably move to b2 since user can cleanup themselves
i notice on the whiteboard it says users can clean-up themselves... how exactly is this?
you should be able to remove the duplicate accounts in the account settings dialog - it should show you the same list of accounts as the folder pane...
only that isn't the case.  two local folders show up in the account settings dialog, but those are not removable, and they both point to the same director.
it is not the case, as stated earlier, that the accounts themselves are duplicated.
they're definitely duplicated if they appear in the folder pane and the account settings dialog - by duplicated, I mean you have two accounts with the same uri, not that they're duplicated in the pref account list.

So, yeah, I didn't realize you could get this to happen with a local folders account, and since we don't let you remove the local folders account, that is a problem. Thx for the info. I'll leave this on the blocking list, then.
Whiteboard: will probably move to b2 since user can cleanup themselves
gotcha -- anything you need from me or want me to test, just let me know.
Just to reinforce the need for blocking b1
When deleting my dup feeds account, I lost all the feed info.
Yeah, I exported them before I tried, but restoring feeds lost some headers that I was saving that were active, but apparently expired on the server.
All in all, it's not trivial to fix dups.
Whiteboard: [bienvenu looking at backend?]
I have the same sort of issue as is being described here.

In the Folders Pane I now have two copies of the Local Folder and all contents of my mail and created folders being displayed. The second Local Folder mirrors actions made in the first but only updates itself once you change to another folder in the original Local Folder.

There is also two Local Folders displayed in Account Settings with exact same settings and pointing to the same Local directory.
It doesn't appear to be any other changes made nor are there any new or duplicate folders created in my profile directory.    

All nightly builds after Shredder/3.0b1pre ID:20081112031406 display this problem. If I revert back to this nightly build from any latter nightly builds the Folder pane and account settings go back to normal.
Attached image Folder pane
Attached image Profile Accounts folder
This removes accounts without a server, and accounts with a duplicate server. I tested both, and they seemed to work fine (I got an assertion for each, but that's reasonable, I think).

We only remove prefs, not anything on disk. Even so, this patch is a wee bit frightening - I'm tempted to go with jminta's UI patch for b1, and land the backend fix for b2, but I'm interested in Standard8 and Neil's thoughts.
Attachment #349686 - Flags: superreview?(neil)
Attachment #349686 - Flags: review?(bugzilla)
when you say accounts with a duplicate server, what does that do to two accounts which both use the same pop server (but with different user names)?
duplicate server means the user name, host name, protocol type, and port are the same.
Attachment #349686 - Flags: superreview?(neil) → superreview+
Comment on attachment 349686 [details] [diff] [review]
proposed fix
[Checkin: Comment 34]

I agree this is a wee bit
frightening, but it seems the right thing to do.

I've just tried this on my non-dev account which has been showing two sets of News & Blogs folders for quite a while, and on startup I got a couple of assertions due to the account manager returning NS_ERROR_FAILURE (which I think should stay, as its clearly an error), but I now only have one News & Blogs set of folders, and they also don't reoccur when I go back to an older version of this patch.

So it seems to be working correctly for my case at least.

I think we should go with this patch for b1 (though stick a warning in a blog/newsgroup possibly), and keep a close eye on new bugs/feedback during the testing phase.
Attachment #349686 - Flags: review?(bugzilla) → review+
Whiteboard: [bienvenu looking at backend?] → [bienvenu to land patch]
fix checked in - I'll post to the newsgroup.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Tested with hourly:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2pre) Gecko/20081124 Lightning/1.0pre Shredder/3.0b1pre ID:20081124152531
Dup accounts are gone, thanks.
Status: RESOLVED → VERIFIED
im not sure if this is premature, but it is still here on 
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b2pre) Gecko/20081125 Lightning/1.0pre Shredder/3.0b1pre

has the patch been added in to the nightlies yet?
yes, the fix should be in that build. So your problem is slightly different from what other people have been seeing - in your case, both account1 and account3 claim to have server1. If you go into options | advanced, config editor, and just clear account3.server, your problem should go away. I'll file a new bug for your specific issue.
Bug 466660 filed for that particular issue. I don't think I'll be able to fix it before the code freeze, but I'll have a quick try.
Whiteboard: [bienvenu to land patch]
clicking reset on that value worked.  Should I actually delete the key? or just leave it reset to nothing?
either should work - deleting the key should be better in the sense that you have less cruft in prefs.js
Attachment #348690 - Flags: review?(bienvenu)
Comment on attachment 348690 [details] [diff] [review]
patch

clearing review request for now - we really don't want to have to do this.
FYI: Here this patch broke composing mails in my SeaMonkey build (the From: select box is empty). I filed Bug 466980 for this, but the problem was probably that I somehow ended up with two different serverX entries for Local Folders, which pointed to different locations, but the current entry was not associated with an account. Relevant info in that bug is probably in Comment 2, 3 and 4. As I'm not really sure that I did not mess around with my mail prefs once, that bug is probably invalid.
This appears to have caused a regression with some testers:
http://forums.mozillazine.org/viewtopic.php?f=29&t=970105
http://forums.mozillazine.org/viewtopic.php?f=29&t=965715

Not reopening this bug for now, but no new bug has been filed yet.
Depends on: 467288
Comment on attachment 348683 [details] [diff] [review]
mozmill test

This fails with an exception in createLocalMailAccount - NS_ERROR_FAILURE.
Attachment #348683 - Flags: review?(bugzilla) → review-
Flags: in-testsuite?
This FIXED bug is flagged with in‑testsuite?   It would be great if assignee or someone else can clear the flag if a test is not appropriate.  And if appropriate, create a test and plus the flag to finish off the bug.
Attachment #349686 - Attachment description: proposed fix → proposed fix [Checkin: Comment 34]
Attachment #348690 - Attachment is obsolete: true
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: