Closed Bug 1081685 Opened 10 years ago Closed 8 years ago

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

Categories

(Core Graveyard :: DOM: Apps, defect)

ARM
Gonk (Firefox OS)
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED WONTFIX

People

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

References

Details

(Keywords: qawanted, regression)

Attachments

(3 files)

Attached file 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.

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

Expected:
 Update gets installed

Actual:
 Update runs for ever, never gets installed
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
Status: NEW → ASSIGNED
So I think the NS_BASE_STREAM_CLOSED comes from the fact that I get a 304 HTTP status code.
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)
The code introducing the use of updateFromStream() is from http://hg.mozilla.org/mozilla-central/rev/12985e11e4e8, i.e., bug 981085
Depends on: 981085
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)
I don't see what kind of details I can add to this.
Flags: needinfo?(lissyx+mozillians)
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: