Closed Bug 1685556 Opened 3 years ago Closed 3 years ago

Move app_tmpdir ($TMPDIR) to cache to allow users to free up space on their Android device

Categories

(GeckoView :: General, enhancement, P2)

Unspecified
All
enhancement

Tracking

(relnote-firefox -, firefox89 fixed)

RESOLVED FIXED
89 Branch
Tracking Status
relnote-firefox --- -
firefox89 --- fixed

People

(Reporter: robwu, Assigned: agi)

References

Details

(Whiteboard: [geckoview:m89])

Attachments

(1 file)

bug 1532446 is an example where TmpD has grown to an excessively large size, with no way for users to clean it up.

TmpD is ultimately derived from $TMPDIR, at https://searchfox.org/mozilla-central/rev/519f913527b0d9d5097d290d5731cff6b2991fe0/xpcom/io/SpecialSystemDirectory.cpp#434,452

Ideally, this directory should be cleared and the new location should be set to the cache folder so that users can use "Clear Cache" on Android.

STR:

  1. Attach a debugger to Fenix (e.g. via about:debugging, inspect Main process).
  2. Run Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment).get('TMPDIR')

Expected:

  • /data/user/0/org.mozilla.firefox_beta/cache (or any subdirectory of it)
  • (or any directory that can be cleared by users)

Actual:

  • /data/user/0/org.mozilla.firefox_beta/app_tmpdir

More info:

Whiteboard: [geckoview:m87]

esawin says there are other folders that are "temp" folders in Gecko.

Severity: -- → S3
Priority: -- → P2
Whiteboard: [geckoview:m87] → [geckoview:m88]
Whiteboard: [geckoview:m88] → [geckoview:m89]
Whiteboard: [geckoview:m89] → [geckoview:m90]
Blocks: 1699845

We do this so that users can clear it manually if it grows too large.

Assignee: nobody → agi
Status: NEW → ASSIGNED
Pushed by asferro@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/eeb118d61855
Put tmp dir under app cache. r=droeh
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
Whiteboard: [geckoview:m90] → [geckoview:m89]

Release Note Request (optional, but appreciated)
[Why is this notable]: Resolves an issue with users reporting muli-GiB Firefox folders that could only be fixed by deleting all app data including bookmkarks and other user data
[Affects Firefox for Android]: only
[Suggested wording]: Certain websites and extensions caused Firefox to use a large amount of Android storage. The files have been moved to a user clearable cache.
[Links (documentation, blog post, etc)]: only this bug

relnote-firefox: --- → ?
Blocks: 1670503
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: