Closed Bug 836859 Opened 11 years ago Closed 11 years ago

Trying download an update for the maps packaged app fails with INVALID_SIGNATURE

Categories

(Core Graveyard :: DOM: Apps, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:tef+, firefox19 wontfix, firefox20 wontfix, firefox21 fixed, b2g18 fixed, b2g18-v1.0.0 fixed, b2g18-v1.0.1 fixed)

VERIFIED FIXED
mozilla21
blocking-b2g tef+
Tracking Status
firefox19 --- wontfix
firefox20 --- wontfix
firefox21 --- fixed
b2g18 --- fixed
b2g18-v1.0.0 --- fixed
b2g18-v1.0.1 --- fixed

People

(Reporter: jsmith, Assigned: fabrice)

References

Details

(Keywords: regression)

Attachments

(1 file)

Build: 1/31
Device: Unagi

Steps:

1. Try to download the update for the maps packaged app

Expected:

The update should complete successfully.

Actual:

The update fails with INVALID_SIGNATURE.
blocking-b2g: --- → tef?
There's a separate problem with the fact that the download failing is putting the app in a bad state (doesn't remain launchable). I thought that was fixed, but apparently not (or it wasn't uplifted).
Component: Gaia::System → DOM: Apps
Product: Boot2Gecko → Core
Version: unspecified → Trunk
blocking-b2g: tef? → ---
Component: DOM: Apps → Consumer Pages
Product: Core → Marketplace
Version: Trunk → 1.0
Talking with Fabrice, client side appears to be operating normally. Maybe a signing server bug? Ryan?
Blocks: market-packaged-apps
No longer blocks: b2g-app-updates
Flags: needinfo?(rtilder)
Platform code looks okay. Reading it as I understand, we always require the app to be signed when pulling from a trusted store. Nothing showing up on the marketplace side. Maybe a out of date certdb issue?
Flags: needinfo?(rtilder)
Component: Consumer Pages → DOM: Apps
Product: Marketplace → Core
Version: 1.0 → Trunk
Blocks: b2g-app-updates
No longer blocks: market-packaged-apps
blocking-b2g: --- → tef?
Well...I just tried doing a simple packaged app update off of marketplace with two signed apps and did not see a problem.

So what's so special about the maps app that's causing it to fail?
Keywords: regression
Fabrice confirmed this is a gecko issue:

	fabrice	gecko issue, where we pick up the package path in the current manifest instead of the new staged update manifest
	fabrice	and the maps app is the only one that changes that path for now
Attached patch patchSplinter Review
The patch itself is not interesting, but the cause is:

- we were not setting the installState when installing 3rd party apps.
- in startDownload, installState == undefined, so isUpdate = false. At this point, we re-use the old manifest instead of the staged one, and consider that we are trying to re-download the installation package.
- in the case of the maps app, the initial package uri is bogus (it's http://marketplace.firefox.com/application.zip). But we open an http channel and download this 404 page, try to open it as a zip and to compute a signature. That fails.
- lastly, since we though that we were retrying an initial download, we set the installState to "pending", which prevent the app to be launched again.

The patch sets installState for 3rd party preinstalled apps, and also protects against http errors when we download a package.
Assignee: nobody → fabrice
Attachment #708859 - Flags: review?(ferjmoreno)
Comment on attachment 708859 [details] [diff] [review]
patch

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

Thanks Fabrice. Looks good. r=me

::: dom/apps/src/Webapps.jsm
@@ +2117,5 @@
>  
> +          // If we get a 4XX or a 5XX http status, bail out like if we had a
> +          // network error.
> +          let responseStatus = requestChannel.responseStatus;
> +          if (responseStatus >= 400 && responseStatus <= 599) {

nit: we could use the above condition:

if (!Components.isSuccessCode(aStatusCode) ||
    (responseStatus >= 400 && responseStatus <= 599)) {
  ...
}
Attachment #708859 - Flags: review?(ferjmoreno) → review+
https://hg.mozilla.org/mozilla-central/rev/dfc06d96fa34
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
QA Contact: jsmith
Comment on attachment 708859 [details] [diff] [review]
patch

[Approval Request Comment]
Another defense in depth / better error management patch. No risk there.
Attachment #708859 - Flags: approval-mozilla-b2g18?
Definitely want this, marking tef+ and will clear the approval nomination.
blocking-b2g: tef? → tef+
Attachment #708859 - Flags: approval-mozilla-b2g18?
Verified on b2g18 2/6/2013.
Status: RESOLVED → VERIFIED
Keywords: verifyme
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: