Closed Bug 988726 Opened 10 years ago Closed 10 years ago

sms message thread is all wrong - wrong messages, wrong contacts, wrong header

Categories

(Firefox OS Graveyard :: Gaia::SMS, defect)

x86
macOS
defect
Not set
normal

Tracking

(tracking-b2g:backlog)

RESOLVED WORKSFORME
tracking-b2g backlog

People

(Reporter: dietrich, Unassigned)

References

Details

(Keywords: regression)

Attachments

(2 files)

Master (1.5), Nexus 4, build from 3/24.

Screenshot attached.

STR:

1. see notification of sms, open it

Expected: Thread has correct contact in header, correct messages in content

Actual: In the screenshot, the header is contact A, the message is from contact B, and just outside the screenshot I scrolled up and saw a message from a different thread with contact C.
Hm, there's the screenshot, but not very useful with the personal information blocked out. Not that it'd be much useful not blocked out.

Julien & Steve, let me know if you want a copy of the db again.
Same question: is it reproducible all the time or just once? Is all the notification you opened will lead you to the wrong thread or just it just happen on certain contact?
Dietrich, also, next time, would be useful if you could check the logcat for any error :)

I think I saw something like this once, but happens very rarely. Not sure at all what the reason could be, and pretty sure bug 881469 would help with edge cases like this (if this happens rarely of course).
I'm also seeing that a lot with a build from a week or two.
Anthony, if you can find a reliable STR, would be nice :)
Flags: needinfo?(anthony)
The closest I can find for STRs is this:

With buggy phone, phone A and phone B:
1) Be sure that you have existing threads on buggy phone with phone A and phone B
2) On buggy phone, open thread with phone A
3) On buggy phone, go to homescreen
4) Lock buggy phone
5) On phone B, send a text to buggy phone
6) On buggy phone, tap the notification

This is not 100% reproducible. Maybe it works better with a reference workload.

This also looks similar to bug 952524.
Flags: needinfo?(anthony)
One think that comes to my mind is the facebook datastore handling.

A good way to know whether there is a facebook datastore is to debug into the sms app and run this in the console:

navigator.getDataStores('Gaia_Facebook_Friends').then(function success(ds) {console.log('datastores:', ds); if (ds.length) { return ds[0].getLength(); } else { return Promise.reject('no datastore') }}).then(function(number) {console.log('nb friends:', number)}).catch(function error(err) {console.error('error', err); });

My output is:

"datastores:" Array [ DataStore ]
"nb friends:" 0
Flags: needinfo?(anthony)
So I do have 1 datastore. And it only contains an object:
|{ operation: "clear" }|
Flags: needinfo?(anthony)
Dietrich: Have you synced Facebook contacts? If no, could you run the instruction in comment 8 to see if that's a pattern?
Flags: needinfo?(dietrich)
I have not synced Facebook contacts.
Flags: needinfo?(dietrich)
So can you run the instruction in comment 8? :)
Flags: needinfo?(dietrich)
Sorry, I missed that!

Output is:

"datastores:" Array [ DataStore ]
"nb friends:" 1

Does that mean I did FB sync at some point?
Flags: needinfo?(dietrich)
Yes, I think so, otherwise you'd have 0 like me.

So we may have a pattern here :)

NI me to try again after syncing some facebook friends.
Flags: needinfo?(felash)
Flags: needinfo?(felash)
Attachment #8404868 - Attachment filename: file_988726.txt → iterate-facebook.js
Attachment #8404868 - Attachment mime type: text/plain → text/javascript
Dietrich, can you please run the attached js file in the scratchpad, and copy paste the output you get in the console?

I think the object you have will be:

  "data >" Object { byTel: Object, treeTel: Array[0] }

Thanks :)
Flags: needinfo?(dietrich)
My output:
"task >" Object { operation: "clear" } Scratchpad/1:11
"task >" Object { operation: "add", id: 1, data: Object } Scratchpad/1:11
"data >" Object { byUid: Object, byTel: Object, treeTel: Object } Scratchpad/1:13
"task >" Object { revisionId: "{1429d1d2-58da-4c79-ab6f-7083dc49b46d}", operation: "done" }
"datastores:" Array [ DataStore ]
"nb friends:" 1
"task >" Object { operation: "clear" }
"task >" Object { operation: "add", id: 1, data: Object }
"data >" Object { byTel: Object, treeTel: Array[0] }
"task >" Object { revisionId: "{049187ef-9c5c-413e-bd0f-a0f74d82e88b}", operation: "done" }
"end of iteration"
"the end !"
Flags: needinfo?(dietrich)
See Also: → 997949
Just filed bug 997949 for the notification issue that's happening when this bug happens. Rik, Dietrich, can you confirm that the notification was not disappearing for you when this bug happens? Either clicking or entering a thread?

I guess bug 997949 and this bug have the same root cause but it's difficult to find, especially that I don't reproduce on my phone.
Saw this on Natalia's v1.4 Buri, so requesting 1.4 blocker. When this happens, clicking a notification put the Messages app in a inconsistent state.
blocking-b2g: --- → 1.4?
QA Wanted to see if we can reproduce on a Buri on 1.4.
Keywords: qawanted
Jason, I _saw_ it on Natalia's buri on v1.4. Like bug 997949 I think this happens when we actually use the phone and keeping awake for some days, so I guess we won't be able to reproduce easily using steps.
(In reply to Julien Wajsberg [:julienw] from comment #22)
> Jason, I _saw_ it on Natalia's buri on v1.4. Like bug 997949 I think this
> happens when we actually use the phone and keeping awake for some days, so I
> guess we won't be able to reproduce easily using steps.

That's not good enough. You need to actually have reproducible STR to make this actionable.
What I mean is that we should block on it so that we can spend more time on it to make it actionable, because it's a serious bug.
Julien,

Please help understand user impact of the bug. This reads like an inconsistent, timing issue. Want to be sure of the impact before any decisions are made.
Flags: needinfo?(felash)
(In reply to Jason Smith [:jsmith] from comment #21)
> QA Wanted to see if we can reproduce on a Buri on 1.4.

Following repro steps at comment 7, issue is NOT reproducible with today's 1.4.
Tapping on an SMS notification correctly takes user to the corresponding message thread. Repro rate: 0 out of 5 attempts.

Device: Buri 1.4 MOZ
BuildID: 20140421000201
Gaia: 3c53bebcc7541e5d19c96cf38ee2603927478f3c
Gecko: 97dfbd4530a0
Version: 30.0a2
Firmware Version: v1.2-device.cfg
Keywords: qawanted
(In reply to Preeti Raghunath(:Preeti) from comment #25)
> Julien,
> 
> Please help understand user impact of the bug. This reads like an
> inconsistent, timing issue. Want to be sure of the impact before any
> decisions are made.

From my understanding, when it happens, it will always happen for the same notification again. I don't know if this likely happens after this though, as it didn't happen to me. It happened at least to 3 people though: Dietrich, Natalia, Rik, which is IMO enough to have a blocking decision. 3 people among the few that dogfood and report bug is a lot.
Flags: needinfo?(felash)
Impact of this bug for me:
I received a SMS from person A. It was short enough that I could read all of it in the notification. When I taped it, I started typing directly my answer. I tapped send and actually sent a message to the wrong person because of this bug.
Julien

DO we have enough info for fixing it given the info. Impact from rik sounds bad, so will be blocking if you have info to fix
Flags: needinfo?(felash)
Why should we have info to fix to mark as blocker? I don't see anything related to "info to fix" on https://wiki.mozilla.org/B2G/Triage. We have three dogfooders, this is a regression in one of the core apps. We should block.

If it's the last blocker and we have no clear STRs, then we will remove the blocker flag and just put something in the release notes.
Exactly the same advice than Rik.
Flags: needinfo?(felash)
1.4+ for user impact.
blocking-b2g: 1.4? → 1.4+
Hi David,
As this is set blocking, should we find someone else to handle while Julien is away?
Flags: needinfo?(dscravaglieri)
I was requesting blocking but now we don't see this anymore on Natalia's phone or on Rik's phone. So maybe it's been fixed by another patch.

Natalia, can you confirm that you don't see this issue on your current 1.4 build?
Flags: needinfo?(nwinter)
Backlog based on comment #34. Please re-nom if issue is seen again.
blocking-b2g: 1.4+ → backlog
Also asking Vivien who told me he saw that often on his phone. If he doesn't see it anymore, that's one more sign.
Flags: needinfo?(21)
I don't see the issue in my current 1.4 build :
build id : 20140428000206
git commit info : 2014-04-26 20:43:18
d23e479e
Flags: needinfo?(nwinter)
Please reopen if you see ths bug happening again.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
I will reopen the bug if I see it at some point.
Flags: needinfo?(21)
clear n? per Vivien's comment
Flags: needinfo?(dscravaglieri)
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: