Closed Bug 989116 Opened 10 years ago Closed 10 years ago

[B2G][Email][Inbox] Duplicate email entries appear after executing a search

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:1.4+, b2g-v1.3 unaffected, b2g-v1.4 fixed, b2g-v2.0 fixed)

VERIFIED FIXED
2.0 S1 (9may)
blocking-b2g 1.4+
Tracking Status
b2g-v1.3 --- unaffected
b2g-v1.4 --- fixed
b2g-v2.0 --- fixed

People

(Reporter: pcheng, Assigned: jrburke)

References

Details

(Keywords: regression, Whiteboard: Burirun1.4-2, Priority 2, [ETA 4/25])

Attachments

(2 files)

Description:
Duplicate email entries appear after executing a search. The more searches executed the more duplications appear in the inbox.

Repro Steps:
1) Update a Buri to BuildID: 20140326000201
2) Access the email app
3) Ensure there are several emails in the inbox
4) On top of the Inbox page, execute a valid search within the 'Search Mail' field
5) Exit the Search page and go back to Inbox
6) Observe the Inbox

Actual:
Duplicate email entries appear in the inbox

Expected:
Inbox remains intact

v1.4 Environmental Variables:
Device: Buri v1.4 MOZ
BuildID: 20140326000201
Gaia: 7e705dd4718d528974d99ac31866318d7e201152
Gecko: 4889124accfa
Version: 30.0a2
Firmware Version: v1.2-device.cfg


Notes:
Repro frequency: 5/5, 100%
See attached: logcat
This issue does not reproduce on version 1.3

v1.3 Environmental Variables:
Device: Buri v1.3 MOZ
BuildID: 20140326004002
Gaia: 812838ad0fabf51fa14435af562ddac6d26fa936
Gecko: ba97efb0da4b
Version: 28.0
Firmware Version: v1.2-device.cfg
Keywords: regression
Whiteboard: Burirun1.4-2
Status: UNCONFIRMED → NEW
Ever confirmed: true
I believe I know the source of this because I ran across a similar side effect in the scroll branch: the nonsearch and search message_list cards are both getting notifications of changes in the search slice in header_cursor. I have a fix in the other branch that I can do separately for this bug, so will prep this one first since it can land before the scroll changes.
Assignee: nobody → jrburke
Target Milestone: --- → 1.4 S4 (28mar)
So something more seems to be going on than just restricting the message_list card to only process slice events it cares about. I did this sort of change:

https://github.com/jrburke/gaia/compare/bug989116-email-dupes-after-search

but that was not enough to fix it. In the logcat, there was a set of document.implementation errors (not new for search), but in between I found an error like this:

I/Gecko   ( 3029): WLOG: sf: gotMessages 9
I/GeckoDump( 3029): ERR: Received message about nonexistent slice: 4
I/GeckoDump( 3029): ERR: Problem handling message type: batchSlice Error: Received message about nonexistent slice: 4 
I/GeckoDump( 3029):  reportError@app://email.gaiamobile.org/js/ext/mailapi/main-frame-setup.js:2268:3
I/GeckoDump( 3029): receiveBatchSlice@app://email.gaiamobile.org/js/ext/mailapi/main-frame-setup.js:2590:7
I/GeckoDump( 3029): ma__processMessage@app://email.gaiamobile.org/js/ext/mailapi/main-frame-setup.js:2548:1
I/GeckoDump( 3029): ma___bridgeReceive@app://email.gaiamobile.org/js/ext/mailapi/main-frame-setup.js:2537:7
I/GeckoDump( 3029): bridge.process@app://email.gaiamobile.org/js/ext/mailapi/main-frame-setup.js:5330:9
I/GeckoDump( 3029): register/action@app://email.gaiamobile.org/js/ext/mailapi/main-frame-setup.js:3882:9
I/GeckoDump( 3029): dispatchToListener@app://email.gaiamobile.org/js/ext/mailapi/main-frame-setup.js:3924:9

Taking myself off this bug for now until I can finish up more of the scroll bug. I do think the slice event restriction based on mode is worthwhile in general, but probably another fix needs to happen too.
Assignee: jrburke → nobody
Target Milestone: 1.4 S4 (28mar) → ---
Can we get a video of this?
Keywords: qawanted
There's a fundamental multiplicity problem.  header_cursor.js only ever returns a single instance but the search message_list is logically distinct from the nonsearch message_list that spawned it.  I'm currently doing some search slice cleanup and unit test creation for a review of psingapati's so while I'm in the code area I think it makes sense to just migrate header_cursor into GELAM's mailapi and give it proper back-end coverage that explicitly sanity checks this case.  Or at the very least I'll take this just as a mutex to avoid two people touching the same area of code here.  (We will also want integration tests too, which will follow shortly after since that's also outstanding on my plate.)

I would strongly suggest that we plan to uplift this and the related search fixes to v1.4 once landed.  Note that while there isn't particularly a risk of accidental data-loss, the results are generally going to be sufficiently wacky that this must be uplifted or next/previous backed out which is not particularly tenable at this point in time.
Assignee: nobody → bugmail
Status: NEW → ASSIGNED
Attached video Email.mpeg
(In reply to Jason Smith [:jsmith] from comment #5)
> Can we get a video of this?

Attached video of issue occurring.
Keywords: qawanted
blocking-b2g: --- → 1.4?
Blocks: 918303
blocking-b2g: 1.4? → 1.4+
Target Milestone: --- → 1.4 S5 (11apr)
This fix will logically depend on the fixes from bug 882917 which in turn is logically dependant on bug 838843; both will be required to have 1.4 uplift so marking both as deps.

(Prior to these fixes there was insufficient test coverage in the back-end and the functionality was sufficiently busted that human testing would have a high probability of running afoul of those problems.  Automated testing could avoid the issues, but would then be extremely limited in its coverage.)
Depends on: 882917, 838843
Hi, Andrew, the 2 dependencies are resolved. May we know your next plan on this bug? Thank you.
Flags: needinfo?(bugmail)
Candice, this bug has no update for almost 2 weeks. Can you help to follow up this issue? 
Also, the target milestone(4/11) is outdated. Can you help to update the new one? Thanks!
Flags: needinfo?(cserran)
Clearing the assignment to me temporarily since I'm nominally critical-pathing on the integration tests (bug 975588) which I was effectively making this depend on for testing reasons.  I'll check with :mcav or :jrburke about their imminent-ish availability for this given I also have some review burden today.  If they're not available now/next few days I'll re-take and perhaps juggle the integration test.

I think between discussions at our planning meeting on Monday with Candice and some follow-on discussions with doliver we're confident about dealing with this this sprint and we don't need to re-discuss, so clearing the NI.
Flags: needinfo?(cserran)
Flags: needinfo?(bugmail)
Target Milestone: 1.4 S5 (11apr) → 1.4 S6 (25apr)
Whiteboard: Burirun1.4-2 → Burirun1.4-2, Priority 2
Assignee: bugmail → nobody
xref from IRC discussion: the fix for bug 796474 has a fix for this built-in through its use of searchMode guards.  The best fix for this is now to extract those changes to avoid bit-rot/etc.
Landing https://bugzilla.mozilla.org/show_bug.cgi?id=796474 will fix this. Confirmed by asuth and jrburke.  If not be Wed, then we will extract the fix for this.
(Notionally assigning to :jrburke since he's prepared the patch that will fix this either way; as per comment 15, we'll either uplift all of bug 796474 if that's already desired, or just uplift the searchMode constraints if the checkerboarding fix is reduced in importance.)
Assignee: nobody → jrburke
Depends on: 796474
Whiteboard: Burirun1.4-2, Priority 2 → Burirun1.4-2, Priority 2, [ETA 4/25]
Target Milestone: 1.4 S6 (25apr) → 2.0 S1 (9may)
Marking this fixed now that bug 796474 landed on master. which is the last of the dependent bugs that fixed the underlying issues that caused this bug. For the 1.4 branch:

----

Fixed on v1.4 branch:
https://github.com/mozilla-b2g/gaia/commit/81e97c3ca58be0487292011bc59efa4cebab30be

from pull request:
https://github.com/mozilla-b2g/gaia/pull/18808

That pull request was a roll up commit of the following bugs, since bug 796474, a 1.4+ bug, depended on changes in the other bugs, and the other bugs also block another 1.4 bug, bug 989116.

Commits that were part of the roll up:

bug 838843: fc4a74a8400838e5fd18da6b7d8851a5a4380019
bug 882917: 0a8ccfdb26a33789bec754d769b0786570ceb28c
bug 796474: 67868019817334815ebb881ef8cd1b478989aa01
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
[Environment]
Gaia      c1a8cbaac1d921cfb50e3a2600720b75cf5afabd
Gecko     https://hg.mozilla.org/mozilla-central/rev/20ca234fd62b
BuildID   20140511160202
Version   32.0a1
ro.build.version.incremental=324
ro.build.date=Thu Dec 19 14:04:55 CST 2013

[Result]
PASS
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: