Closed
Bug 936018
Opened 11 years ago
Closed 11 years ago
[Single Variant] Sometimes package apps icons are not correctly installed if finish quickly the FTE
Categories
(Firefox OS Graveyard :: Gaia::Homescreen, defect)
Tracking
(blocking-b2g:koi+, firefox26 wontfix, firefox27 wontfix, firefox28 fixed, b2g-v1.2 fixed)
People
(Reporter: rafael.marquez, Assigned: amac)
References
Details
(Whiteboard: [systemsfe])
Attachments
(3 files, 2 obsolete files)
****Steps
1. Installing a v1.2 build on device
2. Clone the tests repository for sigle variant: https://github.com/telefonicaid/firefoxos-gaia-testsbuild.git
3. Configuring the file variant.json
4. Clone Gaia repository and select the master branch.
5. Executing the command "GAIA_DISTRIBUTION_DIR=/home/tel056/firefoxos-gaia-testsbuild PRODUCTION=1 make reset-gaia" to install gaia with single variant in the device
6.Complete quickly the FTE with a movistar SIM (in this case the configured in the file .json)
***Expected Result
Packaged apps are instaled correctly
***Actual Result
Packaged app are instaled with default icon
Device Unagi
Branch 1.2
Gecko 1303dc0
Gaia 2140c98
Reporter | ||
Updated•11 years ago
|
blocking-b2g: --- → koi?
Assignee | ||
Comment 1•11 years ago
|
||
Does rebooting the phone fix the problem (as in making the correct icon appear)? If it does, I think this is bug 936018.
Assignee | ||
Comment 2•11 years ago
|
||
(In reply to Antonio Manuel Amaya Calvo (:amac) from comment #1)
> Does rebooting the phone fix the problem (as in making the correct icon
> appear)? If it does, I think this is bug 936018.
Ok, I meant bug 903291.
Depends on: 903291
Comment 3•11 years ago
|
||
We probably need to fix this independently of bug 903291 - we have branding requirements that require the icon to be correct on preinstall.
Assignee | ||
Comment 4•11 years ago
|
||
(In reply to Jason Smith [:jsmith] from comment #3)
> We probably need to fix this independently of bug 903291 - we have branding
> requirements that require the icon to be correct on preinstall.
The problem is that this *is* caused by bug 903291. And it doesn't actually depend on how fast you finish the FTE, rather it depends on how small the app is, and how unlucky you are. In fact, it can also happen with any app you install from any market, not just the single variant ones.
When the bug hits you, the application objects on the homescreen are created with an incorrect state, and that's what causes them to now show the correct icon (since homescreen believes they're still installing). The only solution (with the current implementation) is to either reboot the phone or to somehow kill the homescreen app. So a possible workaround would be killing/restarting the homescreen from system after the FTU is done (or just delaying creating it till then).
Assignee | ||
Comment 5•11 years ago
|
||
There's an ugly workaround for this, which is to kill the homescreen app after the operator apps have been installed. System should restart it automagically, and it would get the correct state for the apps. It's very ugly... but should work.
Another ugly solution would be to make the app installation run slower. That would also give time to the homescreen to setup its handlers before the app is installed.
Other than that, I don't think this can be fixed completely without fixing bug 903291.
Comment 6•11 years ago
|
||
Changed to Koi+. This is a branding requirement and a Content Team requirement.
blocking-b2g: koi? → koi+
Updated•11 years ago
|
Assignee: nobody → amac
Updated•11 years ago
|
Target Milestone: --- → 1.3 Sprint 5 - 11/22
Comment 7•11 years ago
|
||
koi+ is for 1.2. We should use 1.2 target milestone rather than 1.3 target milestone.
Target Milestone: 1.3 Sprint 5 - 11/22 → 1.2 C5(Nov22)
Comment 8•11 years ago
|
||
(In reply to Antonio Manuel Amaya Calvo (:amac) from comment #5)
> There's an ugly workaround for this, which is to kill the homescreen app
> after the operator apps have been installed. System should restart it
> automagically, and it would get the correct state for the apps. It's very
> ugly... but should work.
>
> Another ugly solution would be to make the app installation run slower. That
> would also give time to the homescreen to setup its handlers before the app
> is installed.
>
> Other than that, I don't think this can be fixed completely without fixing
> bug 903291.
Bug 903291 isn't targeted for 1.2 given complexity. Let's go with the first proposed workaround, if only visible when you run through FTE too quickly (the issue this bug represents). If that's not possible, or the issue isn't FTE-specific, let's go with your second proposed workaround (a minimum app install time).
Can you move forward here amac?
Assignee | ||
Comment 9•11 years ago
|
||
I'm with this. But at this time I'm hitting into another problem, which I don't know if it's the original problem Rafa ran into. The apps aren't installed and I'm getting a SEC_ERROR_EXPIRED_CERTIFICATE when verifying the signature.
Assignee | ||
Comment 10•11 years ago
|
||
Ok, the SEC_ERROR_EXPIRED_CERTIFICATE happens because if the phone have been really reset it doesn't have the correct date, and so the apps aren't installed. I think that this might be the problem Rafa ran into. I'm going to upload a patch to not check the signature of single variant/local apps to fix that (because that's actually going to be a problem with real, mint-new devices).
Regarding the race condition, I haven't been able to reproduce it. In fact (and I stand corrected) the patch I made in https://bugzilla.mozilla.org/attachment.cgi?id=804889 should have taken care of most of the race condition issues (at least for successful installations, failures might run into race conditions still).
Assignee | ||
Comment 11•11 years ago
|
||
I uploaded a patch for the certificate problem at bug 926219, and I think I managed to reproduce this at least once... now I only have to find *why* it's still failing :)
Assignee | ||
Comment 12•11 years ago
|
||
This just ensures that we actually update the object even when the process was already known to us. The previous version worked great on the tests, but not so great with real usage :(.
Attachment #8334913 -
Flags: review?(fabrice)
Assignee | ||
Comment 13•11 years ago
|
||
There are actually two problems here. One with Gecko, which I think the patch I just uploaded fixes. Sometimes we weren't updating the state of the object on the child processes.
And the other problem is in Gaia, concretely in [1]. We're passing this as icon there, and we should really create a new object and reference the fields of this we actually need (uid and descriptor.icon only). Otherwise, we run into a nice problem: Assuming to updates arrive back to back, the first one starts processing but the second one doesn't since the validation it does at [2] is true always (basically because pendingRequest.icon and request.icon are exactly the same object). And that means the second request isn't processed and so the icon isn't updated.
I will upload a patch for Gaia tomorrow.
[1] https://github.com/mozilla-b2g/gaia/blob/master/apps/homescreen/js/page.js#L203
[2] https://github.com/mozilla-b2g/gaia/blob/master/apps/homescreen/js/icon_retriever.js#L110
Assignee | ||
Updated•11 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 14•11 years ago
|
||
Comment on attachment 8334913 [details] [diff] [review]
V1. Gecko patch (B2G 26 version)
This is the B2G26 version. Uploading the M-C version in a few (turns out this part have changed and it doesn't apply)
Attachment #8334913 -
Attachment description: V1. Gecko patch → V1. Gecko patch (B2G 26 version)
Assignee | ||
Comment 15•11 years ago
|
||
This is the same patch, but for the M-C repo. I don't really know if it's worth landing this on M-C now since I guess all this code is going away once Fernando finish rewriting all the Webapps related IPC, still this one is quite simple.
Attachment #8335212 -
Flags: review?(fabrice)
Assignee | ||
Comment 16•11 years ago
|
||
Attachment #8335422 -
Flags: review?(crdlc)
Comment 17•11 years ago
|
||
Comment on attachment 8335212 [details] [diff] [review]
V1. Mozilla Central version
Review of attachment 8335212 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with comment fixed.
::: dom/apps/src/Webapps.jsm
@@ +963,5 @@
> refCount: 1
> });
> + }
> +
> + // If it wasn't registered before, let's update its state
Update the comment.
Attachment #8335212 -
Flags: review?(fabrice) → review+
Comment 18•11 years ago
|
||
Comment on attachment 8334913 [details] [diff] [review]
V1. Gecko patch (B2G 26 version)
Review of attachment 8334913 [details] [diff] [review]:
-----------------------------------------------------------------
r=me
::: dom/apps/src/Webapps.jsm
@@ +917,5 @@
> refCount: 1
> });
> + }
> +
> + // If it wasn't registered before, let's update its state
Update comment.
Attachment #8334913 -
Flags: review?(fabrice) → review+
Comment 19•11 years ago
|
||
Comment on attachment 8335422 [details] [review]
Gaia patch to allow loading icons reentrantly
Please request again a review when the unit tests are fixed and all comments are addressed what you consider needed or useful. Thanks
Attachment #8335422 -
Flags: review?(crdlc)
Comment 20•11 years ago
|
||
Comment on attachment 8335422 [details] [review]
Gaia patch to allow loading icons reentrantly
Good job, thanks a lot
Attachment #8335422 -
Flags: review+
Assignee | ||
Comment 21•11 years ago
|
||
r=fabrice
Try run at https://tbpl.mozilla.org/?tree=Try&rev=bca7a595027d
Attachment #8335212 -
Attachment is obsolete: true
Attachment #8335992 -
Flags: review+
Assignee | ||
Updated•11 years ago
|
Attachment #8334913 -
Attachment is obsolete: true
Assignee | ||
Comment 23•11 years ago
|
||
Gaia and Gecko patches are independent (so it doesn't matter the order they're checked in).
Assignee | ||
Comment 24•11 years ago
|
||
Gaia landed at: https://github.com/mozilla-b2g/gaia/commit/cdab4981044ddcf0ca32cab6e66a8141556701dc
Thanks Cristian!
Assignee | ||
Comment 25•11 years ago
|
||
The try run looks ok, requesting checkin for the gecko part. The Gaia patch already landed.
Keywords: checkin-needed
Comment 26•11 years ago
|
||
Keywords: checkin-needed
Comment 27•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
status-b2g-v1.2:
--- → affected
Updated•11 years ago
|
status-firefox26:
--- → affected
Comment 28•11 years ago
|
||
Added flags to uplift patches to version 1.2
Comment 29•11 years ago
|
||
status-firefox27:
--- → wontfix
status-firefox28:
--- → fixed
Comment 30•11 years ago
|
||
Sorry, forgot that there's a Gaia patch for this too. Setting status-b2g-v1.2 back to affected until that's uplifted.
Flags: needinfo?(jhford)
Comment 31•11 years ago
|
||
Uplifted cdab4981044ddcf0ca32cab6e66a8141556701dc to:
v1.2: 3c89aab6777f0ece3b30545b9b9bc7139c70d9b2
Updated•11 years ago
|
Flags: needinfo?(jhford)
Reporter | ||
Comment 32•11 years ago
|
||
Verified:
Device unagi
Branch 1.2
Gecko 6ac8a1e
Gaia 264c604
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•