Closed Bug 1217620 Opened 9 years ago Closed 9 years ago

After an upgrade, the check to launch the upgrade tutorial is broken

Categories

(Firefox OS Graveyard :: Gaia::System, defect, P2)

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-b2g:2.5+, b2g-master fixed)

RESOLVED FIXED
FxOS-S10 (30Oct)
blocking-b2g 2.5+
Tracking Status
b2g-master --- fixed

People

(Reporter: sfoster, Assigned: sfoster)

References

Details

(Whiteboard: [systemsfe])

Attachments

(1 file)

You could check this with an OTA, but a simpler way to test is: 

STR: 
Set the deviceinfo.os setting value to some earlier version, e.g. '2.1.0-release'. One way to do this is in the webIDE console, from the system app: 

navigator.mozSettings.createLock().set({'deviceinfo.os': '2.1.0-release'});

then stop/start b2g or restart the device. 

Expected: 
At startup, the deviceinfo.os value gets moved to deviceinfo.previous_os, and deviceinfo.os newly populated with the current version (it comes from @MOZ_B2G_VERSION@ ultimately). We expect to detect this as an upgrade, and the FTU tutorial should be launched. 

Actual: 
Device boots straight to homescreen. 
 
In bug 1094759 the check for the deviceinfo.os and deviceinfo.previous_os was refactored out into apps/system/js/launcher.js. This https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/launcher.js#L82:L90 - and the unit test for this code - both incorrectly assume that the current and previous values are objects with major and minor properties. Actually, these setting values are stored as a string like '2.2.0-prerelease' and the VersionHelper was previously parsing those out. The result is that the checkUpgrading never returns true.
[Blocking Requested - why for this release]: Users will see no congrats or tour when they upgrade to 2.5; they'll restart and go straight to the homescreen after upgrade.
Assignee: nobody → sfoster
blocking-b2g: --- → 2.5?
Summary: Upgrade check in Launcher is broken → After an upgrade, the check to launch the upgrade tutorial is broken
Flags: in-moztrap?(nhirata.bugzilla)
Blocks: 1217539
Comment on attachment 8677797 [details] [review]
[gaia] sfoster:upgrade-launcher-bug-1217620 > mozilla-b2g:master

This was overlooked in the grand bootstrap patch. Not only was checkUpgrading expecting objects when the setting values it receives are strings, the signature was reversed. 

I'm up for a FTU marionette test for this (as it went unnoticed all this time) but it wasnt immediately obvious how I would set the window.asyncStorage 'ftu.enabled' key to false in the system app, in time for the launcher to spot it and launch the FTU.
Attachment #8677797 - Flags: review?(etienne)
Downgrading to p2 - doesnt prevent normal use of the phone, but it does block a feature.
Priority: P1 → P2
Comment on attachment 8677797 [details] [review]
[gaia] sfoster:upgrade-launcher-bug-1217620 > mozilla-b2g:master

The unit-test coverage is pretty nice, r=me

But feel free to file a follow up for an integration test and to ask around to see if it's possible to execute some script before the system app starts with marionette there.
Attachment #8677797 - Flags: review?(etienne) → review+
blocking-b2g: 2.5? → 2.5+
Comment on attachment 8677797 [details] [review]
[gaia] sfoster:upgrade-launcher-bug-1217620 > mozilla-b2g:master

Kevin, if you have a minute could you sanity-check that marionette test for raciness/usefulness - mocking the asyncStorage ftu.enabled to ensure FTU could launch the upgrade tour value was awkward. I didn't have much success pushing a value into the db directly from an injected script, maybe there's a better way to do this.
Attachment #8677797 - Flags: feedback?(kevingrandon)
Comment on attachment 8677797 [details] [review]
[gaia] sfoster:upgrade-launcher-bug-1217620 > mozilla-b2g:master

Seems fine to me, though you should be able to pass in the initial settings into the marionette.client() call. Something like this: https://github.com/mozilla-b2g/gaia/blob/master/apps/system/test/marionette/update_dialog_confirm_test.js#L14
Attachment #8677797 - Flags: feedback?(kevingrandon) → feedback+
I'm waiting for a green test run before landing this. The patch has just got the new marionette test but all the Gij clusters are blowing up - I assume infrastructure?
Tests are green: https://treeherder.mozilla.org/#/jobs?repo=gaia&revision=5aaf78e42164
Gu27 failures are from bug 1212329 and since backed out. 

Merged to master: https://github.com/mozilla-b2g/gaia/commit/b860e1b764618775adae82f2e0256aaa37581f73
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Hi Sam,
How about upgrade from v2.5 older build to v2.5 the latest one? 
I've tested OTA between the following two builds, but the FTE is skipped and directly enter the tour screens.

### Older build:
Build ID               20151028031756
Gaia Revision          a26eadc5e1133d5112b6cbc10badbb7670a1090f
Gaia Date              2015-10-27 17:36:52
Gecko Revision         https://hg.mozilla.org/integration/mozilla-inbound/rev/86d1b3a8aecb978a7e656e8c8018e227333d9ae5
Gecko Version          44.0a1
Device Name            aries
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.worker.20151028.023650
Firmware Date          Wed Oct 28 02:36:58 UTC 2015
Bootloader             s1

### The latest build:
Build ID               20151030012134
Gaia Revision          91cac94948094cfdcd00cba5c6483e27e80cb3b0
Gaia Date              2015-10-28 20:32:15
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/b41b92c09fcf94d077a54297aea1dc675b161a9d
Gecko Version          45.0a1
Device Name            aries
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.worker.20151028.023650
Firmware Date          Wed Oct 28 02:36:58 UTC 2015
Bootloader             s1
Flags: needinfo?(sfoster)
(In reply to Iris Hsiao from comment #10)
> Hi Sam,
> How about upgrade from v2.5 older build to v2.5 the latest one? 
> I've tested OTA between the following two builds, but the FTE is skipped and
> directly enter the tour screens.

We should only show the tutorial if there is a minor or major point difference. So I wouldn't expect an OTA from an earlier v2.5 to a newer one to trigger the FTU or upgrade tutorial at all. Is that what you are seeing? If so can you file a bug with details?
Flags: needinfo?(sfoster)
I'm not quite understand what to expected now. My observed result is OTA from an earlier v2.5 to a newer one, the FTU is not completed, it goes straight to the "Start tour" screen, and skips all the pages before that(e.g., Language, Cellular Data, ..., About Foxfood).

Is this a correct behavior what you are expected? If not I can file a bug then.
(In reply to Iris Hsiao from comment #12)
> I'm not quite understand what to expected now. My observed result is OTA
> from an earlier v2.5 to a newer one, the FTU is not completed, it goes
> straight to the "Start tour" screen, and skips all the pages before
> that(e.g., Language, Cellular Data, ..., About Foxfood).
> 
> Is this a correct behavior what you are expected? If not I can file a bug
> then.

Yeah this sounds like a bug, you shouldn't see the FTU tutorial at all as a result of an OTA from earlier 2.5 to newer 2.5. Could you file it?
> Yeah this sounds like a bug, you shouldn't see the FTU tutorial at all as a
> result of an OTA from earlier 2.5 to newer 2.5. Could you file it?

Actually, I just flashed the latest build and I think the problem is that we are already reporting the current version as 2.6.0.0-prerelease. 2.5 -> 2.6 would trigger the FTU launcher to show the tour. In the absence of specific steps for an upgrade, we show the whole tour. We will eventually need a 2.5 to 2.6 upgrade tutorial (maybe) in the meantime, I've filed bug 1220942 for that.
B2G Project is sunset, MOztrap might be as well.  -ing.
Flags: in-moztrap?(nhirata.bugzilla) → in-moztrap-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: