Closed Bug 1051654 Opened 10 years ago Closed 10 years ago

APKs for previous versions of Nightly and Aurora stick around in Downloads

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(firefox34 fixed, firefox35 verified, fennec+)

VERIFIED FIXED
Firefox 35
Tracking Status
firefox34 --- fixed
firefox35 --- verified
fennec + ---

People

(Reporter: rnewman, Assigned: esawin, Mentored)

References

Details

(Whiteboard: goodfirstbug)

Attachments

(2 files, 1 obsolete file)

Launched Nightly on my tablet. Browsed to file:///sdcard/Downloads.

Noticed a fennec-34.0a1.multi.android-arm.apk, dated today at 19:23.

Noticed an update notification at 19:23. Installed that update.

Reopened Nightly. Noticed that the APK was still there in the Downloads folder, along with three other Fennec APKs.

There's at least one per installed version.

On my phone (where I also have Aurora installed) this means I have a1 and a2 for everything from Fennec 25 up to 34, each around 30MB, plus some dupes -- perhaps 30 in all. Yes: 900MB of Fennec APKs. See screenshot.

This is awful for Nightly and Aurora users, and would be bad news for non-Play distribution channels for release and Beta, too.
tracking-fennec: --- → ?
Yeah, this is not good. We should probably download to some directory within Downloads, and delete it after startup.
Mentor: snorp
Whiteboard: goodfirstbug
Assignee: nobody → scleymans
Do you want to tackle cleanup of old files here, or in Bug 1045887?
Status: NEW → ASSIGNED
Oh, hmm. I guess if we have a system like the one described in 1045887 it would be fine to do it there.
Gonna leave this open for now and depend on 1045887.
Depends on: 1045887
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #3)
> Oh, hmm. I guess if we have a system like the one described in 1045887 it
> would be fine to do it there.

Well, we don't have it yet, but patches welcome :D

Perhaps keep this bug for making us not accumulate APKs, and attack deleting the old stale ones in that bug?
tracking-fennec: ? → +
Assignee: scleymans → esawin
Attached patch update-cleanup.patch (obsolete) — Splinter Review
A simple way to solve this should be to delete the last APK used on startup of the updater service. This should stop the accumulation, bug 1045887 should then clean up the stale APKs.
Attachment #8496885 - Flags: feedback?(snorp)
Attachment #8496885 - Flags: feedback?(snorp) → feedback+
Attachment #8497055 - Flags: review?(snorp) → review+
Keywords: checkin-needed
https://hg.mozilla.org/integration/fx-team/rev/de63b8929fa4
Keywords: checkin-needed
Whiteboard: goodfirstbug → goodfirstbug[fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/de63b8929fa4
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: goodfirstbug[fixed-in-fx-team] → goodfirstbug
Target Milestone: --- → Firefox 35
On first launch after applying an update, the APK deleted for me in /mnt/sdcard/Downloads
Status: RESOLVED → VERIFIED
Comment on attachment 8497055 [details] [diff] [review]
update-cleanup.patch

Approval Request Comment
[Feature/regressing bug #]: Fennec update service
[User impact if declined]: Automatic update APKs will accumulate on the user's device, taking up ~40MB per day for Nightly users. Depleted storage space may prevent other apps from functioning and updating, which can pose security risks.
[Describe test coverage new/current, TBPL]: Local testing, has been on Nightly for a few days
[Risks and why]: Low - patch only deletes the last downloaded Fennec APK on startup of the updater service. The only negative side effect could be that the same APK would be downloaded multiple times.
[String/UUID change made/needed]: none
Attachment #8497055 - Flags: approval-mozilla-beta?
Attachment #8497055 - Flags: approval-mozilla-aurora?
Comment on attachment 8497055 [details] [diff] [review]
update-cleanup.patch

AFAIK, this does not really impact the release. I will let is ride the train with from aurora.
Attachment #8497055 - Flags: approval-mozilla-beta?
Attachment #8497055 - Flags: approval-mozilla-beta-
Attachment #8497055 - Flags: approval-mozilla-aurora?
Attachment #8497055 - Flags: approval-mozilla-aurora+
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.