Closed Bug 1456216 Opened 6 years ago Closed 6 years ago

Private data not successfully deleted

Categories

(Firefox for Android Graveyard :: Settings and Preferences, defect, P1)

Firefox 59
All
Android
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1415342

People

(Reporter: webmaster, Unassigned)

References

Details

Attachments

(1 file)

Attached file logcat.txt
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Build ID: 20180327223059

Steps to reproduce:

1. clear all private data (check everything)
2. search something on twitter (e.g. https://mobile.twitter.com/search?q=test)
3. check /data/data/org.mozilla.firefox/files/mozilla/PROFILE/storage/default/ => now includes "https+++mobile.twitter.com" (2.3M)
4. Goto Settings => clear private data
5. Check everything, hit delete
6. See popup "private data cleared"


Actual results:

/data/data/org.mozilla.firefox/files/mozilla/PROFILE/storage/default/ => still includes "https+++mobile.twitter.com" (2.3M)


Expected results:

/data/data/org.mozilla.firefox/files/mozilla/PROFILE/storage/default/ should be empty
I initially stumbled upon this because the app was getting quite large (> 500M), even though I have "clear private data on exit" active. I had lots more pages cached in /data/data/org.mozilla.firefox/files/mozilla/PROFILE/storage/default/ - most of them probably using persistent data storage like service workers.
Might be resolved by bug 1415342 - can you check with Nightly?
Flags: needinfo?(webmaster)
[triage] We're not deleting data: critical. Looks like it may be fixed already. FYI Susheel.
Flags: needinfo?(sdaswani)
Priority: -- → P1
Thanks for the FYI, let's see if what Carsten comes back with.
Flags: needinfo?(sdaswani)
I can confirm this is fixed in nightly (build: https://ftp.mozilla.org/pub/mobile/nightly/2018/05/2018-05-02-10-01-23-mozilla-central-android-aarch64/fennec-61.0a1.multi.android-aarch64.apk). Thanks for pointing me in the right direction.

However, the behaviour of the cache still seems odd.

1) You still need to press "Exit" in the menu in order to clear private data, killing the app via system app switcher does not suffice (afaik this has always been the case, but I've never understood why - maybe someone can shed light on this?)

2) If I go to System (Android 8.1/Lineage) Settings => Apps => Firefox (also applies for nightly), as a user, I would expect pressing the "clear cache" button of Android also deletes all cached folders like the storage in profile. But it does not... The folder is still filled with data after a cache clear by Android. This is especially bad if the internal mechanisms to clear the cache are as broken as they currently are (v59/60).

Also, to be honest.. bug 1415342 was reported 6 months ago, and the initial patch to clear SW data and IndexedDB stuff for FF desktop was rolled out as a critical patch if I remember correctly. I think it's not good to treat mobile as a second tier - I guess most of the users of FF on mobile explicitly choose FF because you have more control over privacy settings and possibilities like installing an Adblocker to regain privacy on the mobile web. That this was not included as a critical patch on mobile is quite sad :(

Apart from that, Mobile has made huge improvements since the Quantum release. Keep up the good work! :+1:
Flags: needinfo?(webmaster)
(In reply to Carsten from comment #5)
> 1) You still need to press "Exit" in the menu in order to clear private
> data, killing the app via system app switcher does not suffice (afaik this
> has always been the case, but I've never understood why - maybe someone can
> shed light on this?)

That's the way the application lifecycle works on Android. Apps are only notified when they're going into the background and that's it - the app process actually dying is supposed to be simply a technicality that the app shouldn't care about, so it doesn't receive any further notifications when that's about to happen. So closing an app via the system app switcher (or using "Force stop") is more akin to killing a process on Desktop.

Since clearing data each time the app is backgrounded would be somewhat of an overkill, especially since we've got no idea whether the user actually intended to finish the current browsing session or not, the only solution is to require some positive user interaction, using e.g. either a "Quit" action like Firefox, or a notification like Focus...

> 2) If I go to System (Android 8.1/Lineage) Settings => Apps => Firefox (also
> applies for nightly), as a user, I would expect pressing the "clear cache"
> button of Android also deletes all cached folders like the storage in
> profile. But it does not... The folder is still filled with data after a
> cache clear by Android. This is especially bad if the internal mechanisms to
> clear the cache are as broken as they currently are (v59/60).

Clearing the cache from Android's settings only clears files stored within the cache directory (i.e. /data/data/<package name>/cache on most devices). I've filed bug 1458983 for thinking about moving the OfflineCache there as well, however the storage directory wouldn't be a good fit for that, since
- not everybody will want to get rid of the contents of that directory all the time, and maybe you're using a page that stores some data/settings there that you actually would like to be remembered
- addon (webextension) settings are stored there as well
and losing that just because you (or even worse, the OS automatically) cleared the whole of the cache directory isn't the best user experience, either.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
OS: Unspecified → Android
Hardware: Unspecified → All
Resolution: --- → DUPLICATE
See Also: → 1458983
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: