The .apk file will be opened so that you can install that Fenix build.
Only a error message appears: "Can't open file".
Doing exactly the same steps in Firefox works.
The file cannot be opened because you have to enable "Install unknown apps" permission in device settings (for individual apps). This is compulsory for app starting Android 8.0 (Oreo). For order versions the "Install papa from external" settings must be enabled from Settings > Privacy and Security.
There should be a good UX flow here.
I have android 7.1.1 and it doesn't work for APKs downloaded by Fenix. APKs downloaded by Fennec on the other hand can be installed just fine.
@reinhart1010 On my device Fenix already has the permission and it doesn't work, so this can't be the reason.
And AFAIK, the "install apps" permission should work somewhat like the other runtime permissions, i.e. the OS will prompt you about it and ask you whether you want to enable the permission for that app.
Does anyone already have an idea what the reason is why downloaded files cannot be opened? Is this a Fenix / AC / GV issue?
Some investigation shows this applies to all files including things like PDFs, so it's not specific to APKs.
Seems this is not the case.
@sblatz is this issue specific to some devices or Android versions? It works for me.
I'm seeing this on my Galaxy S9 on 9.0.0. @vesta0 do all files open normally on your Pixel?
@sblatz I haven't tried all file types but APKs and PDFs work as long as they are not on a page requiring authentication.
This also happens on my OnePlus 5. I cannot install Fenix by downloading the Fenix APK with Fenix. Maybe listing the phones/OSes here that have the issue, helps understanding it.
There some combined issues here:
The default file manager is not understanding the file extension as the file ends on "target.aarch64.apk", the file manager doesn't know how to handle this file type and shows the message "Can't open file".
This can be demonstrated by downloading another apk file that the file name ends on ".apk" like https://github.com/mozilla-tw/FirefoxLite/releases/download/v1.7.0/Firefox-Lite-12623.apk. You will be able to download it and install it without issues.
Also, you can try by using another file manager like asus.filemanager.
1) Download the "target.aarch64.apk" with Fenix.
2) If you already have Fenix from the Play Store deleted it (See 2 You may be trying to install the same app that you already have installed)
3) Navigate to download folder and open the apk. It should work as expected. On Android 7 or below be aware of https://github.com/mozilla-mobile/fenix/issues/3890.
The target.aarch64.apk file has the same app id as the one on the play store, you are not going to be able to install both at the same time.
@cadeyrn Let me know if that works for you.
@mitchhentges Check the _ The default file manager is not understanding the file extension as the file ends on "target.aarch64.apk",_ part - maybe we want to change the naming of the resulting APKs because it is useful to being able to download them from TC.
Created #3893 :)
Firefox Lite APK works in Fenix @Amejia481
The Fenix build works fine in Fennec, it's broken only in Fenix. Same apk file.
@andreicristianpetcu in Fenix we are relaying for now on the default Android download manager while in Fennec we are using a custom download provider. We are working on improving downloads with our custom provider on https://github.com/mozilla-mobile/android-components/issues/1968 that will fix this and other related issues.
To clarify: It sounds like this issue can be closed since #3893 addresses specifically nightly builds failing to open and https://github.com/mozilla-mobile/android-components/issues/1968 addresses implementing a custom download manager?
@sblatz the gecko download manager issue was closed. When will we see it in Nightly?
@andreicristianpetcu I think It will be introduced to Fenix after further testing cycles.
It sounds like andrei is still running into this issue.
@andreicristianpetcu, can you confirm that you're not being affected by either cause described by Amejia? If you are indeed still running into this problem due to a different cause, then please re-open this ticket so we can track down the issue.
(if this comment double-posts, it's because GitHub appeared to lose my comment the first time)
@mitchhentges I'm not trying to install the same file. Once I download the file with Fenix, I can install it with a different file manager.
I will wait for the fancy new a-c download manager :)
Related to my other comment. I can install apk files in nightly without the need of an external file manager. Pretty nice!
Most helpful comment
To clarify: It sounds like this issue can be closed since #3893 addresses specifically nightly builds failing to open and https://github.com/mozilla-mobile/android-components/issues/1968 addresses implementing a custom download manager?