Closed Bug 824783 Opened 12 years ago Closed 12 years ago

[email] "No mail in this Folder" overlaps the actual emails in the sent folder if the phone times out

Categories

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

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-basecamp:+)

VERIFIED FIXED
B2G C3 (12dec-1jan)
blocking-basecamp +

People

(Reporter: nhirata, Assigned: squib)

References

Details

(Keywords: regression)

Attachments

(3 files)

Attached image screenshot
## Environment :
Unagi phone, build 2012-12-26

## Repro :
1. go to email, setup an account with hotmail
2. send an email to verify that you have an email in the sent folder
3. go to sent folder
4. let the device time out
5. wake phone up

## Expected :
1. no overlay

## Actual :
1. there's an overlay of no mail in this Folder

## Note :
1. if you place the phone in the back ground and bring it up, the overlay still shows
2. if you refresh, the overlay will still show
3. even if you close the app through task manager, and then reopen mail app, the overlay will still show
4. you can't tap on the 2nd/3rd email on the list.

noming for blocking because of note #4; it breaks functionality.
Unable to reproduce with gmail/imap -- is this specific to hotmail/activesync?
Like all e-mail problems, we either need or strongly benefit from a logcat as described at point 3 on https://wiki.mozilla.org/Gaia/Email/RequiredBugInfo

In this case, it seems likely an exception is getting thrown and would be logged in the logcat.
Triage: QAWANTED to confirm how easy this is to reproduce this issue. I cannot reproduce either (with 12/26 build). Can user recover from symptom easily by leaving the app and come back?
Keywords: qawanted
Naoki, is this reproducible? Can you provide a logcat?
Flags: needinfo?(nhirata.bugzilla)
Same screen overlapping other view, reproducible (with 12/27 build):
Gaia 73270c3
Gecko b8d7310

That happens the first time the hotmail account is configured.
See screenshot attached
Assigning to Jim for more investigation. 

We'd still like to see a logcat from QA if you can get one.
Assignee: nobody → squibblyflabbetydoo
Priority: -- → P2
Target Milestone: --- → B2G C3 (12dec-1jan)
(In reply to Isabel Rios [:isabel_rios] from comment #5)
> Created attachment 696311 [details]
> hotmail first screen after setting the account

I think this is a different bug.

Dylan, this is what I was talking about at our meeting yesterday; what happens is that if you go to the inbox too quickly after creating an ActiveSync account, we haven't synced the folder list yet, and only have the fake Inbox. The fake inbox thinks we can do "load more messages", which ActiveSync doesn't support. It also doesn't automatically load the messages, and maybe it should. However, hitting the refresh icon should make everything look ok.
(In reply to Jim Porter (:squib) from comment #7)
> It also doesn't automatically load the messages,
> and maybe it should. However, hitting the refresh icon should make
> everything look ok.

ActiveSync has special logic in activesync/jobs.js' do_syncFolderList to detect this special inbox case and trigger a synchronization of the folder.  Of course, it could have regressed because that code pre-dates the activesync unit test coverage.
I think I'm going to do a couple of things in this bug:

1) Fix the "load more messages" thing so it doesn't show up in ActiveSync fake inboxes
2) Make sure "no messages" and "loading" are never shown at the same time
3) Make sure we refresh the fake inbox once we have the real one
So the reason #3 wasn't working is that when we start do_syncFolderList, we haven't opened the inbox yet, so there are no active slices.
(In reply to Jim Porter (:squib) from comment #10)
> So the reason #3 wasn't working is that when we start do_syncFolderList, we
> haven't opened the inbox yet, so there are no active slices.

The inboxNeedsResync flag is independent of whether there are any slices or not, it's just telling us whether the folder is actually syncable.  The question is if the slice exists by the time syncFolderList completes.  My rationale was that:
- if the slice exists, then we refresh it => win.  
- if the slice does not exist, then it hasn't been opened yet and will see the actual inbox when it syncs => win

The resetAndRefreshActiveSlices calls _resetAndResyncSlice without a mutex, so even though the folder list sync is happening without any mutexes, the sync request should get serialized.  (Of course something else is obviously going off the rails.)
(In reply to Andrew Sutherland (:asuth) from comment #11)
> (In reply to Jim Porter (:squib) from comment #10)
> > So the reason #3 wasn't working is that when we start do_syncFolderList, we
> > haven't opened the inbox yet, so there are no active slices.
> 
> The inboxNeedsResync flag is independent of whether there are any slices or
> not...

But it's defined as "inboxNeedsResync = inboxStorage.hasActiveSlices;"
(In reply to Jim Porter (:squib) from comment #13)
> But it's defined as "inboxNeedsResync = inboxStorage.hasActiveSlices;"

Right you are.  My brain was reading the RHS as true for some reason.  On the upside, I have thought through what solution I want for the fix now :)
Attached file logcat
Turns out that my bug is reproducible.  It has to do with a null subject line.  See logcat.
Flags: needinfo?(nhirata.bugzilla)
Argh, that's my fault, and fallout from bug 821447. Fix forthcoming.
Triage: regression. BB+
blocking-basecamp: ? → +
Keywords: qawantedregression
Checked in: https://github.com/mozilla-b2g/gaia-email-libs-and-more/pull/104
            https://github.com/mozilla-b2g/gaia/pull/7245

(The above checkins are for Isabel's issue. Naoki's was addressed in bug 821447.)
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Issue does not repro on 9 different email accounts so therefore  must be fixed
Status: RESOLVED → VERIFIED
Bustage fix to move canGrowSync to ImapFolderSyncer from ImapFolderConn, re-greening IMAP unit tests:
https://github.com/mozilla-b2g/gaia-email-libs-and-more/pull/111
https://github.com/mozilla-b2g/gaia/pull/7404
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: