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

RESOLVED WONTFIX

Status

Core Graveyard
DOM: Apps
--
critical
RESOLVED WONTFIX
3 years ago
a day ago

People

(Reporter: gerard, Assigned: gerard)

Tracking

({qawanted, regression})

Trunk
ARM
Gonk (Firefox OS)
qawanted, regression

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Assignee)

Description

3 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.

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
(Assignee)

Comment 1

3 years ago
Created attachment 8503770 [details]
logcat with mozApps debug
(Assignee)

Comment 2

3 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
Status: NEW → ASSIGNED
(Assignee)

Comment 3

3 years ago
So I think the NS_BASE_STREAM_CLOSED comes from the fact that I get a 304 HTTP status code.
(Assignee)

Comment 4

3 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)
(Assignee)

Comment 5

3 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
(Assignee)

Comment 6

3 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)
(Assignee)

Comment 12

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

Updated

10 months ago
Status: ASSIGNED → RESOLVED
Last Resolved: 10 months ago
Resolution: --- → WONTFIX

Updated

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