Page MenuHomePhabricator

[BUG] 'download in progress' icon showing on an article that is already saved for offline
Closed, ResolvedPublic

Description

Steps to reproduce

  1. Open an article (eg John McCain)
  2. Add that article to a reading list
  3. Go into airplane mode
  4. Tap on a link to another article (Eg "US Navy") within that first article
  5. Tap to add the second article to the same reading list
  6. Tap to go to the reading list where both articles have been saved, then exit airplane mode
  7. Exit airplane mode

Expected

The second article should have been made 'available for offline' only after the app went back online (step 8)

Actual

  • The 'download in progress' icon is shown against both articles when only the second article added to the list via the link preview was not yet downloaded.
  • The 'download in progress' icon remains even after opening both articles when online.

See video showing this at:
https://youtu.be/CT3g_1Vaw58

NOTE: A similar bug exists in the prod version 2.5.198-r-2017-06-09, but since there is no 'download in progress' icon, the metadata is instead showing "2 out of 2 articles available offline" even though it is not the case.

Can we incorporate more tests scenarios for adding articles to read offline? eg this current one, and T166383.

Occurring on

Device = Nexus 5 (Android 6.0.1)
Version = 2.6.198-alpha-2017-07-27

Event Timeline

RHo renamed this task from [BUG] to [BUG] 'download in progress' icon showing on an article that is already saved for offline.Jul 28 2017, 9:42 AM

Hmm I updated step 6 to reproduce to reflect that you go to view list before exiting airplane mode and am able to reproduce.

Seeing it on Wikipedia version 2.6.168-alpha-2017-07-28 on the same Nexus 5 (Android 6.0.1) device:
https://youtu.be/2wJ4tYcEvrs

On Pixel (Android 7.1.2), there is similar erratic behavior in the display of the offline downloading icon:
https://youtu.be/00jhIAVIDnA

Change 368488 had a related patch set uploaded (by Dbrant; owner: Dbrant):
[apps/android/wikipedia@master] Improve (fix?) loading updating of pages for offline use.

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

Change 368488 merged by jenkins-bot:
[apps/android/wikipedia@master] Improve (fix?) loading updating of pages for offline use.

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

Testing on Samsung-SM-JI20A Galaxy Express 3 (Android 6.0.1) and Wikipedia version 2.6.198-alpha-2017-07-27.
As shown in the 3rd capture below, the 'download in progress' icon is still shown for a minute after airplane mode
is turned off. However, it does eventually disappear after a minute and once the article is opened. Hopefully it is fixed.

T171939 Part 1.png (800×480 px, 193 KB)
T171939 Part 2.png (800×480 px, 83 KB)
T171939 Part 3.png (800×480 px, 76 KB)

FWIW Looks fixed on my Nexus 5 (6.0.1) as well.

@Dbrant - looks like a regression on v2.6.200-alpha-2017-08-09 ?
Articles that have been downloaded continue to show the 'download in progress' icon.
https://youtu.be/XrUt8JPz8GQ

@RHo It didn't really look like you were giving the articles enough time to download. What happens when you exit airplane mode, and keep looking at the reading list screen for a few more seconds?

@Dbrant - it's definitely stuck. I've been back online for the past 15min and still showing the progress icon:

main-MainActivity-08102017161350.png (1×1 px, 715 KB)

Change 371118 had a related patch set uploaded (by Dbrant; owner: Dbrant):
[apps/android/wikipedia@master] Fix saving pages for offline use (convincingly).

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

Change 371118 merged by jenkins-bot:
[apps/android/wikipedia@master] Fix saving pages for offline use (convincingly).

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

ABorbaWMF subscribed.

Tested on a Nexus 4 with Android 5.1 and a Pixel with Android 7.1.1 on 2.6.201-alpha-2017-08-25

Looks good now. Icons are appearing and disappearing as expected.