Fenix: FNX-2437 ⁃ Fenix should use Gecko's downloading streaming API instead of the Android manager

Created on 16 Apr 2019  ·  15Comments  ·  Source: mozilla-mobile/fenix

Steps to reproduce

  1. Visit https://ebookclub.tor.com/ and provide an email address to prove you've signed up (sorry, the download's behind an account. Maybe other downloads are similarly affected, I don't know.)
  2. Download the .epub edition of Cory Doctorow's "Walkaway"

Expected behavior

  1. The download completes properly and is about 1.36MB in size.
    (This is what happens when I do this with Firefox for Android Beta)

Actual behavior

  1. The download "completes" at 25.79KB, and is an invalid file

Device information

  • Android device: Samsung Galaxy A5
  • Fenix version: 1.0.1916 build#11051220 68.0a1-20190408104625
Download P2 🐞 bug

Most helpful comment

@mheubusch I can't speak to how much engineering work it is to block Fenix from using Android download manager but my recommendation is to keep the basic download functionality (which still covers most use cases) until the GV API is ready.

All 15 comments

If you poke at the file with a text editor is it something text based (html, etc) or binary?

*copies it off of the device*

Oh, look, it's the HTML of the download page. Interesting.

@cpeterso does this sound like a GV bug and do we have one filed for it?

We have some Fennec bugs about file downloads, but I filed a new GV bug for this STR: https://bugzilla.mozilla.org/show_bug.cgi?id=1544955

Could be caused by us not forwarding GV cookies to the download manager?

Could be caused by us not forwarding GV cookies to the download manager?

Yes. Fenix is using the Android download manager instead of Gecko and the Android download manager doesn't have the user cookies (as suggested in GV bug https://bugzilla.mozilla.org/show_bug.cgi?id=1476364).

@snorp thinks Fenix should use Gecko's downloading streaming API instead of the Android manager.

Since we already removed the download icon from the Quick Action Bar, and if this proves challenging or time-consuming to implement, could we remove the ability to download files altogether for MVP? @vesta0 LMK if you think this is an option.

@mheubusch I can't speak to how much engineering work it is to block Fenix from using Android download manager but my recommendation is to keep the basic download functionality (which still covers most use cases) until the GV API is ready.

I agree that it's probably best to leave this alone for MVP, but just wanted to clarify that the GV API is mostly ready. You need to make a second request (as Fenix does today), but it will use Gecko's cookies.

Thanks @vesta0 - so this is just a use case where we need to supply credentials to a site before initiating the download? I think I understand better now. Thanks for updating the labels and lmk if we should move this out of the Fenix backlog altogether for MVP.

The new gecko downloader is being tested in Reference Browser, when should we switch Fenix?

Same issue here with download links for stack-storage. Example: https://wkursten.stackstorage.com/s/Y8hkexL8qDTXVVb. Android notification: <Untitled> Download unsuccessful.

Unfortunately this issue still happens. Downloading the 1.5MB ebook instead results in a 27KB file on disk.

Fenix version: 200211 06:01 (build 20420611)

kbrosnan points out that this is probably a dupe of #7531. Let's take it there.

Was this page helpful?
0 / 5 - 0 ratings