Page MenuHomePhabricator

Remove articles from reading lists does not remove the articles' offline data
Closed, ResolvedPublic

Description

From the OTRS: https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=10777736

Hello, I've noticed that the user data for Reading Lists on the Wikipedia app won't erase. For example, I have 9 articles saved to my device for a total of 10.7mb. However, the device storage report shows that the app has accumulated 58.44mb of data. Even if I delete my entire reading history and clear the app cache, this remains unchanged except for increasing every time I add an article to a reading list. As such, my guess is that when I remove an article from a reading list the data remains on my device. Is this a bug? Where can I find this surplus data to manually erase it?

Pixel 2, Android 8.1

Jake Goodman

Steps to reproduce

  1. Open the Android app usage screen to monitor the Wikipedia app usage.
  2. In the Wikipedia app, try to add articles to a new reading list
  3. Check the Wikipedia app usage
  4. Back to the Wikipedia app and delete the reading list.
  5. Check the Wikipedia app usage again.

Screenshot_1534200286.png (1×1 px, 87 KB)

Expected

The articles' offline data should be removed if they are not in any reading list.

Actual

The offline data keeps in the app as an "User data"

Event Timeline

@cooltey I cannot reproduce this. In my testing, the offline cache files are correctly deleted.

@Dbrant

I keep following the test steps below for 4 times:

  1. Login my account, it has 4 lists with 48 articles
  2. Logout
  3. Go to Settings -> Clear cache
  4. Monitor the app storage

(1st)

Screenshot_1537377819.png (1×1 px, 87 KB)

(2nd)
Screenshot_1537378175.png (1×1 px, 88 KB)

(3rd)
Screenshot_1537378436.png (1×1 px, 89 KB)

(4th)
Screenshot_1537379260.png (1×1 px, 87 KB)

As you can see, the User data keeps increasing (except the 2nd run)

In the Device file explorer, the cache -> okhttp-cache will be cleared if we tap on Clear cache in Settings.

wikipedia____Documents_Android_wikipedia__-_____app_src_main_java_org_wikipedia_readinglist_ReadingListFragment_java__app_.png (1×1 px, 293 KB)

The files -> okhttp-cache will still have cache files, but not sure what's the difference between the files in cache folder.

(The usage of User data will decrease after removing the okhttp-cache folder in files.

Screenshot_1537379675.png (1×1 px, 87 KB)

@Dbrant
I found the issue may be related to this ticket T191550

If the lists contain Chinese articles, and the cache data of these articles will not be deleted properly.

But I am not sure whether the OTRS user is a Chinese user or he/she read Chinese, maybe it would possibly happen in other languages.

Update: the user who reported the issue said the articles in the lists were from English Wikipedia.

Change 470949 had a related patch set uploaded (by Cooltey; owner: Cooltey):
[apps/android/wikipedia@master] [WIP] Fix: Remove articles from reading lists does not remove the articles' offline data

https://gerrit.wikimedia.org/r/470949

Change 470949 abandoned by Cooltey:
Fix: Remove articles from reading lists does not remove the articles' offline data

Reason:
Solved

https://gerrit.wikimedia.org/r/470949