Closed Bug 1621533 Opened 6 years ago Closed 6 years ago

Firefox on Android 10 unable to open downloaded APK files

Categories

(Firefox for Android Graveyard :: Download Manager, defect)

Firefox 68
defect
Not set
normal

Tracking

(firefox-esr6875+ fixed)

VERIFIED FIXED
Tracking Status
firefox-esr68 75+ fixed

People

(Reporter: matteochirco, Assigned: petru)

References

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0

Steps to reproduce:

  1. Download an apk from https://www.apkmirror.com/apk/grubhub/grubhub-food-delivery-takeout/grubhub-food-delivery-takeout-7-85-release/grubhub-local-food-delivery-restaurant-takeout-7-85-android-apk-download/

  2. Wait for download to finish.

  3. Tap the notification or snackbar to open

Actual results:

It launches a context menu prompting an app to open with.

Expected results:

The package installer should have opened.

Attached video Video of the problem

Thanks Leon for the report!

This is easily reproducible indeed on Android 10 devices.
In my limited testing I saw that it doesn't seem to affect other Android versions and also that Fenix isn't affected.

The issues seems to happen because of this check where we try to be proactive and make sure there is an app installed on the device that can handle the downloaded file once the notification is tapped.
For some reason that platform check returns 0. Don't really see what could have changed in the meantime and I doubt this is an old problem with the platform that we haven't caught by now.

Assignee: nobody → petru.lingurar
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

Android Nougat came with the recommendation to expose files through a
FileProvider (content:// in place of file://).
Seems like Android 10's PackageInstaller imposes this behaviour - to be able to
install dowloaded apks we need to offer them through a FileProvider.
Or use the Android's PackageInstaller.

There are currently 2 options users have to install an apk directly from the
application:

  • tapping the notification of a completed apk download - fixed by this patch
  • opening a downloaded apk from "about:downloads" - will still be broken. A
    solution for this scenario involves a major rethinking of how we handle
    downloads.

The download functionality works ok on all platforms, including Android 10 so
users will still be able to go with a file manager to the Downloads folder of
their device and manually install a previously downloaded apk from there.

Flags: qe-verify+

Thank you Petru.

The priority flag is not set for this bug.
:st3fan, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(sarentz)
Attached image 20200326_124733.gif

Verified the issue on the build provided in comment 4, with Samsung Galaxy Note 10 (Android 10). The app was installed - from the notification bar, or if "Open" was tapped, about:downloads page was displayed.
Verified other .apk (Fennec) and the builds were installed from the notification bar, but if we tapped the entries in about:downloads, nothing is displayed. Video attached.

Flags: qe-verify+

Thanks Sorina!

It's interesting that there are differences in how different apk's are handled in js, but in both cases the issue still exists - users are not presented with the option to install the apk when trying this in about:downloads.
I think this is a limitation that we'll have to live with for a little bit more time.

Comment on attachment 9134753 [details]
Bug 1621533 - Expose downloads through FileProvider on Nougat+; r?AndreiLazar

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Allow users on Android 10 to install downloaded apks
  • User impact if declined: Fennec downloaded apks cannot be installed on Android 10 devices.
  • Fix Landed on Version:
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Not risky - Small change, verified by QA.
  • String or UUID changes made by this patch:
Attachment #9134753 - Flags: approval-mozilla-esr68?

Comment on attachment 9134753 [details]
Bug 1621533 - Expose downloads through FileProvider on Nougat+; r?AndreiLazar

approved for fennec 68.7

Attachment #9134753 - Flags: approval-mozilla-esr68? → approval-mozilla-esr68+

Verified as fixed on 68.7.0 with Google Pixel 4 XL (10).

Note that I installed apks 15 times+ from the notification bar and it was successful every time.
Also, please when opening the about:downloads when trying to open the apk from there it cannot be installed.

Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Flags: needinfo?(sarentz)
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: