Closed Bug 1193503 Opened 4 years ago Closed 4 years ago

Share activities from dialer, music, video, and gallery list duplicate options after OTA update

Categories

(Core :: DOM: Device Interfaces, defect, P2)

ARM
Gonk (Firefox OS)
defect

Tracking

()

RESOLVED FIXED
mozilla45
blocking-b2g 2.5+
Tracking Status
firefox45 --- fixed
b2g-v2.2 --- unaffected
b2g-v2.5 --- fixed
b2g-master --- affected

People

(Reporter: NicholasN, Assigned: ferjm)

References

()

Details

(Whiteboard: [2.5-Daily-Testing][Spark])

Attachments

(6 files)

Attached file logcat_double.txt
Description:
If the user opens Dialer and types a phone number in the dial pad, they will have the option to save the number to contacts. If "Create new contact" is selected, the user is shown two options that say "Communications" with a check box underneath that says "Use from now on." Similarly, if a call in the call log is long tapped, and the user selects Send Message, they are shown two options which say Messages with a check box underneath. Video, Gallery, and Music also have two options for Messages when the share icon is tapped.


Repro Steps:
1) Update an Aries to 20150811152431
2) Open dialer, and type a phone number in the number pad.
3) Tap the add to contacts button.
4) Select Create New Contact.


Actual:
User is presented with duplicate options.


Expected:
Duplicated options are not present.


Notes:

Environmental Variables:
Device: Aries 2.5
Build ID: 20150811152431
Gaia: 9a8880a95ee4a4aea7895d4e2bcab31bc49ea281
Gecko: d82b5a78686a4f6630128fa7b999e0e343a9ef06
Gonk: 2916e2368074b5383c80bf5a0fba3fc83ba310bd
Version: 43.0a1 (2.5)
Firmware Version: D5803_23.1.A.1.28_NCB.ftf
User Agent: Mozilla/5.0 (Mobile; rv:43.0) Gecko/43.0 Firefox/43.0


Repro frequency: 5/5
See attached: video clip, logcat
This issue does not occur on earlier Aries builds or on Flame 2.5.

AriesKK (RC4)

Actual Result:

Share options are not duplicated.

Environmental Variables:
Device: Aries 2.5
BuildID: 20150619225606
Gaia: 4c06ed88ddccaba8dc941e5006bd2a9e57306f07
Gecko: 7c1a6b1151a1539186b950a144387e2d7f378d1b
Gonk: 2916e2368074b5383c80bf5a0fba3fc83ba310bd
Version: 41.0a1 (2.5) 
Firmware Version: D5803_23.1.A.1.28_NCB.ftf
User Agent: Mozilla/5.0 (Mobile; rv:41.0) Gecko/41.0 Firefox/41.0

Flame 2.5

Actual Result:

Share options are not duplicated.

Environmental Variables:
Device: Flame 2.5
BuildID: 20150811030209
Gaia: 9a8880a95ee4a4aea7895d4e2bcab31bc49ea281
Gecko: 8cba870a352c
Gonk: c4779d6da0f85894b1f78f0351b43f2949e8decd
Version: 43.0a1 (2.5) 
Firmware Version: v18D
User Agent: Mozilla/5.0 (Mobile; rv:43.0) Gecko/43.0 Firefox/43.0
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(pbylenga)
Keywords: regression
Whiteboard: [2.5-Daily-Testing][Spark]
[Blocking Requested - why for this release]:
visible regression

lots of landings lately for contacts app, requesting a window.
blocking-b2g: --- → 2.5?
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(pbylenga)
QA Contact: mshuman
Comms triage: This might be a bad interaction with WebIDE. Nicolas, are you able to repro it on a freshly flashed build?
Flags: needinfo?(nnelson)
I am able to reproduce it after flashing to the RC4 build (20150619225606) and updating over the air on the dogfood-latest channel. If I reset the phone in Settings > Device information, the issue stops happening. Hopefully that is info is useful, if you need me to flash directly to a latest build instead of OTA I can download one manually and try again.
Flags: needinfo?(nnelson)
This issue does not occur with a direct flash of the build. This issue will only reproduce after performing an OTA, and will no longer reproduce after the device has performed a system reset.  Furthermore, this issue will only reproduce when the OTA occurs from a build that is sufficiently old, and will not reproduce when updating from more recent builds.

I was able to reproduce this issue on Flame 2.5 devices, using the nightlytest update channel, and found the latest build that will cause the issue to reproduce, and the first build where the issue no longer occurs.

I suspect this bug is an issue with the way that the system update behaves when the core apps of the phone have been updated in the new build, and that both the old and new version of the app are still visible when attempting a share activity.  As such, I’m not sure this is actually a regression, but merely a bug in the update process that is only reproducible when a core app is updated in a specific way.  Due to the size of the pushlog, I am not sure which code change might be responsible for changing this behavior.

Fixed Window:

Last Broken:
Environmental Variables:
Device: Flame 2.5
BuildID: 20150707102619
Gaia: 86af137c7f4c41c1185e609339002ab47fd6c640
Gecko: ffa83d153080
Gonk: 040bb1e9ac8a5b6dd756fdd696aa37a8868b5c67
Version: 42.0a1 (2.5)
Firmware Version: v18D
User Agent: Mozilla/5.0 (Mobile; rv:42.0) Gecko/42.0 Firefox/42.0

First Working:
Environmental Variables:
Device: Flame 2.5
BuildID: 20150707113821
Gaia: 86af137c7f4c41c1185e609339002ab47fd6c640
Gecko: 9340658848d1
Gonk: 040bb1e9ac8a5b6dd756fdd696aa37a8868b5c67
Version: 42.0a1 (2.5)
Firmware Version: v18D
User Agent: Mozilla/5.0 (Mobile; rv:42.0) Gecko/42.0 Firefox/42.0

Last Broken Gaia / First Working Gecko - Issue does NOT reproduce
Gaia: 86af137c7f4c41c1185e609339002ab47fd6c640
Gecko: 9340658848d1

