Closed Bug 824696 Opened 12 years ago Closed 6 years ago

The App Install Prompt does not reflect the actual size accurately reflected in the mini-manifest when installing a packaged app

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-basecamp:-, b2g18+)

RESOLVED WONTFIX
blocking-basecamp -
Tracking Status
b2g18 + ---

People

(Reporter: jsmith, Unassigned)

Details

Upon trying a couple of test cases with the mini-manifest with the "size" specifier, I've noticed that the size seen in the prompt never seems to match the value given in the size specifier. For example, for a packaged app that the mini-manifest calls out as being 10 KB, the install prompt instead reports 9.77 KB. Actual mini-manifest for this is below:

{
  "name" : "Test WebAPI Permissions",
  "version" : "1.1",
  "size" : 10000,
  "release_notes": "First v1.1 release",
  "icons": {
    "126": "/webapi-permissions-tests/qalogo.png"
  },
  "developer": {
    "name": "Mozilla QA",
    "url": "http://quality.mozilla.org"
  },
  "package_path": "/webapi-permissions-tests/webpackagedappwithperms.zip"
}

Another example with a large packaged app also shows even weirder behavior - the mini-manifest states the size is 1e+64 bytes, but the install prompt indicates an arbitrary value of 6.08. Example mini-manifest below:

{
  "name" : "Test WebAPI Permissions",
  "version" : "1.1",
  "size" : 10000000000000000000000000000000000000000000000000000000000000000,
  "release_notes": "First v1.1 release",
  "icons": {
    "126": "/webapi-permissions-tests/qalogo.png"
  },
  "developer": {
    "name": "Mozilla QA",
    "url": "http://quality.mozilla.org"
  },
  "package_path": "/webapi-permissions-tests/webpackagedappwithperms.zip"
}

And so on with other examples. We don't ever seem to report the correct value for the size off of the mini-manifest. The worst part about this with a few examples I've tried is that we're "undershooting" the size, so this will confuse a user into thinking that they are downloading 9.77 KB app, when in reality, they are downloading a 10 KB app. And so on with other examples...

Nominating to block as well as this is a user trust issue - if we're lieing to the user about the size of the app they are planning to install, then they will unexpectedly download more data than they initially requested through undershooting of the size, then they will use up more data unexpectedly than they initially expected.
Blocks: app-install
blocking-basecamp: --- → ?
blocking-basecamp: ? → -
tracking-b2g18: --- → +
Needs info on Josh in case he has an opinion here on priority.
Flags: needinfo?(jcarpenter)
Whiteboard: [UX-P?]
(In reply to Jason Smith [:jsmith] from comment #0)
> Another example with a large packaged app also shows even weirder behavior -
> the mini-manifest states the size is 1e+64 bytes, but the install prompt
> indicates an arbitrary value of 6.08. Example mini-manifest below:

Sorry Jason, could you clarify this? What's the spread between the actual and the reported? If, as in the first example, it's less than 1KB, then this seems relatively harmless. But this could be a canary in the coal mine for bigger errors, so it seems worth our while to look into the cause.

cc'ing Marshall and Etienne to comment.
Flags: needinfo?(jcarpenter)
(In reply to Josh Carpenter [:jcarpenter] from comment #2)
> (In reply to Jason Smith [:jsmith] from comment #0)
> > Another example with a large packaged app also shows even weirder behavior -
> > the mini-manifest states the size is 1e+64 bytes, but the install prompt
> > indicates an arbitrary value of 6.08. Example mini-manifest below:
> 
> Sorry Jason, could you clarify this? What's the spread between the actual
> and the reported? If, as in the first example, it's less than 1KB, then this
> seems relatively harmless. But this could be a canary in the coal mine for
> bigger errors, so it seems worth our while to look into the cause.
> 
> cc'ing Marshall and Etienne to comment.

The cases I've tried so far I ended up with:

Expected: 16 KB
Actual: 15.63 KB

Expected: 10 KB
Actual: 9.77 KB

Expected: 17.62 KB
Actual: 17.21 KB

I need to try a larger, valid size (in MB) though to see if this really has huge negative effects. But yeah, if it's within a 1 KB then it probably is harmless.
Here's another test case with a larger packaged app:

Expected: 20.467 MB
Actual: 19.07 MB
No longer blocks: market-packaged-apps
Whiteboard: [UX-P?]
Blocks: b2g-apps-v1-next
No longer blocks: app-install
Assignee: nobody → aus
No longer blocks: b2g-apps-v1-next
Assignee: aus → nobody
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.