Fenix: [Bug] Can't simultaneously download files on Firefox 82

Created on 24 Sep 2020  ·  48Comments  ·  Source: mozilla-mobile/fenix

Steps to reproduce

  1. Launch Fenix and go to https://www.thinkbroadband.com/download;
  2. Tap to download the 100MB file;
  3. Tap to download the 50MB file;
  4. Observe the download notification;

    Expected behavior

The download notification displays that the download is in progress.

Actual behavior

The download notification displays that the download is constantly in progress without downloading the file and the file name is missing.
20200924_111626

Notes

This is also reproducible on file-examples.com.
With the Ublock Origin installed, if the 50 MB file is tapped first, the download notification is not displayed and the page is in a loading state.
On Xiaomi Mi Pad 2 (Android 5.1) the file name is missing, but the file is downloaded.

Device information

  • Android device: Samsung Galaxy Tab S3 (Android 8), OnePlus A3 (Android 6.0.1);
  • Fenix version: Beta 82.0.0-beta.1 GV 82.0 from 9/23
    Not reproducible on Nightly 200924 GV 83.0a1 from 9/24 and RC 81.1.1 GV 81 from 9/18;
Download S2 engverified gv 🐞 bug 🙅 waiting

Most helpful comment

@Amejia481 this issue only occurs on Beta 82.0.0 builds.
Tested on Google Pixel (Android 10), and Samsung Galaxy Tab S6 on the latest Beta build 82.0.0-beta.4 with GV 82.0-20201002191150.
I was able to download .zip files from https://www.thinkbroadband.com/download, but not able to download .pdf files from file-examples.com or www.w3.org - please see the attached screenshots:

pdf download

I'll remove the qa:needed label for now.

PS: I was not able to reproduce this issue on the latest Nightly from 10/7 with GV 83.0a1.

All 48 comments

Thanks for the report :)

Android device: Samsung Galaxy Tab S3 (Android 8), OnePlus A3 (Android 6.0.1);

Is the issue consistently reproducible only this devices?

Not reproducible on Nightly 200924 GV 83.0a1 from 9/24 and RC 81.1.1 GV 81 from 9/18;

In the same devices above, the issue is not reproducible in nightly?

I was able to simulated the issue on an emulator with Android 6.0 only with geckoview beta 82.0-20200922183749 but I was not able to reproduce on the same device using geckoview nightly 83.0a1-20200922094538, looks like the issue was fixed on GV in that version.

I noticed that on beta we make the request to the GeckoWebExecutor but we are not getting any response back, after 5 minutes (our default time out) the notification change to FAILED, until that we show the indeterminate loading notification. On the other hand, in nightly we get the response back from GeckoWebExecutor right away.

I attached both HAR files for the request on beta and Nightly.

We need the help of the gecko view team to see if the fix is something that we can uplift or wait until the release. cc @snorp @owlishDeveloper.

@Amejia481

Is the issue consistently reproducible only this devices?

This is also reproducible with Motorola Moto G6 (Android 8), Google Pixel 2 (Android 9), Huawei P9 Lite (Android 7), Nexus 5 (Android 6.0.1).

In the same devices above, the issue is not reproducible in nightly?

Yes, on all the mentioned devices, the issue is not reproducible on Nightly 200925 GV 83.0a1 from 9/25.

Thanks @ebalazs-sv!

@Amejia481 I see this issue has "S2" tag - are those typically uplifted?

I'm not really sure, but I think I will depend on how many users the bug will impact.

I don't know the underline details, to deduce the impac the bug will have on users, could you help me to clarify ?

Do you think there is not need to uplift ?

@Amejia481 I understand we don’t know if this issue reproduces in GVE, as well as we don’t know which patch to uplift?

@Amejia481 I understand we don’t know if this issue reproduces in GVE

I think GVE is not using GeckoWebExecutor as it's using the new download API.

as well as we don’t know which patch to uplift?

It could be that you added something recently related to downloads on nightly 83.0a1-20200922094538 that is not present on beta 82.0-20200922183749, as the issue is only reproducible on beta.

I think GVE is not using GeckoWebExecutor as it's using the new download API.

GVE is using the new API starting GV82 (September 3 build).
Your question implies you debugged this and know the reason for the bug?

It could be that you added something recently related to downloads on nightly 83.0a1-20200922094538 that is not present on beta 82.0-20200922183749, as the issue is only reproducible on beta.

There were no patches, aside from the new API, that touched downloads.

GVE is using the new API starting GV82 (September 3 build).
Your question implies you debugged this and know the reason for the bug?

No, I just debugged the AC side and found what I described on https://github.com/mozilla-mobile/fenix/issues/15378#issuecomment-698565203. I just assumed that you fixed the issue on nightly, I'm not sure what could be the underneath GV behaviour between beta 82.0-20200922183749 and nightly 83.0a1-20200922094538

