Closed Bug 1212295 Opened 9 years ago Closed 9 years ago

Gecko does not notify user upon failure during recovery process for FOTA update

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(firefox44 fixed)

RESOLVED FIXED
FxOS-S9 (16Oct)
Tracking Status
firefox44 --- fixed

People

(Reporter: gerard-majax, Assigned: gerard-majax)

References

Details

Attachments

(3 files, 1 obsolete file)

Attached file FOTA hacking
STR:
 0. Hack FOTA with the attached patch
 1. Generate FOTA
 2. Install FOTA: ANDROID_TOOLCHAIN=.../prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/ ./tools/update-tools/test-update.py out/target/product/aries/fota-aries-update-fullimg.mar
 3. When prompted, apply update
 4. Let the device reboot into recovery
 5. During recovery there will be a failure because of the invalid Edify script, reboot the device from the recovery menu

Expected:
 After rebooting, B2G should notify the user that the FOTA failed

Actual:
 B2G reboots and we have no confirmation of the failure
Gecko update code has properly detected the failure at reboot:
> 10-07 14:12:59.105   355   355 I Gecko   : UpdatePrompt: Update error, state: failed, errorCode: 80
> 10-07 14:12:59.107   355   355 I Gecko   : UpdatePrompt: Warning: Couldn't send update event update-error: no content browser. Will send again when content becomes available.
> 10-07 14:12:59.108   355   355 I Gecko   : UpdatePrompt: Setting gecko.updateStatus: Install Failed
Gecko properly sends the event to SystemApp, but I suspect we do register too late the mozChromeEvent event handler in SystemUpdatable code ...
> 10-07 15:16:34.711   360   360 I Gecko   : XXX FIXME : Dispatch a mozChromeEvent: webapps-registry-ready
> 10-07 15:16:34.934   360   360 I Gecko   : XXX FIXME : Dispatch a mozChromeEvent: system-first-paint
> 10-07 15:16:36.725   360   360 I Gecko   : XXX FIXME : Dispatch a mozChromeEvent: update-error
> 10-07 15:16:36.726   360   360 I Gecko   : XXX FIXME : Dispatch a mozChromeEvent: volume-state-changed
> 10-07 15:16:38.215   360   360 D GeckoConsole: Content JS DEBUG: SystemApp: Update: mozChromeEvent: addEventListener 

We add the event listener two seconds after it was dispatched ...
Component: GonkIntegration → Gaia::System
Once we fix the race between Gecko and Gaia, then all we lack is a proper notification.
Blocks: 1194642
Attachment #8671256 - Flags: review?(mhenretty)
Comment on attachment 8671256 [details] [review]
[gaia] lissyx:bug1212295 > mozilla-b2g:master

Yaaaay for killing long standing race conditions! \o/
Attachment #8671256 - Flags: review?(mhenretty) → review+
Blocks: 1212884
Comment on attachment 8671312 [details] [diff] [review]
Wait for SystemApp to be ready before sending update-error event

Review of attachment 8671312 [details] [diff] [review]:
-----------------------------------------------------------------

:( for another event buffer. I really wish we fix bug 1161927 and bug 1172244
Attachment #8671312 - Flags: review?(fabrice) → review+
Attachment #8671255 - Attachment is obsolete: true
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/d093780814a4
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → FxOS-S9 (16Oct)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: