If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

[email/UI][FFOS7715 v2.1] vscroll/header_cursor/message_list bug resulting in snippets/updates ending up on wrong messages

NEW
Unassigned

Status

Firefox OS
Gaia::E-Mail
3 years ago
3 years ago

People

(Reporter: ffos_st, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: sprd391914)

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
Description:
Inbox screen, there is no theme mail refresh display theme

Device:
SPRD 7715ea

Build Identifier:
20150116105540

Steps to Reproduce:
1)Login sina 163 mailboxes or mailbox, log on to the test machine account sent a message that contains themes
2) refresh the inbox

Actual Result: 
After receiving a new message, refresh the inbox, Show themed message before after the refresh themed shows no theme normal display

Expected Result:
shows the theme normal display

Repro frequency:
1/10,10%
(Reporter)

Updated

3 years ago
Summary: Inbox screen, there is no theme mail refresh display theme → [Email][FFOS7715 v2.1]Inbox screen, there is no theme mail refresh display theme
Whiteboard: sprd391914
(Reporter)

Comment 1

3 years ago
If you do not have to refresh the theme on the web page will be no theme. It is doubtful whether there is a problem of data transmission server, because the client get into the theme is empty
Can you provide a logcat (https://wiki.mozilla.org/Gaia/Email/RequiredBugInfo) for the case that reproduces?  And ideally a screenshot of when the problem happens and a screenshot of when the problem doesn't happen?

Based on the mention of "themes", I would expect this to be an HTML sanitizer issue where it's removing styling, but that would happen 100% of the time, so I think I'm not understanding the problem and need more information.  Thanks!
Flags: needinfo?(ffos_st)
(Reporter)

Comment 3

3 years ago
Created attachment 8551063 [details]
问题截图1.png

Please see the attached picture, the left is the former refresh right after the refresh. After refreshing the display no subject
Flags: needinfo?(ffos_st)
So this looks like something I saw happen once when reproducing another account.  One other thing I noticed was that the UIDs being issued by the coremail server were fairly large; like at least in the millions.  It's conceivable some type of comparison operation or string manipulation is having trouble with this, although they really shouldn't...

More investigation needed... needinfo-ing me.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(bugmail)
Summary: [Email][FFOS7715 v2.1]Inbox screen, there is no theme mail refresh display theme → [Email][FFOS7715 v2.1] On CoreMail accounts (163.com), seeing inconsistent envelope updates to subject and/or snippets, possibly due to very large UIDs
(Reporter)

Comment 5

3 years ago
I do not understand what you're saying, I suspect that the transmission of the data server in question, did not display the subject later lead to refresh
I was just thinking out loud; this mainly just needs more investigation with the IMAP connection logged.  Since bug 1116694 is being treated as a blocker and is also a coremail/163.com bug, this investigation will happen as part of fixing that bug.
With this patch applied to aid in debugging:
=== patch ===
diff --git a/apps/email/js/cards/message_list.js b/apps/email/js/cards/message_list.js
index d7cbbe2..5b5837f 100644
--- a/apps/email/js/cards/message_list.js
+++ b/apps/email/js/cards/message_list.js
@@ -227,6 +227,7 @@ return [
       // display in the DOM.
       if (this.mode === 'nonsearch') {
         this.vScroll.bindData = (function bindNonSearch(model, node) {
+console.warn('binding msg', model.id, 'to node', node.dataset.index);
           model.element = node;
           node.message = model;
           this.updateMessageDom(true, model);
@@ -1284,6 +1285,7 @@ return [
     },
 
     onMessagesChange: function(message, index) {
+console.log('change:', message.id, 'node index', message.element.dataset.index, 'alleged index', index);
       this.updateMessageDom(false, message);
 
       // Since the DOM change, cache may need to change.
======

And creating a fresh account, I witness this bug happen and produce the following interesting log excerpts.  In this case I'm using a 163.com IMAP account with only 3 messages in the folder, but I seriously doubt this is 163.com specific.  

=== excerpts ===
WLOG: Sync Completed! null days 3 messages synced
WLOG: folder message count 3 dbCount 3 syncedThrough 631123200000 oldest known 1421732433000
WAR: binding msg 4/0/2 to node 0
WAR: binding msg 4/0/1 to node 1
WAR: binding msg 4/0/0 to node 2
WAR: binding msg 4/0/0 to node 0
WAR: binding msg 4/0/1 to node 0
WAR: binding msg 4/0/2 to node 0
WLOG: [slog] mailslice:mutex-released {"folderId":"4/0"}
LOG: message_list complete: 3 items of 3 alleged known headers. canGrow: false
LOG: htmlCache.save: 14447 in 8 segments, lang dir: ltr
WLOG: queueOp 4 downloadBodies pre-queues: local: 0 server: 0
WLOG: runOp(do: {"type":"downloadBodies"
LOG: change: 4/0/0 node index 0 alleged index 2
LOG: change: 4/0/1 node index 0 alleged index 1
LOG: change: 4/0/2 node index 0 alleged index 0
WLOG: runOp_end(do: {"type":"downloadBodies"

======

It seems pretty clear that one of the callers of bindData has gone crazy.  Handing off to :jrburke for now.
Flags: needinfo?(bugmail) → needinfo?(jrburke)
Summary: [Email][FFOS7715 v2.1] On CoreMail accounts (163.com), seeing inconsistent envelope updates to subject and/or snippets, possibly due to very large UIDs → [email/UI][FFOS7715 v2.1] vscroll/header_cursor/message_list bug resulting in snippets/updates ending up on wrong messages

Updated

3 years ago
Blocks: 1123554
I am having a hard time reproducing this. I did see something briefly last week, where a snippet for one message went to the snippet area of an incorrect item, but I did not have enough logging in place to trace how I did that, then could not get it to happen again.

This week, when updating to both latest v2.1 and master, I cannot seem to reproduce the original bug or excessive updateDataBind calls.

I tried with a 163.com account as well as an activesync account, which both had three messages in the folder I was viewing.

With expanded logging, I see the onMessagesChange type of console message twice for each message, but it makes sense: one comes from the initial setData which calls renderCurrentPosition. The other comes from updateDataBind as part of messages_splice in message_list. This does not seem unusual: we do the setData one in case no other slice events come in, and the slice splice one happens when getting info/updates from the backend.

The weirdness I saw last week was using a 163.com account, perhaps some of the recent backend changes that landed to fix some things with coremail servers had an effect?

I am at a loss though to figure it out further. If someone has a specific steps to try to trigger it, or an account that seems to trigger it, I am willing to look further. Otherwise, I suggest trying to retest with latest code to see if it still reproduces.
Flags: needinfo?(jrburke)
You need to log in before you can comment on or make changes to this bug.