Closed Bug 944495 Opened 11 years ago Closed 11 years ago

[Single Variant] Race condition when installing single variant apps

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:koi+, b2g-v1.2 fixed)

VERIFIED FIXED
blocking-b2g koi+
Tracking Status
b2g-v1.2 --- fixed

People

(Reporter: macajc, Assigned: macajc)

References

Details

(Whiteboard: [systemsfe])

Attachments

(1 file)

STR: 

1. Install a v1.2 build on device
2. Clone the tests repository for sigle variant: https://github.com/telefonicaid/firefoxos-gaia-testsbuild.git
3. Configure the file variant.json to add the mcc and mnc of the SIM card you are going to use
4. Clone Gaia repository and select the v1.2 branch.
5. Execute the command "GAIA_DISTRIBUTION_DIR=URL/firefoxos-gaia-testsbuild  PRODUCTION=1 make reset-gaia" to install gaia with single variant on the device
6. Complete FTE  with the configured SIM (configured in the json file)

Expected: 

The apps are installed correctly and they are placed in the correct (configured) screen and position

Actual: 
Sometimes some applications are installed on the first free spot

The problem is that there is a race condition. Sometimes gecko starts installing some of the single variant apps before the homescreen has finished reading its configuration file. When that happens the onInstall handler is executed before the single variant apps are configured and thus single variant apps are treated as normal apps. 
The apps whose installation start after the homescreen has finished reading its configuration file are treated correctly (i.e. they are recognized as single variant apps).
blocking-b2g: --- → koi?
There is a WIP possible solution at: 

https://github.com/mcjimenez/gaia/commit/04084bd1e2902447f8b366e12fc2d17ac022a07d

This WIP solve the problem, the only thing remaining is to clean it a little and of course write a master version. Oh, and finish updating the tests.

Can you take a look to see if I should finish it this way, Cristian?
Flags: needinfo?(crdlc)
Blocks: 893800
Whiteboard: [systemsfe]
Please follow my advice offline, thanks a lot for you good work
Flags: needinfo?(crdlc)
Comment on attachment 8340774 [details] [review]
Proposed patch v1 according to the offline discussion

Please address the comments and ask again for a review, thanks a lot
Attachment #8340774 - Flags: review?(crdlc)
Attachment #8340774 - Flags: review?(crdlc)
Comment on attachment 8340774 [details] [review]
Proposed patch v1 according to the offline discussion

More comments, thanks
Attachment #8340774 - Flags: review?(crdlc)
Assignee: nobody → cjc
Status: NEW → ASSIGNED
Attachment #8340774 - Flags: review?(crdlc)
Comment on attachment 8340774 [details] [review]
Proposed patch v1 according to the offline discussion

Great job! Thanks a lot
Attachment #8340774 - Flags: review?(crdlc) → review+
https://github.com/mozilla-b2g/gaia/commit/573304f58bb431c3622a86786b5e17aaa65b07b9
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Keywords: verifyme
koi+ IOT from TEF and other partners.
blocking-b2g: koi? → koi+
I was not able to uplift this bug to v1.2.  If this bug has dependencies which are not marked in this bug, please comment on this bug.  If this bug depends on patches that aren't approved for v1.2, we need to re-evaluate the approval.  Otherwise, if this is just a merge conflict, you might be able to resolve it with:

  git checkout v1.2
  git cherry-pick -x -m1 573304f58bb431c3622a86786b5e17aaa65b07b9
  <RESOLVE MERGE CONFLICTS>
  git commit
Flags: needinfo?(cjc)
Verified:

Device: unagi
Branch: v1.2
Gecko: 18c6a00
Gaia: f615ae7
Status: RESOLVED → VERIFIED
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: