Wrong file size reported in 'Version Information' (MB used instead of KB?)



7 years ago
3 years ago


(Reporter: aryx, Assigned: yboniface)


Windows XP


On https://addons.mozilla.org/en-US/firefox/addon/open-sync-tabs-button/?src=cb-dl-created , scroll down and click "Version Information".

At the moment, I can read this:

Version RC1.rev8
Released April 21, 2012 144.6 MB
Works with Firefox 10.0 and later 

The actual file size is 141.184 bytes.
Hmm, I can't reproduce this in -dev or locally by uploading this same xpi. The size looks right in the database. Odd. What browser did you use to upload it?
wait, nevermind. The size is right in the DB so it's something with the display I guess.
{{ (141.184 * 1024)|filesizeformat }} => 144.6 KB

Something seems weird.

Comment 4

6 years ago
This is still wrong. Ever tried to add a new addon and re-upload it?

Target Milestone: --- → 2014-04
Target Milestone: 2014-04 → 2014-05


5 years ago
Assignee: nobody → yboniface

Comment 5

5 years ago
I see the problem in the given addon page.
But I'm enable to reproduce in local, even with this same exact addon.
And I don't find any other addon with the problem in production.
And the code is quite simple, just using the filter from django.
I need to check with ops the value in db, just to be sure, and maybe start reproducing/investigating from that.

Comment 6

5 years ago
Here is the SQL I need:

SELECT `files`.`created`, `files`.`modified`,  `files`.`filename`, `files`.`size`, `files`.`status`  FROM `files` INNER JOIN `versions` ON ( `files`.`version_id` = `versions`.`id` ) INNER JOIN `addons` ON ( `versions`.`addon_id` = `addons`.`id` ) WHERE `addons`.`slug` = 'open-sync-tabs-button';

I will ask on #remora.

Comment 7

5 years ago
So here is the size on the database 144572416, which, if my maths goes well, *is* 146Mo.
At this point I suggest to close this ticket and reopen if someone is able to reproduce.


5 years ago
Last Resolved: 5 years ago
Resolution: --- → INVALID
I ran this on the db, should get through the cache eventually:

> mysql> update files set size=141184 where id=149612 limit 1;
> Query OK, 1 row affected (0.00 sec)
> Rows matched: 1  Changed: 1  Warnings: 0

I'm not sure why it was set that way, but as Yohan said, let us know if you see it elsewhere. Thanks.
Resolution: INVALID → FIXED

Comment 9

5 years ago
I am not sure how to verify this one. The correct size is displayed for me. Can you please add some STRs or mark the bug as "worksforme" ?
(In reply to Victor Carciu from comment #9)
> The correct size is displayed for me.

sounds verified then :)

Comment 11

5 years ago
Okay I will mark it as verified then :)
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.