Unable to complete privileged app update when package is already downloaded (HTTP/1.1 304)



4 years ago
a year ago


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


({qawanted, regression})

Gonk (Firefox OS)
qawanted, regression

Firefox Tracking Flags

(Not tracked)



(3 attachments)



4 years ago
Created attachment 8503765 [details]
logcat error

I'm not able to install latest update of the "Run, Hike, Bike" app from Marketplace on Tako, running a gecko master from today.

 0. Have a previous version of the app installed
 1. Reboot, wait for update notification
 2. Try to install the new version

 Update gets installed

 Update runs for ever, never gets installed

Comment 1

4 years ago
Created attachment 8503770 [details]
logcat with mozApps debug

Comment 2

4 years ago
Created attachment 8503771 [details]
Gecko: return a proper error status to Gaia on NS_BASE_STREAM_CLOSED

This small patch makes at least the error to be properly propagated to Gaia, thus reflecting the status to the user.
Assignee: nobody → lissyx+mozillians

Comment 3

4 years ago
So I think the NS_BASE_STREAM_CLOSED comes from the fact that I get a 304 HTTP status code.

Comment 4

4 years ago
Removing the If-None-Match header to force download, I don't have anymore NS_BASE_STREAM_CLOSED.
Summary: [Tako] Unable to install "Run, Hike, Bike" update → Unable to complete privileged app update when package is already downloaded (HTTP/1.1 304)

Comment 5

4 years ago
The code introducing the use of updateFromStream() is from http://hg.mozilla.org/mozilla-central/rev/12985e11e4e8, i.e., bug 981085
Depends on: 981085

Comment 6

4 years ago
Fabrice, can you give me some light on this ?

As far as I can tell, even fixing _computeFileHash() to properly complete in this case, we would still be throwing an error "PACKAGE_UNCHANGED". This will make the Gaia side turning the app in error case and thus making the app non launchable.

Given that we got an update and then a 304 when downloading the zip, I don't think we should be erroring in such a way.

Can you confirm this or did I missed some point? Should we continue to use this "PACKAGE_UNCHANGED" error to notify of this status and just make sure we properly deal with this on upper level?
Flags: needinfo?(fabrice)
Alex, at http://mxr.mozilla.org/mozilla-central/source/dom/apps/Webapps.jsm#3065 we set the app in the correct state and send the dowloadsuccess & downloadapplied events (that happens in http://mxr.mozilla.org/mozilla-central/source/dom/apps/Webapps.jsm#3289). 

So I think we should send PACKAGE_UNCHANGED and let the upper layer deal with it properly.
Flags: needinfo?(fabrice)
Does this still reproduce?
QAWANTED to see if it can be reproduce on Flame 2.2/master.
Please renominate if it can.
blocking-b2g: 2.2? → ---
Flags: needinfo?(fan.luo)
Keywords: qawanted
Hi Repoert,

Could you provide a previous version of the app? I just can install latest version now.

Meanwhile, I have installed the latest version, if I recieve its update info before reporter provides a previous version in a few days later, I will try to reproduce it then.
Flags: needinfo?(lissyx+mozillians)
Hi reporter,
I have installed the old version of this app: 0.1, 0.1.1, 0.1.2, 0.1.3, and can't recieve the update information, could you provide more detail about that? thanks.
Flags: needinfo?(fan.luo)

Comment 12

4 years ago
I don't see what kind of details I can add to this.
Flags: needinfo?(lissyx+mozillians)


2 years ago
Last Resolved: 2 years ago
Resolution: --- → WONTFIX


a year ago
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.