Closed
Bug 368617
Opened 18 years ago
Closed 16 years ago
Account setting "OK" button not saving data (due to junk settings).
Categories
(Thunderbird :: Account Manager, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 3.0rc1
People
(Reporter: tonyr, Assigned: Bienvenu)
References
()
Details
(Keywords: regression, Whiteboard: [has info, str comment 37])
Attachments
(1 file)
(deleted),
patch
|
standard8
:
review+
standard8
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; iebar; acc=ventura5; .NET CLR 1.0.3705; .NET CLR 1.1.4322; InfoPath.1; Media Center PC 4.0)
Build Identifier: version 3 alpha 1 (20070129)
I have two profiles setup for THunderbird. One works perfectly, however the default account cannot be modified.
When I try to change and save the settings on any item in the account settings and click on the "OK" button. Nothing happens, the button shows if was clicked but the application window doesn't close and the data change doesn't save. The "cancel" button does work.
All buttons work on the second account, just not the default account.
Tony
Reproducible: Always
Steps to Reproduce:
1.Open Accounts setting of default profile (one of two profiles).
2.Make a change to the settings.
3.Try to save settings.
Actual Results:
The "OK" button shows it is clicked by changing colors.
The window does not close.
The changes are not saved.
Must click the "cancel" button to close the window.
Expected Results:
The "OK" Button shows it is clicked by changing colors.
The application window closes.
The changed settings are saved.
When the "OK" button is clicked the data should be saved and the window should close.
Reporter | ||
Comment 1•18 years ago
|
||
This is similar to Bug 223452
Tony
Comment 2•18 years ago
|
||
Anything in the error console? Is the whitelist addressbook set (bug 192119)?
Comment 3•18 years ago
|
||
Possibly related to bug 368303.
Reproduced with 2b2-0131, Win2K. The error console shows this:
Error: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsISpamSettings.initialize]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: chrome://messenger/content/AccountManager.js :: saveAccount :: line 648" data: no]
Source File: chrome://messenger/content/AccountManager.js
Line: 648
However, it seems that if I OK, get the error, then Cancel, at least some of the changes I made are saved, as seen when I reopen the dialog.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
OS: Windows XP → Windows 2000
Version: unspecified → 2.0
Comment 4•18 years ago
|
||
This seems pretty bad, especially if it's on the branch, but I haven't been able to reproduce it yet. I'll keep trying.
I wonder if we can tell which account it's trying to save settings for.
Flags: blocking-thunderbird2+
Reporter | ||
Comment 5•18 years ago
|
||
This is the output from error console when I try to save the data by clicking OK.
Error: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsISpamSettings.initialize]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: chrome://messenger/content/AccountManager.js :: saveAccount :: line 641" data: no]
Source File: chrome://messenger/content/AccountManager.js
Line: 641
Comment 6•18 years ago
|
||
Tony / mcow, did you both first start seeing this on the 29th nightly builds or earlier than that?
Reporter | ||
Comment 7•18 years ago
|
||
No, I noticed it before the build mentioned but had not familiarized myself with the bug reporting process. I believe it was occurring from an earlier build. I have only been using the daily build since around January 18th.
Before I was using the 1.5 version. I do think it has been occurring since the January 18 install, but only realized that it wasn't saving the changes when my associate complained the Junk filtering wasn't working. That is the change I made in the settings for the other profile.
Tony
Comment 8•18 years ago
|
||
I noticed first on 0131, I'd previously been running 0125.
I just checked 3a1-0129 and it's happening there as well.
The only extension I have installed is DOM Inspector, which is disabled on the trunk of course.
Comment 9•18 years ago
|
||
Whoops. Whatever is broken, it's based on the profile. I was checking back and saw the problem in 0125 and 0116, altho with a different error. So I re-ran 0131 with a different profile and it doesn't exhibit the problem.
Comment 10•18 years ago
|
||
I've located something that may address this. I'd noticed that incoming junk wasn't getting moved out of the Inbox, so I checked account settings and found that the Junk folder setting, normally (x) Other: 'spam' on Local Folders
had been unset, to read: (x) Other: [account]
When I reset this for the first account and clicked OK, the OK was accepted.
I then checked the remaining accounts (three POP and one IMAP) which all originally had the same Local Folders setting; and all had been unset. And in each case, after fixing it, OK worked to accept the setting and close the window.
I've noticed similar folder-settings getting reset in Message Filters when I run TB 1.5 with this same profile and attempt to fetch mail. I try, these days, not to use 1.5 on my default profile for this reason, and when I do, I try to remember to be offline, but that's difficult for other reasons.
Comment 11•18 years ago
|
||
Comment 10 helps a lot Mike. Ok, so somehow for this profile we got in a state where the spam folder to use got unset. Could it be the case that in that profile the folder in question didn't exist anymore?
Comment 12•18 years ago
|
||
No, the folder has existed all along, I'm sure of that.
I just looked at all the 'spamActionTargetFolder' pref settings, and noticed that there was no spamActionTargetFolder for account1, which is Local Folder in my profile. So I just tried again: opened the error console, opened Account Settings, selected "Local Folders", clicked OK. Same error in the Console.
Then: selected the Junk Settings page, chose the folder, clicked OK: success.
I don't know what might have made that preference get deleted (or reset to empty).
Tony Reynolds, did you try to fix your setup after comment 10? I'm curious if it worked for you as well as it did for me.
Comment 13•18 years ago
|
||
I haven't been able to reproduce the problem yet, but mcow's observations have gotten me closer.
Here's what I did:
1) fired up 1.5.0.x
2) clear the spam.version pref via about:config
3) For local folders, I then changed the junk folder to "other" and pointed it at another folder in local folders. i.e. a folder called 'spam' in local folders.
4) I then quite 1.5.0.x
5) Started up Thunderbird 2 and since the spam.version pref was cleared, we re-migrate the junk mail settings.
6) Bring up the junk panel for local folders and note that the junk folder setting says Other: "Junk on Local folders" where it should say spam.
I want to say that something in MigrateJunkMailSettings is broken:
http://lxr.mozilla.org/mozilla/source/mail/base/content/msgMail3PaneWindow.js#1767
But that routine doesn't mess around with the per account setting for the folder to use as junk.
Comment 14•18 years ago
|
||
whoa, even weirder, it ended up changing the junk folder for my default imap account to be the spam folder on local folders. It's as if the spamActionTargetFolder setting for two different servers got swapped.
Comment 15•18 years ago
|
||
Actually according to this line, in Thunderbird 2:
http://lxr.mozilla.org/mozilla/source/mailnews/base/prefs/resources/content/am-junk.js#62
If we don't have a value for a server's spamActionTargetFolder, we fall back to the junk folder for local folders. That explains one of the things I saw. I think my comments in comment 13 are bogus as well, I noticed that if you run Thunderbird 2 then go back to 1.5.0.x, 1.5.0.x is giving me troubles when I try to change junk settings to my Local Folders account because the server doesn't have a default value for whiteListABURI. There's no value in the list box and I'm not getting my changes saved.
Mike/Tony any chance after running tb2 you went back to 1.5.0.x and tried to change junk settings then went back to thunderbird 2?
Reporter | ||
Comment 16•18 years ago
|
||
I did not. I uninstalled 1.5 then instaled tb2.
Tony
Comment 17•18 years ago
|
||
(In reply to comment #15)
> we fall back to the junk folder for local folders
My Local Folders directory is called "spam" rather than "junk."
> Mike/Tony any chance after running tb2 you went back to 1.5.0.x and tried to
> change junk settings then went back to thunderbird 2?
It's possible -- I certainly do go back and forth, and depending on what bugs I was looking at I might have made some change within 1.5.
Comment 18•17 years ago
|
||
I can confirm everything what's described in comment #0 for SeaMonkey:
Build identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a6pre)
Gecko/2007060301 Mnenhy/0.7.5.0 SeaMonkey/2.0a1pre
(self compiled from cvs)
Comment 19•17 years ago
|
||
I can confirm this bug to be present in 2.0.0.6, too.
To "resolve" it I did the following for all of my email accounts:
- Goto Tools -> Account Settings -> Junk settings
- Disable the checkbox "Move new junk messages to..."
If you have done that for all accounts the "OK" button will work again.
The error is the same as described, but nowadays it points to:
/content/messenger/AccountManager.js, line 648:
server.spamSettings.initialize(server);
Comment 20•17 years ago
|
||
(In reply to comment #13)
> I want to say that something in MigrateJunkMailSettings is broken:
Scott, if you still think that's an issue of the migration who is affected by that bug? All users who are updating to Thunderbird 2 or only the ones who use another junk folder as the default one?
You also set blocking-thunderbird2 but it's still not fixed. Do we want to have it fixed before the major update?
Comment 22•17 years ago
|
||
Confirmed on Thunderbird v2.0.0.9 (20071031), brand new installation (not upgrading from a previous version) on a Windows 98SE system.
As Martin Halle noticed, it happens if the checkbox "Move new junk messages to..." is enabled but no folder is selected.
Comment 23•17 years ago
|
||
Bug 385924 (Ok button does not close settings window when pressed, but changes are saved.) is probably a duplicate of this bug, even though changes are saved in that case.
In fact I experienced the same bug, but when I added another account, changes were no longer saved. So it seems that while the apparent behavior of the OK button doesn't change (account window is not closed), changes are saved if you only have a single account, and changes are not saved if you have more than one account.
Comment 24•17 years ago
|
||
I'm not able to see this bug. What version of Thunderbird you are using? Do you see any error inside the Error Console? Perhaps you have to enable strict warnings first within the config editor.
Comment 25•17 years ago
|
||
(In reply to comment #22)
> Confirmed on Thunderbird v2.0.0.9 (20071031), brand new installation (not
> upgrading from a previous version) on a Windows 98SE system.
Pending further triage, since the bug has been confirmed recently, moving bug from an obsolete flag blocking-thunderbird2+ to blocking-thunderbird3?
Flags: blocking-thunderbird2+ → blocking-thunderbird3?
Comment 26•17 years ago
|
||
(In reply to comment #25)
> Pending further triage, since the bug has been confirmed recently, moving bug
> from an obsolete flag blocking-thunderbird2+ to blocking-thunderbird3?
Yes, pleeeeease! This is one of the most annoying bugs for me. Every time I add a new account this one strikes me. :-(
Comment 27•17 years ago
|
||
I can't repro this in Tb trunk nightlies. Would be good to have specific repro instructions here.
Comment 28•17 years ago
|
||
Is this related to bug 422726 or bug 422724?
Updated•16 years ago
|
Assignee: mscott → nobody
Comment 31•16 years ago
|
||
This bug occurs if you have a folder called 'junk' (notice the case), and you've chosen to 'Move new junk messages' to '"Junk" Folder on:'
I have verified it on 'fresh' installs of 3.0a1 (2008050715), and 2.0.0.14 (20080421) en-US, on Linux and XP.
Step-by-step:
1: Create a 'junk' folder, or any other case combinations (eg, 'juNK'), but not 'Junk'.
2: Account Settings, Junk Settings (any?), select 'Move new junk messages to:'
3: Leave default setting of '"Junk" folder on:' and 'Local Folders' (or wherever your new 'junk' folder is)
4: Click OK
5: The OK button is 'broke', but offending Junk settings are saved, meaning this problem will reoccur every time Account Settings is opened.
Work-around:
Rename your 'junk' folder to 'Junk'
OR
Explicitly select your 'junk' folder in the 'Other:' drop-down.
Incidentally, the 'junk' folder has a normal folder icon, renaming to 'Junk' gives it the flame icon.
Comment 32•16 years ago
|
||
I can see something similar very reliably on trunk now - funny but 2.0.0.14 does not show me the same problem. Also, I do not see any error message, either in the error console, nor on the main console (this is a debug buildc on a W2K virtual machine). Different cause or bug? I'll investigate a little, and decide if the root cause could cause the other symptoms that are mentioned here.
Anyway, my STR:
1) Create a new profile. Add a single IMAP account.
2) On both the IMAP account, and the Local Folders account, enable adaptive junk controls and "Move new junk messages to" and choose the default ('"Junk" folder on' and then the account name).
3) Go to the IMAP account. Change the "Junk" folder on ... to Local Folders. Press OK.
4) Re-enter the Account Settings dialog.
Expected Results:
"Junk" folder on points to Local Folders
Actual result:
"Junk" folder on continues to point to the original value (for the IMAP account).
Comment 33•16 years ago
|
||
I'm beginning to believe that my issues are different, and are a regression from bug 413781. I'm going to file a new bug.
Comment 34•16 years ago
|
||
Hello guys!
I've had this problem (or at least similar) and found a temporary solution.
On my system (OpenSUSE, Thunderbird 2.0.0.4) I had the error:
Error: [Exception... "Component returned failure code: 0x8000ffff
(NS_ERROR_UNEXPECTED) [nsISpamSettings.initialize]" nsresult: "0x8000ffff
(NS_ERROR_UNEXPECTED)" location: "JS frame ::
chrome://messenger/content/AccountManager.js :: saveAccount :: line 648" data:
no]
Source File: chrome://messenger/content/AccountManager.js
Line: 648
There I found a line that says:
// if we made account changes to the spam settings, we'll need to re-initialize
// our settings object
if (server && server.spamSettings)
server.spamSettings.initialize(server);
Now this line, that wants to initialize the spamSettings (AFAIK), is sometimes broken. In my case, I can reproduce this bug with just browsing around the settings window (vieweing settings a lot, like 20 or more pages), and then the OK button is broken, and the error comes. So my solution wants to be, to put a try - catch in this line like this:
// if we made account changes to the spam settings, we'll need to re-initialize
// our settings object
if (server && server.spamSettings) {
try {
server.spamSettings.initialize(server);
} catch(err) {
// Handle errors here, or at least inform the user to restart
//hunderbird to make Spam settings work as he just set it up.
}
}
I hope I could help,
regards
Gregory
Comment 35•16 years ago
|
||
(In reply to comment #34)
> Hello guys!
> I've had this problem (or at least similar) and found a temporary solution.
> On my system (OpenSUSE, Thunderbird 2.0.0.4) I had the error:
>
> Error: [Exception... "Component returned failure code: 0x8000ffff
> (NS_ERROR_UNEXPECTED) [nsISpamSettings.initialize]" nsresult: "0x8000ffff
> (NS_ERROR_UNEXPECTED)" location: "JS frame ::
> chrome://messenger/content/AccountManager.js :: saveAccount :: line 648" data:
> no]
> Source File: chrome://messenger/content/AccountManager.js
> Line: 648
If this is the case, what we really need to find out is why nsISpamSettings.initialize is failing, not just masking the error/getting the user to do the work. Looking at the code and what you say is happening, its most likely like UpdateJunkFolderState is failing for some reason:
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/mailnews/base/src/nsSpamSettings.cpp&rev=1.35&mark=344,347-384#344
Comment 36•16 years ago
|
||
That is true Mark. But I do not know C++, so I can not help you any further in it. I only say, that the users out there want to use Thunderbird, and while this error is coming up, the Account Settings window is literally unusable.
For users like me, who have more accounts, and want to change more settings, this bug is like a nightmare.
I know this is just a workaround, but at least, you can save your changes.
Comment 37•16 years ago
|
||
I have just done some analysis on this in the debugger.
Steps to repeat:
- Create a new pop account, leave junk settings off
- Create a new folder at the same level as the inbox, call it "junk" (note: no captials).
- Go into Account Properties and turn the junk settings on, storing the junk in the junk folder of that account.
- Click OK.
- Error message on console and doesn't close the window.
Looking at the code, nsSpamSettings::OnStopRunningUrl fails when it tries to get the existing folder, digging further into that function, its the call to GetParent() on the Junk folder (URI "mailbox://account/Junk") that fails.
Interestingly, earlier on we look for the Junk folder, and get it correctly even though its lower case.
I'm hoping David's going to have some ideas here about case sensitivity and what is happening.
Flags: wanted-thunderbird3+
Priority: -- → P2
Summary: Account setting "OK" button not saving data. → Account setting "OK" button not saving data (due to junk settings).
Target Milestone: --- → Thunderbird 3.0rc1
Updated•16 years ago
|
Whiteboard: [needs info bienvenu]
Assignee | ||
Comment 38•16 years ago
|
||
GetParent fails because it was a call to GetResource that created the nsMsgDBFolder object, not the normal folder discovery/creation process, which sets up the parent folder correctly. I believe RDF resources are case-sensitive.
Updated•16 years ago
|
Flags: blocking-thunderbird3? → blocking-thunderbird3+
Whiteboard: [needs info bienvenu] → [has info, str comment 37]
Comment 39•16 years ago
|
||
I have the same problem with 2.0.0.17 WindowsXP
The only thing i made is to get a new certificate and add it to the account.
The Certificate is stored.
Comment 40•16 years ago
|
||
Seeing this in 3.0b1 (Mac PPC 10.4) testing.
error console:
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIMsgFolder.server]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file:///Users/chris/Desktop/Thunderbird.app/Contents/MacOS/modules/folderUtils.jsm :: setPropertyAtoms :: line 92" data: no]
Using an existing profile, I can't seem to get out of the prefs dialog using the OK button at all - only the cancel button works. I am able to create/delete profiles, and that happens, I just can't use the OK button.
Comment 41•16 years ago
|
||
89 if (aFolder.isServer)
90 addAtom("isServer-true");
91
92 addAtom("serverType-" + aFolder.server.type);
93
94 // set the SpecialFolder attribute
95 addAtom("specialFolder-" + getSpecialFolderString(aFolder));
Comment 42•16 years ago
|
||
Fixing the component type, this is a problem with the Account Manager, not preferences.
Component: Preferences → Account Manager
QA Contact: preferences → account-manager
Assignee | ||
Comment 43•16 years ago
|
||
taking so this will have an owner. I will try standard8's STR
Assignee: nobody → bienvenu
Assignee | ||
Comment 44•16 years ago
|
||
the issue is as I described earlier - GetResource() is case sensitive, but nsIMsgIncomingServer::GetMsgFolderFromURI() is case-insensitive. So GetOrCreateFolder() finds the lower-case junk folder, but nsSpamSettings::OnStopRunningUrl doesn't find the folder. The least scary fix is probably to make nsSpamSettings look for the folder in a case-insensitive manner. There are other fun related issues like nsSpamSettings::GetSpamFolderURI insisting on creating a uri with "/Junk". I suppose an other possibility is making GetSpamFolderURI check for an existing folder and using the correct URI - I might explore that next - the other approaches I've tried have failed miserably.
Assignee | ||
Comment 45•16 years ago
|
||
Attachment #368075 -
Flags: superreview?(bugzilla)
Attachment #368075 -
Flags: review?(bugzilla)
Updated•16 years ago
|
Attachment #368075 -
Flags: superreview?(bugzilla)
Attachment #368075 -
Flags: superreview+
Attachment #368075 -
Flags: review?(bugzilla)
Attachment #368075 -
Flags: review+
Assignee | ||
Comment 46•16 years ago
|
||
fix checked in.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Comment 47•16 years ago
|
||
Comment on attachment 368075 [details] [diff] [review]
proposed fix
>+ // Check for an existing junk folder - this will do a case-insensitive
>+ // search by URI - if we find a junk folder, use its URI.
>+ nsCOMPtr<nsIMsgFolder> junkFolder;
> folderURI.Append("/Junk");
>+ if (NS_SUCCEEDED(server->GetMsgFolderFromURI(folder, folderURI,
>+ getter_AddRefs(junkFolder))))
>+ junkFolder->GetURI(folderURI);
>
> // XXX todo
> // better not to make base depend in imap
> // but doing it here, like in nsMsgCopy.cpp
> // one day, we'll fix this (and nsMsgCopy.cpp) to use GetMsgFolderFromURI()
Is there some code removal due here? ;-)
Assignee | ||
Comment 48•16 years ago
|
||
good catch - I think the comment and the code after it can go away - I'll file a follow-up bug.
Assignee | ||
Comment 49•16 years ago
|
||
actually, GetUriWithNamespace only finds existing folders, and I think this code has to do the right thing when the junk folder doesn't exist yet.
Comment 50•15 years ago
|
||
I have no idea what setting is causing this bug for me, but I'm experiencing this as well on TB3. Suggest reopening the bug.
I'm not getting any errors on the terminal, but I did just notice that if I open it via one account (right click on account name > Settings...) it works properly, and if I open it via another, it doesn't.
Maybe I need to isolate what's different between the accounts? If that's helpful, I can take a stab at that.
Comment 51•15 years ago
|
||
I have just updated to Thunderbird 3.0.2 under Ubuntu 9.10
I can now NOT save any changes to the Account junk settings. The error console produces the message:
Error: uncaught exception: unable to find folder to select!
I can not turn off or change any junk settings. Junk seems to be the only settings affected.
I am collecting email from several email accounts.
Please reopen this bug it is not fixed. An uncaught exception is a sign the coding is not complete.
Comment 52•15 years ago
|
||
(In reply to comment #51)
> Please reopen this bug it is not fixed. An uncaught exception is a sign the
> coding is not complete.
Please can you file a new bug. This bug was fixed in 3.0 and its entirely possible there's a regression or yes, we missed a specific case. However as the fix went into released code, we file new bugs for other issues raised, even if they appear to be the same steps to repeat.
Comment 53•15 years ago
|
||
I have filed a new bug - Bug 549239 - Can not change Account junk settings "uncaught exception: unable to find folder to select!"
You need to log in
before you can comment on or make changes to this bug.
Description
•