This issue was no known to me, so if it was fixed, it was a side effect of some unrelated patch

@Amejia481 you mentioned to me that there was a plan to test the new onExternalResponse API thoroughly in GVE - has that been done? Did they experience this particular issue while testing?

It looks like it hasn't been tested yet https://github.com/mozilla-mobile/fenix/issues/7531#issuecomment-691096607

Unable to download any apk file, avi file, mp3 file,...

@owlishDeveloper I was able to reproduce the same issue, on nightly (GV 83.0.20200928094830) using the new API on Android 6 only on Android 11 it is working.
You can see the work in progress here,

    java.io.IOException: Unknown error
        at org.mozilla.geckoview.GeckoInputStream.read(GeckoInputStream.java:125)
        at org.mozilla.geckoview.GeckoInputStream.read(GeckoInputStream.java:96)
        at mozilla.components.feature.downloads.AbstractFetchDownloadService.copyInChunks$feature_downloads_debug(AbstractFetchDownloadService.kt:651)
        at mozilla.components.feature.downloads.AbstractFetchDownloadService$performDownload$1$1.invoke(AbstractFetchDownloadService.kt:604)
        at mozilla.components.feature.downloads.AbstractFetchDownloadService$performDownload$1$1.invoke(AbstractFetchDownloadService.kt:87)
        at mozilla.components.feature.downloads.AbstractFetchDownloadService.useFileStreamLegacy$feature_downloads_debug(AbstractFetchDownloadService.kt:798)
        at mozilla.components.feature.downloads.AbstractFetchDownloadService.useFileStream$feature_downloads_debug(AbstractFetchDownloadService.kt:699)
        at mozilla.components.feature.downloads.AbstractFetchDownloadService$performDownload$1.invoke(AbstractFetchDownloadService.kt:603)
        at mozilla.components.feature.downloads.AbstractFetchDownloadService$performDownload$1.invoke(AbstractFetchDownloadService.kt:87)
        at mozilla.components.concept.fetch.Response$Body.useStream(Response.kt:79)
        at mozilla.components.feature.downloads.AbstractFetchDownloadService.performDownload$feature_downloads_debug(AbstractFetchDownloadService.kt:599)
        at mozilla.components.feature.downloads.AbstractFetchDownloadService.startDownloadJob$feature_downloads_debug(AbstractFetchDownloadService.kt:378)
        at mozilla.components.feature.downloads.AbstractFetchDownloadService$onStartCommand$1.invokeSuspend(AbstractFetchDownloadService.kt:270)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

@Amejia481 can you file a bug so that we could look and triage? Thanks!

This is also reproducible on 82.0.0-beta.2 with Samsung Galaxy Tab S3 (Android 8).

I was able to reproduce this issue on Beta 82.0.0-beta.3 with Samsung Galaxy Tab S6 (Android 10).
The download never ends, the file names are not displayed.

Untitled

@owlishDeveloper I was able to reproduce the same issue, on nightly (GV 83.0.20200928094830) using the new API on Android 6 only on Android 11 it is working.

Were you using an actual device with Android 6 or an emulator? If the latter, are you running Mac or Linux? Can you describe your emulator config?

@owlishDeveloper I was able to reproduce the same issue, on nightly (GV 83.0.20200928094830) using the new API on Android 6 only on Android 11 it is working.

Were you using an actual device with Android 6 or an emulator? If the latter, are you running Mac or Linux? Can you describe your emulator config?

I was using an emulator on Mac, below the description

image

I was testing with GV: 83.0a1-20201006041051, and I wasn't able to reproduce any more. QA team could you please try in the latest nightly. Thanks in advance!

@Amejia481 this issue only occurs on Beta 82.0.0 builds.
Tested on Google Pixel (Android 10), and Samsung Galaxy Tab S6 on the latest Beta build 82.0.0-beta.4 with GV 82.0-20201002191150.
I was able to download .zip files from https://www.thinkbroadband.com/download, but not able to download .pdf files from file-examples.com or www.w3.org - please see the attached screenshots:

pdf download

I'll remove the qa:needed label for now.

PS: I was not able to reproduce this issue on the latest Nightly from 10/7 with GV 83.0a1.

Thanks @softvision-miralobontiu :)

Since we're merging 82 to release next week, it sounds like we will just ship with this.

Looking through the thread, we were unable to find a GV commit to uplift, and the bug had just disappeared?

@Amejia481 or @owlishDeveloper is there any telemetry on whether or not downloads fail? Since this isn't a crash, I can't tell how many users this affects, but it seems like it _could_ be very common. I'd feel more comfortable letting this ride the 83 train if we could validate that this does not affect a ton of users. Otherwise, users will not be able to download files for a month, and many of them will seek out another browser.

We can also monitor the ratings and reviews, and see if there is an uptick in complaints about downloads failing, but I'd prefer telemetry if we have it.

