Moving multiple msg from IMAP Sent items folder to Local folder doesn't work

RESOLVED FIXED

Status

MailNews Core
Networking: IMAP
RESOLVED FIXED
14 years ago
9 years ago

People

(Reporter: Rob Siera, Assigned: Bienvenu)

Tracking

({testcase})

1.7 Branch
x86
Windows XP
testcase

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments, 1 obsolete attachment)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.3); .NET CLR 1.0.3705; .NET CLR 1.1.4322)
Build Identifier: 

Moving one message from the Sent Items folder of an IMAP account works fine. 
But selecting two or more and you can't move (or copy) them to a local mail 
folder

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
(Assignee)

Comment 1

13 years ago
Rob, can you try generating an imap protocol log with tomorrow's nightly trunk
thunderbird build?

http://www.mozilla.org/quality/mailnews/mail-troubleshoot.html#imap

I've added some more logging to help diagnose this.
Assignee: mscott → bienvenu
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Comment 2

13 years ago
Rob, can you try generating an imap protocol log with tomorrow's nightly trunk
thunderbird build?

http://www.mozilla.org/quality/mailnews/mail-troubleshoot.html#imap

I've added some more logging to help diagnose this.

Comment 3

13 years ago
Created attachment 177862 [details]
Multiple Sent Item Move Attempt (Log)

Comment 4

13 years ago
I have attached a log detailing what happens when multiple 'Sent' items are
selected and a move attempt made into a local subfolder. (Refer to 'Multiple
Sent Item Move Attempt (Log)')

Comment 5

13 years ago
Comment on attachment 177862 [details]
Multiple Sent Item Move Attempt (Log)

Build tag: 20050317
(Assignee)

Comment 6

13 years ago
this looks like yet another case where a user name with non alphanumeric
characters is causing the problem. I'll try that angle again.

Comment 7

13 years ago
(In reply to comment #6)
> this looks like yet another case where a user name with non alphanumeric
> characters is causing the problem. I'll try that angle again.

In the meantime, I'll try an IMAP account without special characters.
(Assignee)

Comment 8

13 years ago
I don't suppose you could set me up with a test account that has this problem,
with a user name similar to yours? My imap server doesn't allow non
alpha-numeric user names.

Comment 9

13 years ago
(In reply to comment #8)
> I don't suppose you could set me up with a test account that has this problem,
> with a user name similar to yours? My imap server doesn't allow non
> alpha-numeric user names.

I created an account @ Fastmail that I'm able to reproduce the problem with. I
emailed you the details.
(Assignee)

Comment 10

13 years ago
Created attachment 177907 [details] [diff] [review]
more logging

resurrect the "validUrl" flag from 4.x - my theory is that maybe we're having
trouble parsing the url because of the user name. If we fail to parse the url,
we won't set the imap action, and we won't do anything in
ProcessCurrentUrl...this won't fix the problem, but might help diagnose it.
Attachment #177907 - Flags: superreview?(mscott)

Updated

13 years ago
Attachment #177907 - Flags: superreview?(mscott) → superreview+

Comment 11

13 years ago
I can't reproduce this problem on my home machine with 1.0 (20041206) loaded
(same IMAP account, etc.)

Will try:
1. Newer build
2. Same prefs.js as laptop
3. Banging head on wall

Comment 12

13 years ago
Ok, here's my steps to reproduce:

1. Start Thunderbird

2. Add IMAP account (go through wizard) with username with a \ (hex: EC)
character present.

3. Retrieve Inbox/Sent item headers - Verify that dragging multiple messages
works fine.

4. Alter account to use / (hex: 2F) instead of \ (hex: EC) character.

NOTE: Exchange is not that sensitive on slash usage, it appears.

5. Retrieve Inbox/Sent item headers (re-input password).

6. Try dragging multiple messages from 'Sent' folder to local folders. Problem
reproduced.

---

I will try compiling Thunderbird using the latest nightly tar w/ the proposed
patch applied and provide feedback. Thanks.
(Assignee)

Comment 13

13 years ago
Adding Rafael as QA contact, since he wants to help resolve this issue.
QA Contact: r.rivera

Comment 14

13 years ago
Created attachment 178130 [details]
FastMail Acct. Multiple Move Attempt (Log)

Attached new log with a snip of:

a) Opening of the 'Test Msgs' folder in the said FastMail account
b) Attempt of moving three messages within' this folder to local folder
(should show near bottom but nothing happens)

Attempts in compiling w/ proposed patch (which applies successfully) failed
(I'm a compile newbie) - Will bring up imapd and/or Exchange server for David
to conduct more testing.
(Assignee)

Comment 15

13 years ago
was this new log from a new trunk build, with a litle extra bit of logging?

Comment 16

13 years ago
The log  was from version 1.0+ (20050317).
(Assignee)

Comment 17

13 years ago
oh, could you try a 03/19 build? I checked in some more logging code on 03/18,
which would show up in the 03/19 build...

Comment 18

13 years ago
Created attachment 178158 [details]
Multiple Sent Item Move Attempt #2  (20050321)

Added log snip from version 1.0+ (20050321).
Attachment #177862 - Attachment is obsolete: true
(Assignee)

Comment 19

13 years ago
OK, I can reproduce this now, so I should have a fix, I hope by tomorrow. Thx so
much for the test case!

Comment 20

13 years ago
(In reply to comment #19)
> OK, I can reproduce this now, so I should have a fix, I hope by tomorrow. Thx so
> much for the test case!

Great - What was the root of the problem, if you don't mind me asking?

Updated

13 years ago
Keywords: testcase
(Assignee)

Comment 21

13 years ago
OK, the problem has to do with the user name in the uri getting escaped. When we
get to GetMessage in nsCopyMessageStreamListener, the escaped username prevents
us from finding the msg hdr, and this in turn causes
nsCopyMessageStreamListener::OnStartRequest to return an error. This in turn
cancels the request, so that we get DeathSignalReceived in the imap protocol
code. It's not clear to me that failure to get the header should abort the url,
but I have a fix that will allow us to get the header - passing in a uri for the
first msg hdr in nsImapService::CopyMessages

+	mData	0x04e2dce8
"imap-message://bug_259656%40fastmail.us@mail.messagingengine.com/INBOX/Test
Msgs#16"

+	mData	0x050cc380
"imap-message://bug_259656%40fastmail%2Eus@mail.messagingengine.com/INBOX/Test
Msgs#16"

// user name not escaped with this stack trace, because uri comes from
aSrcMailboxUri

nsImapUrl::SetUri(nsImapUrl * const 0x092e4954, const char * 0x0915ea88) line 1269
nsImapService::CreateStartOfImapUrl(const char * 0x0915ea88, nsIImapUrl * *
0x0012b394, nsIMsgFolder * 0x039698c8, nsIUrlListener * 0x00000000, nsCString &
{...}, unsigned short & 0x002e) line 1225
nsImapService::CopyMessage(nsImapService * const 0x0384104c, const char *
0x0915ea88, nsIStreamListener * 0x04f45b90, int 0x00000000, nsIUrlListener *
0x00000000, nsIMsgWindow * 0x0381f820, nsIURI * * 0x00000000) line 753 + 69 bytes
nsMsgLocalMailFolder::CopyMessageTo(nsISupports * 0x08d1ce30, nsIMsgFolder *
0x039318f0, nsIMsgWindow * 0x0381f820, int 0x00000000) line 2853
nsMsgLocalMailFolder::CopyMessages(nsMsgLocalMailFolder * const 0x039318f0,
nsIMsgFolder * 0x039698c8, nsISupportsArray * 0x08c5d438, int 0x00000000,
nsIMsgWindow * 0x0381f820, nsIMsgCopyServiceListener * 0x00000000, int
0x00000000, int 0x00000001) line 1776 + 69 bytes


// failure case, uri is escaped, because CopyMessages doesn't pass in a uri to
CreateStartOfImapUrl
nsImapUrl::SetUri(nsImapUrl * const 0x09274654, const char * 0x00000000) line 1269
nsImapService::CreateStartOfImapUrl(const char * 0x00000000, nsIImapUrl * *
0x0012b350, nsIMsgFolder * 0x039698c8, nsIUrlListener * 0x00000000, nsCString &
{...}, unsigned short & 0x002e) line 1225
nsImapService::CopyMessages(nsImapService * const 0x0384104c, nsMsgKeyArray *
0x0012b488, nsIMsgFolder * 0x039698c8, nsIStreamListener * 0x09111908, int
0x00000000, nsIUrlListener * 0x00000000, nsIMsgWindow * 0x0381f820, nsIURI * *
0x00000000) line 796 + 67 bytes
nsMsgLocalMailFolder::CopyMessagesTo(nsISupportsArray * 0x091f2490, nsIMsgWindow
* 0x0381f820, nsIMsgFolder * 0x039318f0, int 0x00000000) line 2804
nsMsgLocalMailFolder::CopyMessages(nsMsgLocalMailFolder * const 0x039318f0,
nsIMsgFolder * 0x039698c8, nsISupportsArray * 0x091f2490, int 0x00000000,
nsIMsgWindow * 0x0381f820, nsIMsgCopyServiceListener * 0x00000000, int
0x00000000, int 0x00000001) line 1763 + 75 bytes
Status: NEW → ASSIGNED
(Assignee)

Comment 22

13 years ago
Created attachment 178253 [details] [diff] [review]
proposed fix

as described in previous comment, pass in the uri for the first message to
CreateStartOfImapUrl, so that GetUri will return a uri with an escaped user
name.
Attachment #178253 - Flags: superreview?(mscott)
(Assignee)

Comment 23

13 years ago
thx very much to Rafael for the test case - the fix should be in tomorrow's
(3/23) build.

Updated

13 years ago
Attachment #178253 - Flags: superreview?(mscott) → superreview+
(Assignee)

Updated

13 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
(Assignee)

Updated

13 years ago
Component: Mail Window Front End → Networking: IMAP
Product: Thunderbird → Core
Version: unspecified → Trunk
(Assignee)

Comment 24

13 years ago
Comment on attachment 178253 [details] [diff] [review]
proposed fix

this is a much-duplicated bug and the fix is localized to the case of copying
multiple imap messages.
Attachment #178253 - Flags: approval1.7.7?
(Assignee)

Comment 25

13 years ago
*** Bug 267927 has been marked as a duplicate of this bug. ***
Comment on attachment 178253 [details] [diff] [review]
proposed fix

a=sspitzer, thanks david!
Attachment #178253 - Flags: approval1.7.7? → approval1.7.7+
Doesn't this also need to land for aviary 1.0.3?
(Assignee)

Comment 28

13 years ago
*** Bug 244530 has been marked as a duplicate of this bug. ***
(Assignee)

Comment 29

13 years ago
*** Bug 275836 has been marked as a duplicate of this bug. ***
(Assignee)

Comment 30

13 years ago
*** Bug 254505 has been marked as a duplicate of this bug. ***
(Assignee)

Comment 31

13 years ago
*** Bug 242424 has been marked as a duplicate of this bug. ***
(Assignee)

Comment 32

13 years ago
*** Bug 261978 has been marked as a duplicate of this bug. ***

Comment 33

13 years ago
Comment on attachment 178253 [details] [diff] [review]
proposed fix

resetting approval flag to requested. drivers need to re-evaluate in the
context of upcoming security releases.
Attachment #178253 - Flags: approval1.7.7+ → approval1.7.7?

Comment 34

13 years ago
Verified working in nightly aviary (20050323). Thanks.
Component: Networking: IMAP → Mail Window Front End
Product: Core → Thunderbird
Version: Trunk → 1.0
(Assignee)

Updated

13 years ago
Component: Mail Window Front End → Networking: IMAP
Product: Thunderbird → Core
Version: 1.0 → 1.7 Branch
(Assignee)

Comment 35

13 years ago
Comment on attachment 178253 [details] [diff] [review]
proposed fix

this might be good for the 1.7 branch
Attachment #178253 - Flags: approval1.7.9?
(Assignee)

Comment 36

13 years ago
*** Bug 297161 has been marked as a duplicate of this bug. ***
(Assignee)

Comment 37

13 years ago
*** Bug 298899 has been marked as a duplicate of this bug. ***

Comment 38

13 years ago
Comment on attachment 178253 [details] [diff] [review]
proposed fix

1.7.9 has already shipped. unsetting nomination.
Attachment #178253 - Flags: approval1.7.9?
(Assignee)

Comment 39

13 years ago
*** Bug 304157 has been marked as a duplicate of this bug. ***
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.