First Working Gaia / Last Broken Gecko - Issue DOES reproduce
Gaia: 86af137c7f4c41c1185e609339002ab47fd6c640
Gecko: ffa83d153080

Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=ffa83d153080&tochange=9340658848d1
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
No-jun, can you take a look at this please or assign it to the correct person who can decipher the pushlog and see what is going on here?
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker) → needinfo?(npark)
Comms triage: This regression can confuse dogfooders. Let's move the issue in General until we find which Gecko patch caused the problem.
blocking-b2g: 2.5? → 2.5+
Component: Gaia::Contacts → General
After taking a closer look to the regression window, I'm suspecting a side effect bug 1176712. Fernando, what would happen if you migrate the DB of ActivitiesService from version 1 to version 2?
Flags: needinfo?(ferjmoreno)
clearning ni? per Comment 8.  This looks like a comms bug, and I'm not an expert on this area.
Flags: needinfo?(npark)
Duplicate of this bug: 1183383
I can't repro on today's build. Closing.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
(In reply to Johan Lorenzo [:jlorenzo] (QA) from comment #8)
> After taking a closer look to the regression window, I'm suspecting a side
> effect bug 1176712. Fernando, what would happen if you migrate the DB of
> ActivitiesService from version 1 to version 2?

We are deleting the activities store before moving to version 2 so I can't see how the entries can be duplicated. Unless we are caching this information somewhere else...

(In reply to [:fabrice] Fabrice Desré from comment #11)
> I can't repro on today's build. Closing.

Thank you Fabrice. It seems that this is only reproduced after an OTA update. Did you try that or only flashing the latest build?
Flags: needinfo?(ferjmoreno)
Flags: needinfo?(fabrice)
(In reply to Fernando Jiménez Moreno [:ferjm] from comment #12)

> Thank you Fabrice. It seems that this is only reproduced after an OTA
> update. Did you try that or only flashing the latest build?

Only flashing the latest build. feel free to reopen!
Flags: needinfo?(fabrice)
Based on comment 5, this is a data migration issue. To reproduce it, we have to OTA from RC4. Reopening.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Johan, could you or anyone from your team try to reproduce this, please? Thanks!
Keywords: qawanted
I was able to reproduce this issue when running an OTA from RC4 to the latest build on the dogfood-latest channel.
Two copies of the Messages app are visible and selectable when accessing a share activity from Dialer, Gallery, Music, and Video apps.

Environmental Variables:
Device: Aries 2.5
BuildID: 20150826195025
Gaia: c1ae9f02f2a9cfb89bf67aeea97e467c41c3362c
Gecko: fea87cbeaa6b64510dff835549ed906fe405d558
Gonk: 2916e2368074b5383c80bf5a0fba3fc83ba310bd
Version: 43.0a1 (2.5) 
Firmware Version: D5803_23.1.A.1.28_NCB.ftf
User Agent: Mozilla/5.0 (Mobile; rv:43.0) Gecko/43.0 Firefox/43.0
Flags: needinfo?(jmercado)
Keywords: qawanted
Flags: needinfo?(jmercado)
Assignee: nobody → ferjmoreno
Component: General → DOM: Device Interfaces
Product: Firefox OS → Core
Summary: [Contacts] Share activities from dialer, music, video, and gallery list duplicate options. → Share activities from dialer, music, video, and gallery list duplicate options.
Summary: Share activities from dialer, music, video, and gallery list duplicate options. → Share activities from dialer, music, video, and gallery list duplicate options after OTA update
Duplicate of this bug: 1205452
Francisco, 

Can you please set a priority for this one?

Thanks
Flags: needinfo?(francisco)
Attached file logcat.txt
I am afraid that I am not able to reproduce this issue. I've created an OTA from 2.2 to master and everything is ok with activities. You can see in the logcat that the activities DB is successfully upgraded to version 2 and no activity is duplicated in the registry.

Any idea how to reproduce this locally? What is RC4? Is there any way to modify these OTAs where you can reproduce this issue with Activities and Webapps debugging enabled?
Flags: needinfo?(mshuman)
Setting qawanted to check the request from comment 19
Flags: needinfo?(mshuman)
Keywords: qawanted
The RC4 build is the build that was initially flashed to the Aries devices given out to dogfooders, and is what they will be updating from within the ‘dogfood’ OTA channel.

RC4:
Environmental Variables:
Device: Aries 2.5
BuildID: 20150619225606
Gaia: 4c06ed88ddccaba8dc941e5006bd2a9e57306f07
Gecko: 7c1a6b1151a1539186b950a144387e2d7f378d1b
Gonk: 2916e2368074b5383c80bf5a0fba3fc83ba310bd
Version: 41.0a1 (2.5)
Firmware Version: D5803_23.1.A.1.28_NCB.ftf
User Agent: Mozilla/5.0 (Mobile; rv:41.0) Gecko/41.0 Firefox/41.0

As for local reproduction, so long as the user is on the 20150707102619 build or older, they will encounter this issue after running the OTA.  Updating from a new build will not reproduce the issue.

I just ran the update from 20150619225606 (RC4) > 20150928133112, and am still reproducing this issue.

I suspect that the code change that causes this has been uplifted to the 2.2 branch, and when you updated from 2.2 to Master, the source 2.2 build might not have been old enough to trigger the issue.

As far as Activities and Webapps debugging, I don’t believe that’s something we know how to do for an OTA. Naoki, do you know how we might go about doing this?
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage?]
Flags: needinfo?(nhirata.bugzilla)
Flags: needinfo?(jmercado)
Flags: needinfo?(ferjmoreno)
Keywords: qawanted
Thank you Martin.

I tested this on a Flame. Is there any way you could verify that this is also happening on a Flame for you, please?

FWIW bug 1176712 wasn't uplifted to 2.2.
Flags: needinfo?(ferjmoreno) → needinfo?(mshuman)
I *believe* I have seen this on Flame 2.5 in the past, but I can't confirm this, as I am unable to run an OTA from an older build, because newer builds are too large to properly uncompress during the OTA process (this has since been resolved in bug 1181372). This also prevented me from updating 2.2 > 2.5.

I was able to confirm that this does NOT occur on Flame 2.2 when running OTA 2.2 > 2.2 from 20150701002506 > 20150928032502
Flags: needinfo?(mshuman) → needinfo?(ferjmoreno)
RC4 is the base dogfood build.
From there people have been OTAing to the latest version.  OTA is a gecko/gaia upgrade only.

I don't think this is a gonk layer (or lower ) issue; I think there's been a data/data format change that wasn't accounted for/nor translated and or corruption in the data that got introduced somewhere.  We already seen this in Bug 1202916.

We should try to figure out the root cause of the corruption/data change in this bug and Bug 1202916.
Basically it means we need 100 % reproducible steps and to find a regression range on an existing profile.
ie. create a profile on RC4, save the profile, reflash full and restore the profile and test or flash RC4, create the profile, OTA to a veriosn.... which ever is an easier path.  I vote to see if we can see the issue using the former approach.
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(jmercado)
(In reply to Martin Shuman [:Marty] from comment #23)
> I *believe* I have seen this on Flame 2.5 in the past, but I can't confirm
> this, as I am unable to run an OTA from an older build, because newer builds
> are too large to properly uncompress during the OTA process (this has since
> been resolved in bug 1181372). This also prevented me from updating 2.2 >
> 2.5.
> 
> I was able to confirm that this does NOT occur on Flame 2.2 when running OTA
> 2.2 > 2.2 from 20150701002506 > 20150928032502

Thanks Martin. FWIW I was able to do an OTA from 2.2 to 2.5 on a Flame without hitting bug 1181372 using the latest flame base image.

I've been doing the OTAs from eng builds to eng builds. I guess you are testing user builds.

I'll try to do an OTA with user builds on an Aries device.
Flags: needinfo?(ferjmoreno)
Flags: needinfo?(francisco)
Priority: -- → P2
\o/ I was able to reproduce it on Aries. Investigating the cause now.
So it seems that the difference is that on the Flame (where I can't repro this issue) we are reporting isFirstRun false and in the Aries true [1]

[1] https://mxr.mozilla.org/mozilla-central/source/dom/apps/AppsUtils.jsm#620
That's odd.  Why would it report isFirstRun as true?  
Sam, FYI.  This might be related to the issue you are seeing in why you can't set the pref version.
Flags: needinfo?(nhirata.bugzilla) → needinfo?(sfoster)
(In reply to Naoki Hirata :nhirata (please use needinfo instead of cc) from comment #28)
> That's odd.  Why would it report isFirstRun as true?  
> Sam, FYI.  This might be related to the issue you are seeing in why you
> can't set the pref version.

I'm not sure if its related. The FTU/FtuLauncher just looks at mozSettings values that should have been set earlier by b2g's UpdatePrompt: https://dxr.mozilla.org/mozilla-central/source/b2g/components/UpdatePrompt.js#560. Previously, you could shortcut the OTA process for testing system/FTU app's update handling by just providing the deviceinfo.previous_os value manually and restarting. I need to double-check that is still true before I can know there's a real regression.
Flags: needinfo?(sfoster)
QAnalysts, Can you check if this is happening after recent OTA. Its a P2 for 2.5

Thanks
Flags: needinfo?(ktucker)
Keywords: qawanted
Attached image screenshot of issue
This issue is still occurring OTA from RC4. See attached screenshot for bug behavior.

Bug occurs on following build after OTA
Device: Aries 2.5
BuildID: 20151019104907
Gaia: f75bd584aca0a751a5bed115800250faa8412927
Gecko: d3e87bb40753327550143ba8ac8ee27b300cd4a9
Gonk: 2916e2368074b5383c80bf5a0fba3fc83ba310bd
Version: 44.0a1 (2.5) 
Firmware Version: D5803_23.1.A.1.28_NCB.ftf
User Agent: Mozilla/5.0 (Mobile; rv:44.0) Gecko/44.0 Firefox/44.0
Flags: needinfo?(ktucker)
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage?]
Flags: needinfo?(jmercado)
Keywords: qawanted
Mahendra this issue is still occurring.
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(jmercado) → needinfo?(mpotharaju)
Thanks Jayme, Pi Wei. 

Fernando - Have you had a chance to look at this issue? Can you please provide an update here when you get a chance? Thanks!
Flags: needinfo?(mpotharaju) → needinfo?(ferjmoreno)
I'll try to get to this one on Tuesday or Wednesday next week.
Status: REOPENED → NEW
Flags: needinfo?(ferjmoreno)
Attached patch v1Splinter Review
The issue was that the first run process after an OTA is already clearing the activities registry [1] and registering all the activities again [2]. So it's doing the same job as we were doing on the DB upgrade path to version 2, which is not needed at all. [3] already takes care of adding the activities with the version 2 schema that we needed for Bug 1176712.

Unfortunately, we cannot downgrade the DB to version 1 since there are already foxfooders with version 2. So I just remove the version 2 upgrade handler.

[1] https://mxr.mozilla.org/mozilla-central/source/dom/apps/Webapps.jsm#1112
[2] https://mxr.mozilla.org/mozilla-central/source/dom/apps/Webapps.jsm#1132
[3] https://mxr.mozilla.org/mozilla-central/source/dom/apps/Webapps.jsm#1031
Attachment #8680223 - Flags: review?(fabrice)
Now we need to check why we are not doing the first run properly on the Flame as mentioned in comment 27. But that can be done in a follow up.
Attachment #8680223 - Flags: review?(fabrice) → review+
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/0a3bded542b6d10179022d31761e373368b68a72
Bug 1193503 - Share activities from dialer, music, video, and gallery list duplicate options after OTA update. r=fabrice
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/0a3bded542b6
Status: NEW → RESOLVED
Closed: 4 years ago4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Duplicate of this bug: 1223323
You need to log in before you can comment on or make changes to this bug.