It still persists - 82.0.0-beta.6
Unable download files (mp3, apk,...). Just try:
Downloading failed: https://uloz.to/file/e74R3cOyUUdX/le-mix-de-pmc-400-edition-special-mp3
Downloading animation loop without downloading: https://www.apkmirror.com/apk/rahul-verma/videoder/videoder-14-4-2-release/videoder-video-downloader-14-4-2-android-apk-download/

@Amejia481 or @owlishDeveloper is there any telemetry on whether or not downloads fail?

@liuche I think we don't have telemetry to tell, will be a good idea to add it for future similar issues.

We can also monitor the ratings and reviews, and see if there is an uptick in complaints about downloads failing, but I'd prefer telemetry if we have it.

Unfortunately the only, data that I can think of is checking the reviews. This could be a bit murky as before recently introducing the new download api on nightly we have a lot of issue with downloads, and other issues could get confused with this one. I think we should be searching by specific key words like: Downloads never finish, download is started but never ends, animation loop without downloading and similar phrases.

Maybe QA could try to download in multiple common sites, like 30 or more sites and see how offend this occur, what do you think?

@owlishDeveloper do we have a way to track the issue on the GV side?

Another site where this issue is present see https://github.com/mozilla-mobile/fenix/issues/14461#issuecomment-713563181

This issue is verified as fixed on Nightly 10/26 and Beta 83.0.0-beta.1 10/21 with Samsung Galaxy Tab S3 (Android 8).

The issue is still reproducible on Release 82.1.1 GV 82 from 10/21 with Samsung Galaxy Tab S3 (Android 8) on some sites and with different scenarios:

Reproducible on the following sites:

Not reproducible on the following sites:

@Amejia481 Let me know if there are other sites that must be tested so we can see how often this issue reproduces on the Release build.

Thanks @ebalazs-sv !

@liuche @owlishDeveloper

This issue is verified as fixed on Nightly 10/26 and Beta 83.0.0-beta.1 10/21 with Samsung Galaxy Tab S3 (Android 8).

The issue is still reproducible on Release 82.1.1 GV 82 from 10/21 with Samsung Galaxy Tab S3 (Android 8) on some sites and with different scenarios:

Reproducible on the following sites:

* https://www.thinkbroadband.com/download - reproducible after many downloads;

* https://file-examples.com - reproducible with documents files;

* [www.w3.org](http://www.w3.org) - reproducible with .pdf files;

* [www.pdf995.com](http://www.pdf995.com) - reproducible;

* https://www.google.com - partially reproducible when downloading links with pdf files. The file is downloaded, only the details are missing in the notification.

Not reproducible on the following sites:

* https://edition.cnn.com;

* https://mobile.twitter.com;

* https://m.facebook.com;

* https://le.ac.uk;

* https://www.ebay.com;

* https://m.youtube.com

@Amejia481 Let me know if there are other sites that must be tested so we can see how often this issue reproduces on the Release build.

@liuche @owlishDeveloper this could give us a better perspective

Looking at our telemetry, the absolute upper bound for downloads hitting this issue (if we were to assume every single "cancel" or "pause" action is a result of this bug) is about 8.5% but the real incidence of this is probably much lower, probably in the low-digit %, probably less than 1-2%.

For that, I think we can feel comfortable about letting this ride the trains in 83 Beta to 83 release in November.

Thank you for your investigation, ameijia, owlish, and ebalazs 🙏

This issue reproduces on RC 82.1.2 (GV 82.0.2-20201027185343), with Samsung Galaxy Tab S6 (Android 10) on file-examples.com.
I tried to download an .avi file, but the download is constantly in progress without downloading the file, and the file name is missing.

@liuche @owlishDeveloper we have some reports of the this issue here

@owlishDeveloper the user shared some interesting information about downloads work in private tabs but not in normal one that could be a hint for this case.

This has been going on a long time now for such an important broken feature. It's become quite a public issue, see here: https://github.com/M66B/FairEmail/releases

This issue should be fixed in Firefox 83.

@pascalchevrel also saw some problems with .docx today

@Amejia481 " Can't simultaneously download files" is one thing, but for me, I couldn't download one single thing.
I wanted to download Magisk yesterday, don't I couldn't.
For only a 3.01 MB file, it's not showing any progress of downloading. It could take forever to download.
So, I have to install Edge from Playstore which has improved a lot lately.
Hope this bug resolve soon.

Firefox: 82.1.3
OS: Android 11

@PranavBhattarai are you able to reproduce in Beta or nightly ? The issue should be fixed in Firefox 83.

@Amejia481 No, I rather wait for 83. I really really hope this issue doesn't come back.

Fixed for me on 83.1 !

I can confirm this . Under 83.1. the download works again.

Yes it works.

Verified as fixed on Release 83.1.0 (Build #2015776401) GV 83 from 11/18 with Samsung Galaxy Tab S3 (Android 8).
I will close this issue.

Was this page helpful?
0 / 5 - 0 ratings