Closed Bug 1096058 Opened 7 years ago Closed 7 years ago

[email/IMAP] createFolder broken in email.js refactor

Categories

(Firefox OS Graveyard :: Gaia::E-Mail, defect)

defect
Not set
normal

Tracking

(b2g-v2.1 fixed, b2g-v2.2 fixed)

RESOLVED FIXED
Tracking Status
b2g-v2.1 --- fixed
b2g-v2.2 --- fixed

People

(Reporter: toby, Unassigned)

References

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.2.0
Build ID: 20141102094008

Steps to reproduce:

Device: ZTE Open C
OS Version: 21.0.0-prerelease
Build ID: 20141008000201

Set up an account manually, pointing to my ubuntu 12.04.5 vanity server running dovecot IMAP version 1:2.0.19-0ubuntu2.2.  Entered the IMAP and SMTP credentials and everything appeared to work fine.  Test connections all succeeded.

This server uses a StartSSL class 1 free cert so I had to install the intermediate cert on the phone to get it to connect over TLS.  That appears to work correctly, though.



Actual results:

Email app displayed the index of messages correctly.  Tapped on a message and the from, to, title, and date are displayed correctly, but instead of the message body there's a blue spinner that never goes away.

abd logcat shows these three lines in yellow:
I/GeckoDump(10267): LOG: pushCard for type: message_reader
I/Gecko   (10267): WLOG: queueOp 3 modtags pre-queues: local: 0 server: 3
I/Gecko   (10267): WLOG: queueOp 3 downloadBodyReps pre-queues: local: 1 server: 4

Dovecot email on the server doesn't show any communication from the phone at all.



Expected results:

Display message body.  This works fine with gmail.  When I tap on a message to display it I get different yellow output in logcat:

I/GeckoDump(10267): LOG: pushCard for type: message_reader
I/GeckoDump(10267): LOG: iframe_shims: recalculating height / width because initial sw 290 sh 384 bs 1
I/GeckoDump(10267): LOG: iframe_shims: scale: 1
(In reply to toby cabot from comment #0)
> This server uses a StartSSL class 1 free cert so I had to install the
> intermediate cert on the phone to get it to connect over TLS.  That appears
> to work correctly, though.

You shouldn't need to do this; your ssl_cert directive in your dovecot config should point at a file with your cert and the rest of the trust chain concatenated together.  (Basically cat everything that's not the private key together :).  If you've already concatenated them, then you've got them in the wrong order, although it seems like dovecot is less picky than apache.

I use the following script to help me validate IMAP SSL certs (with the ca-certificates package installed in Ubuntu):

#!/bin/bash
openssl s_client -CApath /etc/ssl/certs -connect $1:993 < /dev/null


> Email app displayed the index of messages correctly.  Tapped on a message
> and the from, to, title, and date are displayed correctly, but instead of
> the message body there's a blue spinner that never goes away.

The excerpt isn't quite enough.  If you could kill the email app, then start capturing the logcat, open the email app, and go tap on a message, that should help me diagnose what's going on.  There shouldn't be anything private in there, but please do skim to make sure there isn't.  You can attach it to the bug as an attachment or email it to me privately at asuth@mozilla.com if you're concerned about the contents being public.
Flags: needinfo?(toby)
(In reply to Andrew Sutherland [:asuth] from comment #1)
> (In reply to toby cabot from comment #0)
> > This server uses a StartSSL class 1 free cert so I had to install the
> > intermediate cert on the phone to get it to connect over TLS.  That appears
> > to work correctly, though.
> 
> You shouldn't need to do this; your ssl_cert directive in your dovecot
> config should point at a file with your cert and the rest of the trust chain
> concatenated together.  (Basically cat everything that's not the private key
> together :).  If you've already concatenated them, then you've got them in
> the wrong order, although it seems like dovecot is less picky than apache.
> 
> I use the following script to help me validate IMAP SSL certs (with the
> ca-certificates package installed in Ubuntu):

Thanks!  I cat'ed the trust chain together and installed it and I can now connect without adding any certs to the phone's truststore.  I'll work on getting you the info you requested.
Attached file imap.log
Thanks for looking at this report so quickly!

I went into the application manager, quit the email app, then cleared the log, opened email (there were two messages in the index) and tapped on one of them.  This is the log that printed out during these steps.

I'm happy to provide more data if you need it.
Flags: needinfo?(toby)
Okay, so it looks like what's happening is we're failing to find one of a Trash folder or a Sent folder and so we are trying to create the folder on the server.  The createFolder call appears to be hanging silently.  This stops up the job queue.

The workaround is for you to create a Trash and Sent folder on your account.  Then we should get happy, although you might need to
Summary: email/imap retrieves index but not message contents → [email/IMAP] createFolder apparently hanging on dovecot server
(In reply to Andrew Sutherland [:asuth] from comment #4)
> The workaround is for you to create a Trash and Sent folder on your account.
> Then we should get happy, although you might need to

...might need to remove and re-add the account.

And in the meantime I'll look into what's going on with createFolder on dovecot.  Hopefully the email.js lib upgrade will magically fix that, but we'll see.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to Andrew Sutherland [:asuth] from comment #4)
> The workaround is for you to create a Trash and Sent folder on your account.

Confirmed.  Created two folders on the imap server: Sent and Trash.  Deleted the mail account config in the email app and recreated it and I can now receive, view, and send email.

Thank you!
Summary: [email/IMAP] createFolder apparently hanging on dovecot server → [email/IMAP] createFolder apparently hanging on dovecot server. And gmail? Whaaaaa?
No longer blocks: 1095779
See Also: → 1095779
Summary: [email/IMAP] createFolder apparently hanging on dovecot server. And gmail? Whaaaaa? → [email/IMAP] createFolder broken in email.js refactor
Fixed as part of bug 1097421's omnibus patch. Many servers were experiencing more than one bug, and we had experienced some upstream drift, and especially for uplift tracking, it made sense to land these together.  See the gaia-email-libs-and-more pull request's specific commits for the specific fixes and tests.  I am planning to request v2.1 uplift shortly after performing v2.1 testing.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Batching marking v2.1 fixed since the uplift of bug 1097421 occurred on Dec 9th, thereby fixing all dependent bugs of bug 1097421 on v2.1.  Uplift commit comment is https://bugzilla.mozilla.org/show_bug.cgi?id=1097421#c6
You need to log in before you can comment on or make changes to this bug.