Fenix: [Bug] When cutting the wi-fi off, the download notification displays the download completed

Created on 4 Nov 2019  路  9Comments  路  Source: mozilla-mobile/fenix

Steps to reproduce

  1. Go to https://www.thinkbroadband.com/download.
  2. Select to download a file.
  3. Cut off the wi-fi and observe the download notification.

Expected behavior

The download should fail.

Actual behavior

The notification displays the download to be complete.

Device information

  • Android device: all
  • Fenix version: 11/4 (13080608)

logcat.txt

Download S2 engverified ac 馃悶 bug 馃檯 waiting

Most helpful comment

@sv-ohorvath thanks for catching those 馃槃

https://github.com/mozilla-mobile/fenix/pull/6645 Should address point 1
https://github.com/mozilla-mobile/android-components/pull/5076 Should address point 2

All 9 comments

This issue is really strange. In Sample Browser inside of Android Components, the way I implemented this, an IO exception is thrown when the internet cuts out. However, for some reason, inside of Fenix, that IO exception is either never thrown or is being caught by some universal catch somewhere?

@BranescuMihai if you're digging into this more, it's going to be in this section of the code:

https://github.com/mozilla-mobile/android-components/blob/master/components/feature/downloads/src/main/java/mozilla/components/feature/downloads/AbstractFetchDownloadService.kt#L170-L191

Really strange that this is working as expected in Sample Browser but not inside of Fenix 馃槙 they're both using the same download service.

@sblatz yep, I was looking into that method, but thanks for the idea with the Sample browser, will check that out

Thanks for investigating this, @BranescuMihai! Sounds like we need a GV/AC patch to fix this.

This should now be partially fixed. Files that have a download size will now fail when the wifi is cut off. The file does not have a content length, we're still waiting on that GV fix.

QA could you verify that this is partially fixed and I'll keep this open track the GV one?

@sblatz
This still has some issues:

  • The paused download still appears as completed on the in-app notification [1].
  • A canceled download now appears as Failed both in the system notification and in-app (not sure if caused by this ticket, but it worked fine yesterday).

@sv-ohorvath thanks for catching those 馃槃

https://github.com/mozilla-mobile/fenix/pull/6645 Should address point 1
https://github.com/mozilla-mobile/android-components/pull/5076 Should address point 2

Verified as fixed on Nightly 11/19.

To be clear, the GV bug still stands which means that this will still have incorrect behavior when files do NOT have a file size. https://github.com/mozilla-mobile/android-components/issues/4999 Will track that :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

robsmith11 picture robsmith11  路  3Comments

andreicristianpetcu picture andreicristianpetcu  路  3Comments

thelazyoxymoron picture thelazyoxymoron  路  3Comments

abodea picture abodea  路  3Comments

andreicristianpetcu picture andreicristianpetcu  路  3Comments