[Collection app] Preinstalled SCs are ignored by app population and SC list

VERIFIED FIXED in Firefox OS v2.0

Status

Firefox OS
Gaia::Everything.me
VERIFIED FIXED
4 years ago
3 years ago

People

(Reporter: ranbena, Assigned: kgrandon)

Tracking

unspecified
2.0 S5 (4july)
x86
Mac OS X

Firefox Tracking Flags

(blocking-b2g:2.0+, b2g-v2.0 verified, b2g-v2.1 verified)

Details

(Whiteboard: [systemsfe])

Attachments

(2 attachments)

Two cases which might be of the same cause:
1. Preinstalled SCs aren't deduped from "Add SCs" list
2. Preinstalled SCs do not get auto populated with related apps. For instance, Preinstalled Social SC, doesn't get added with Facebook app once installed.
(Reporter)

Updated

4 years ago
Blocks: 1016203
(Reporter)

Updated

4 years ago
Blocks: 989848
No longer blocks: 1016203
Also, it's icon never gets updated when changes occur in it's content.
Parity issue with the old homescreen.
blocking-b2g: --- → 2.0?
QA Whiteboard: [VH-FL-blocking-][VH-FC-blocking+]
Whiteboard: [systemsfe]

Updated

4 years ago
Blocks: 1015336
No longer blocks: 989848

Updated

4 years ago
Duplicate of this bug: 1029009

Updated

4 years ago
blocking-b2g: 2.0? → 2.0+
(Assignee)

Comment 4

4 years ago
I'll take this.
Assignee: nobody → kgrandon
Status: NEW → ASSIGNED
Target Milestone: --- → 2.0 S5 (4july)
(Assignee)

Comment 5

4 years ago
Created attachment 8444783 [details] [review]
Github pull request

Hey - could one of you guys review this? Thanks!
Attachment #8444783 - Flags: review?(ran)
Attachment #8444783 - Flags: review?(crdlc)
(Assignee)

Comment 6

4 years ago
The above pull request fixes the fact that we were storing the pre installed collection IDs as strings instead of integers. This was causing an installed.indexOf() check to fail. Changing these in the manifest is likely the best option.

It probably solves a bunch of issues, but I'm not sure if it solves the native auto-population. I'll look into that as a follow-up, or in another bug if it's complex.
(Assignee)

Comment 7

4 years ago
Turns out the nativeInfo wasn't being populated due to cName not being there. Adding this at build seems like the easiest fix, and it works.
Comment on attachment 8444783 [details] [review]
Github pull request

Before landing it I would like you take a look to migration process because the cName is new for 2.0

https://github.com/mozilla-b2g/gaia/blob/master/apps/homescreen/js/migrator.js#L61

https://github.com/mozilla-b2g/gaia/blob/master/apps/homescreen/js/grid_components.js#L147

Maybe you need to add something like

descriptor.cName = descriptor.categoryId = data.experienceId || descriptor.categoryId;
Attachment #8444783 - Flags: review?(crdlc)
Flags: needinfo?(ran)
Cristian, shouldn't it be:
descriptor.cName = descriptor.name

How can I go about testing migration from any version to 2.0?
Flags: needinfo?(ran) → needinfo?(crdlc)
Please Carmen explain to Ran how you did it if he needs it but basically via OTA from 1.3 or 1.4 to 2.0. Although honestly this could be very difficult to create an OTA bla bla. My recommendation would be that you read the structure that you will receive in the datastore after migrating bug 1019534 and add the cName or what you need to the descriptor

https://github.com/mozilla-b2g/gaia/blob/master/apps/homescreen/js/migrator.js#L61

https://github.com/mozilla-b2g/gaia/blob/master/apps/homescreen/js/grid_components.js#L147

(In reply to Ran Ben Aharon (Everything.me) from comment #9)
> Cristian, shouldn't it be:
> descriptor.cName = descriptor.name
> 
> How can I go about testing migration from any version to 2.0?
Flags: needinfo?(ran)
Flags: needinfo?(crdlc)
Flags: needinfo?(cjc)
Gotcha. So Kevin, plz edit this line
https://github.com/mozilla-b2g/gaia/blob/master/apps/homescreen/js/grid_components.js#L145
to
descriptor.name = descriptor.cName = data.name;
Flags: needinfo?(ran) → needinfo?(kgrandon)
You can simulate an update from 1.3/1.4 to 2.0/master with the following steps:

- Install a complete build of 1.X (gaia & gecko)
- Pass the FTE and add whatever you need
- make a build of gecko in master (just run build.sh)
- When it has finished flash only gecko, and ensure that it doesn't start (flash.sh gecko && adb shell stop b2g)
- In your clone of gaia, edit isUpgrade function in version_helper.js file in <gaiaDir>/shared/js
  (https://github.com/mozilla-b2g/gaia/blob/master/shared/js/version_helper.js#L32) 
  and change "return isUpgrade" for "return true".  It's a little ugly, I  know, but it's the more easy method to simulate an upgrade. The correct method would be to make and OTA but...
- Now, you need to tell to the phone that it's first run, we can do this deleting gecko.buildID pref. I suggest you to use the Antonio's script (https://github.com/AntonioMA/gaiatools/blob/master/resetApps.sh).
  summing up:
  To put gaia execute: resetApp.sh && make install-gaia install-default-data

(In reply to Cristian Rodriguez (:crdlc) from comment #10)
> Please Carmen explain to Ran how you did it if he needs it but basically via
> OTA from 1.3 or 1.4 to 2.0. Although honestly this could be very difficult
> to create an OTA bla bla. My recommendation would be that you read the
> structure that you will receive in the datastore after migrating bug 1019534
> and add the cName or what you need to the descriptor
> 
> https://github.com/mozilla-b2g/gaia/blob/master/apps/homescreen/js/migrator.
> js#L61
> 
> https://github.com/mozilla-b2g/gaia/blob/master/apps/homescreen/js/
> grid_components.js#L147
> 
> (In reply to Ran Ben Aharon (Everything.me) from comment #9)
> > Cristian, shouldn't it be:
> > descriptor.cName = descriptor.name
> > 
> > How can I go about testing migration from any version to 2.0?
Flags: needinfo?(cjc)
(Assignee)

Comment 13

4 years ago
Thanks guys. I updated the homescreen migration descriptor path, and will look at performing an OTA update today to make sure everything works.
Flags: needinfo?(kgrandon)
Oh wow. What a relief that I don't have to get into that! :D
(Assignee)

Comment 15

4 years ago
Comment on attachment 8444783 [details] [review]
Github pull request

Ok - so long story short I'm having trouble faking the OTA upgrades as mentioned in this thread. The tips Carmen provided were very useful, but I think for now I'd like to get this in and test a real OTA update to 2.0 which is fairly straightforward.

In the meantime I'm investigating what we can do from marionette JS to simulate an upgrade.
Attachment #8444783 - Flags: review?(crdlc)
Comment on attachment 8444783 [details] [review]
Github pull request

LGTM, many thanks
Attachment #8444783 - Flags: review?(crdlc) → review+
(Reporter)

Updated

4 years ago
Attachment #8444783 - Flags: review?(ran) → review+
(Assignee)

Comment 17

4 years ago
Landed: https://github.com/mozilla-b2g/gaia/commit/bd5888a2c883712d07a058e4600bfa04b8b19af4
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
status-b2g-v2.0: --- → affected
status-b2g-v2.1: --- → fixed

Comment 19

3 years ago
Created attachment 8531490 [details]
VIDEO0110_Compress.MP4

This issue has been successfully verified on Flame 2.0:
Gaia-Rev        8d1e868864c8a8f1e037685f0656d1da70d08c06
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g32_v2_0/rev/c756bd8bf3c3
Build-ID        20141202000201
Version         32.0
Device-Name     flame
FW-Release      4.4.2

This issue has been successfully verified on Flame 2.1:
Gaia-Rev        ccb49abe412c978a4045f0c75abff534372716c4
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/18fb67530b22
Build-ID        20141202001201
Version         34.0
Device-Name     flame
FW-Release      4.4.2

Updated

3 years ago
Status: RESOLVED → VERIFIED
status-b2g-v2.0: fixed → verified
status-b2g-v2.1: fixed → verified
You need to log in before you can comment on or make changes to this bug.