Closed Bug 428620 Opened 16 years ago Closed 16 years ago

'Get Mail' fails for selected inbox in folder pane

Categories

(Thunderbird :: Mail Window Front End, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: JoeS1, Assigned: jminta)

References

Details

(Keywords: regression, Whiteboard: verified-fixed)

Attachments

(2 files)

Clicking get mail on a selected inbox fails to download mail.
STR:
Select(highlight) an inbox in the folder pane.
Click on 'Get Mail'
Mail is not downloaded.

Works in:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008041003 Thunderbird/3.0a1pre ID:2008041003

Fails in:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008041103 Thunderbird/3.0a1pre ID:2008041103

Error console:
Error: [Exception... "'Component is not available' when calling method: [nsIHandlerService::fillHandlerInfo]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "<unknown>"  data: no]



Keywords: regression
A comment in the daily build thread suggests that this is Windows only.  Can others confirm? Thanks.
After Phil's checkin for bug 428767 I no longer see the error console message.
(and a plethora of other messages)

However, the original bug symptoms remain.
It does download for me on linux. However, I get the following exception

Error: [Exception... "Component returned failure code: 0x80004002 (NS_NOINTERFACE) [nsISupports.QueryInterface]"  nsresult: "0x80004002 (NS_NOINTERFACE)"  location: "JS frame :: chrome://messenger/content/mail-folder-bindings.xml :: act_remove :: line 143"  data: no]
Source File: chrome://messenger/content/mail-folder-bindings.xml
Line: 143

leading here: http://lxr.mozilla.org/seamonkey/source/mail/base/content/mail-folder-bindings.xml#131 (also for the act_remove function) 

Also, when clicking the main Get mail button:
Warning: reference to undefined property event.target._folder
Source File: chrome://messenger/content/messenger.xul
Line: 1

These may not be the same problem, but since it's so much in the same area...
Blocking-3.0a1+, since comment 4 describes a fairly serious regression.
Flags: blocking-thunderbird3.0a1+
Reassigning to jminta, since this appears to be his regression.
Assignee: nobody → jminta
Just to be clear about 'get mail' and errors.
 Clicking get mail does not generate anything in the error console.
It simply does not work.

 I also noticed that it does not offer to download headers on a selected newsroup. Even when the newsgroup is selected from the dropdown.

Further, the dropdown did not include newsgroup accounts prior to bug 413781
Was this an intended expansion of that function ?

Opening a newsgroup with additional headers available does still offer to download.

(In reply to comment #8)
> Further, the dropdown did not include newsgroup accounts prior to bug 413781
> Was this an intended expansion of that function ?

I've always had newsgroup accounts there.
OK, here's how I see it.  Simply clicking the "Get Mail" button triggers a download of mail from *all* accounts, regardless of what is selected in the folder pane.  This was so before the patch in bug 413781.  However, there's another one of those annoying try/catch/dumps that plagues mail code in the path here.  People who are seeing this problem, please enable dump()s and then check your console to see if there is an exception reported there.
http://mxr.mozilla.org/seamonkey/source/mail/base/content/mailWindowOverlay.js#938
Attached file pop3 log
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008041003 Thunderbird/3.0a1pre ID:2008041003

STR:
select a folder in the folder pane (in this case my gmail pop3)
click 'get mail'
See the attached protocol log showing just that account checked.

I'm not saying that this behavior is correct, just that is the way it worked before the checkin. If others use this method, I'm sure it will cause confusion.
OK, we can deal with that I suppose.  Were there any exception dump()s though?
(In reply to comment #10)
> People who are seeing this problem, please enable dump()s and then
> check your console to see if there is an exception reported there.

I set browser.dom.window.dump.enabled;true (is that what you mean?).
When I click on Get All New Messages absolutely nothing happens, but
if I select my main pop3 account from the dropdown menu it fetches
all the mail in that account properly.  But I also see six exceptions
in the error console:

Error: [Exception... "Component returned failure code: 0x80004002 (NS_NOINTERFACE) [nsISupports.QueryInterface]"  nsresult: "0x80004002 (NS_NOINTERFACE)"  location: "JS frame :: chrome://messenger/content/mail-folder-bindings.xml :: act_add :: line 132"  data: no]
Source File: chrome://messenger/content/mail-folder-bindings.xml
Line: 132

The second and third exceptions are identical to the first.  The fourth
is the same except act_remove::line 143 data:no.  The fifth is the same
as the first three.  The sixth is the same as the fourth.

Does this mean anything to you?
Yep, that's exactly what I wanted to know.  It's not the info I had hoped would be dumped, but it's good to have it either way.
Whiteboard: [needs patch]
Here's another one, but not very helpful.  I wasn't looking at the error
console when it appeared so I'm not sure what I was doing at the time:

Error: [Exception... "'Component is not available' when calling method: [nsIHandlerService::fillHandlerInfo]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "<unknown>"  data: no]
I see this error on a debug build from a CVS download of Thunderbird dated 2008-04-17. When I click on Get Mail, in the error console I get:

reference to undefined property event.target._folder
chrome://messenger/content/messenger.xul   line 1

I assume this is occurring at:

http://mxr.mozilla.org/seamonkey/source/mail/base/content/mailWindowOverlay.xul#1359

in the statement:

oncommand="MsgGetMessagesForAccount(event.target._folder)"
Attached patch patch v1Splinter Review
You might think that MsgGetMessagesForAllServers would, you know, get messages for all servers, but in many cases it doesn't.  Rather, MsgGetMessage is actually the function you want. Called cmd_getNewMessages will trigger this.  See https://bugzilla.mozilla.org/attachment.cgi?id=312843&action=diff#a/mail/base/content/mailWindowOverlay.xul_sec5 for how the original patch relied on this codepath.
Attachment #316876 - Flags: review?(dmose)
patch v1 works for me when manually entered into the js for my 2008-04-17 build.
Comment on attachment 316876 [details] [diff] [review]
patch v1

This doesn't look right to me: in the case where an argument is passed in, we don't go through goDoCommand.  This means that we don't go through the appropriate command dispatcher nor do we check whether or not the command is enabled.
Attachment #316876 - Flags: review?(dmose) → review-
Whiteboard: [needs patch] → [needs new patch]
The above-noted asymmetry is consistent with the previous code-paths.  The only difference is that before, the divergence was created in the xul, now the xul all points to one function where the divergence happens. Moreover, the getmail command is always enabled, and simply calls MsgGetMessage.  If you prefer, I can change to calling that function directly, though the end result is the same.  At this point in a release cycle, I was aiming for as close of an approximation of the old (user-tested) code.
Comment on attachment 316876 [details] [diff] [review]
patch v1

OK, sold.  r=dmose
Attachment #316876 - Flags: review- → review+
Checking in mail/base/content/mailWindowOverlay.js;
/cvsroot/mozilla/mail/base/content/mailWindowOverlay.js,v  <--  mailWindowOverlay.js
new revision: 1.198; previous revision: 1.197
done
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
All-is-as-it-was

Many such trips are possible.(Star Trek "The City on the edge of forever")

Verified-fixed: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008042318 Thunderbird/3.0a1pre ID:2008042318

Whiteboard: [needs new patch] → verified-fixed
Sadly this bug is not fixed for me on linux.  When I click on Get All New
Messages only the account selected in the left pane is fetched, no other
servers are even queried.

Also, for each message fetched I get this error:
Error: [Exception... "Component returned failure code: 0x80004002 (NS_NOINTERFACE) [nsISupports.QueryInterface]"  nsresult: "0x80004002 (NS_NOINTERFACE)"  location: "JS frame :: chrome://messenger/content/mail-folder-bindings.xml :: act_add :: line 132"  data: no]
And the 'line 132' changes to 'line 143' when deleting each message.
According to comment #12, getting mail for just the selected account is the intended behavior (or at least, that's the past behavior, we should address whether we want to change that in another bug)  The errors are expected/normal.
(In reply to comment #26)
> According to comment #12, getting mail for just the selected account is the intended behavior

It's not applicable to "Get All New Messages" in drop down menu of "Get Mail".
It's applicable to "Get Mail" only.
I've opened Bug 431247 for this broken "Get All New Messages" problem.

Please note that "Get Mail" and combined drop down menu is slightly different from usual menu ;
 - Drop down menu of "Get Mail"
   a. "Get All New Messages" (Get mail for all accessible accounts) 
   b. Account choice (Get mail for clicked account in the drop down menu)
   c. Get mail for currently selected account(highlighted account/folder)
When usual menu, (c) is placed in dropdown menu and is defined as default action if required. But "Get Mail" case, (c) is not defined in the drop down menu. (c) is assigned to "Get Mail" button itself instead.
FYI.
Issue of "No choice of currently selected account in drop down menu of 'Get Mail'" ( (c) is not defined in drop down menu ) has been resolved by Bug 217942, and behavior of "Get All New Messages" has been corrected to proper one in patch for Bug 217942(i.e. Bug 431247 has been fixed).
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: