Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

[Bug] Cannot open ZIP file after downloading from Fenix #10428

Closed
kglazko opened this issue May 6, 2020 · 20 comments
Closed

[Bug] Cannot open ZIP file after downloading from Fenix #10428

kglazko opened this issue May 6, 2020 · 20 comments
Assignees
Labels
🐞 bug Crashes, Something isn't working, .. E5 Estimation Point: about 5 days eng:qa:verified QA Verified Feature:Download S3 Blocks non-critical functionality and a work around exists
Milestone

Comments

@kglazko
Copy link
Contributor

kglazko commented May 6, 2020

Steps to reproduce

Download ZIP file
Wait for 'Download Completed' notification
Press 'Open' button

Expected behavior

I will be taken to the ZIP file in my Files app

Actual behavior

I am given a notification that says 'Cannot Open File'

Device information

  • Android device: Pixel 4
  • Fenix version: ?

┆Issue is synchronized with this Jira Task

@kglazko kglazko added 🐞 bug Crashes, Something isn't working, .. Feature:Download labels May 6, 2020
@github-actions github-actions bot added the needs:triage Issue needs triage label May 6, 2020
@eliserichards eliserichards removed the needs:triage Issue needs triage label May 6, 2020
@kglazko kglazko self-assigned this May 8, 2020
@kglazko
Copy link
Contributor Author

kglazko commented May 11, 2020

Investigation results: Upon checking after-download behaviors, Fennec will open its own about:downloads page and show the Zip file in the list, but will do nothing upon clicking it. Chrome will also show the download in-browser in the downloads section, and upon clicking clicking will show a 'Cannot Open File' snackbar message.

The difference in the interactions is that you can see the Zip has been successfully downloaded, at least shows in the Downloads list- even if you can't open it. That makes it seem more like a limitation of a browser vs. a potential error with a Zip download.

Proposed solutions:

  • Display a different message for Zipfiles in the Snackbar (i.e. Cannot Open Zip Files)
  • Display a different message for Zipfiles in the Snackbar and include an 'Open Files' link that will take users to their default File Manager where they can see the downloaded Zip file.
  • Implement a visual Download Manager in the future

@vesta0 @liuche @Amejia481

@vesta0
Copy link
Collaborator

vesta0 commented May 12, 2020

Thanks for investigating @kglazko ! Let's go with your first proposed solution for now until we build the Downloads interface #4417

@kglazko
Copy link
Contributor Author

kglazko commented May 21, 2020

See mozilla-mobile/android-components#7064 for PR

@liuche liuche added the E5 Estimation Point: about 5 days label May 22, 2020
@liuche
Copy link
Contributor

liuche commented Jun 22, 2020

This should have a new string explaining what is/is not possible in the UI.

@liuche liuche added the eng:qa:needed QA Needed label Jun 22, 2020
@AndiAJ
Copy link
Collaborator

AndiAJ commented Jun 23, 2020

Hi, I've just checked this matter on the latest Nightly Build 200623 from 6/23 using the following devices:
• Google Pixel 3a (Android 10)
• Huawei Mate 20 Lite (Android 9)
• OnePlus A3 (Android 6.0.1)

Depending on the device, after tapping "Open":

  1. The user isn't re-directed to the stock File manager, the snackabar with the Old String is displayed ("Could not open file") in Fenix
  2. The user is redirected to the stock File manager app displaying an error message
  3. If the user has additional File manager apps he will be redirected to those apps and an error message will be displayed

► Video from Google Pixel 3a - Stock File Manager
20200623-120513

► Video from Google Pixel 3a - having another File Manager app installed
20200623-120430

► Video from Huawei Mate 20 Lite - Stock File Manager
20200623-120313

@kglazko - Please review and share your thoughts. ☺️
I'll remove the QA needed label until further notice.

@AndiAJ AndiAJ removed the eng:qa:needed QA Needed label Jun 23, 2020
@kglazko
Copy link
Contributor Author

kglazko commented Jun 23, 2020

@Amejia481 Oh no this is definitely not the right behavior- did this get rolled out in AC or something? Or did this AC that had our changes ever land in Fenix?

@kglazko
Copy link
Contributor Author

kglazko commented Jun 24, 2020

In #7048 @Amejia481 left a comment when merging suggesting we update this string so that translators see it. I didn't notice it and didn't create a follow up PR until now, and I think this is why we may be seeing the issues, especially since new l10n landed recently.

@flodolo
Copy link

flodolo commented Jun 26, 2020

In #7048 @Amejia481 left a comment when merging suggesting we update this string so that translators see it. I didn't notice it and didn't create a follow up PR until now, and I think this is why we may be seeing the issues, especially since new l10n landed recently.

Is that the right PR? I don't see any comment about changing strings in #7048, and as far as I can tell, that string never changed while I was managing merges
https://github.com/kglazko/android-components/commits/38d14391ff03206d944779845ca312e3dec599a8/components/feature/downloads/src/main/res/values/strings.xml

To be clear, it's too late to undo this, but I'd like to understand if I'm missing something.

@kglazko
Copy link
Contributor Author

kglazko commented Jun 26, 2020

I'm sorry, that is not the right PR, I copy-pasted from Android Components and it linked the wrong issue. mozilla-mobile/android-components#7048 Should be the correct one!

@flodolo
Copy link

flodolo commented Jun 26, 2020

I'm sorry, that is not the right PR, I copy-pasted from Android Components and it linked the wrong issue. mozilla-mobile/android-components#7048 Should be the correct one!

Thanks. After looking at the PR, it doesn't seem to me that the string was changed. As far as I can tell, it landed directly with the correct value

<string name="mozac_feature_downloads_open_not_supported">No app found to open %1$s files</string>

@vesta0 vesta0 added the eng:qa:needed QA Needed label Jul 14, 2020
@AndiAJ
Copy link
Collaborator

AndiAJ commented Jul 16, 2020

Hi, I've just re-checked this on the latest Nightly Build 200716 from 7/16 using the following devices:
• Google Pixel 3a (Android 10)
• Huawei Mate 20 Lite (Android 9)
• OnePlus A3 (Android 6.0.1)

Still, the "Could not open file" message is displayed if the File manager can't open zip files.

►Video
20200716-135207

@kglazko - Please review and share your thoughts

@AndiAJ AndiAJ removed the eng:qa:needed QA Needed label Feb 18, 2021
@Amejia481
Copy link
Contributor

Thanks @AndiAJ, I will take a look.

@Amejia481
Copy link
Contributor

Hi, I've re-checked this matter on the latest Nightly 210218 using the following devices:
• Google Pixel 3a (Android 11)
• OnePlus A3 (Android 6.0.1)

❓ On Both devices, the "Could not open file" message is displayed with the Stock File manager.
► Video
20210218_161717.mp4

✔️ I've installed the following File managers:
• Google Pixel 3a (Android 11) ➡️ File Manager
• OnePlus A3 (Android 6.0.1) ➡️ CX File Explorer

In both cases after tapping the "Open" button the .Zip file is properly opened in the file manager.

► Video
• Google Pixel 3a (Android 11) ➡️ File Manager
20210218_163102.1.mp4

► Video
• OnePlus A3 (Android 6.0.1) ➡️ CX File Explorer
20210218_164539.mp4

@eliserichards and @Amejia481 - Please review and share your thoughts ☺️

@AndiAJ we put a patch for improving the message when we can't not find an app for opening the file, it should be in master.

@Amejia481 Amejia481 added the eng:qa:needed QA Needed label Feb 24, 2021
@lobontiumira
Copy link

Hi all!
I downloaded .zip files from multiple websites (thinkbroadband.com/download, learningcontainer.com, and file-examples.com), using a Google Pixel (Android 10), and a Sony Xperia Z5 Premium (Android 7.1.1).
After tapping on the "Open" button from the "Download complete" snackbar, I was redirected to the stock File manager.
I got the following error message "The archive is either in unknown format or damaged" on some downloaded files.

Not sure if this is the expected behavior. I'll remove the qa:needed label until further notice.

@lobontiumira lobontiumira removed the eng:qa:needed QA Needed label Feb 25, 2021
@lobontiumira
Copy link

Hi @Amejia481
I've retested the issue on the 3/2 Nightly build with OnePlus 5T (Android 10) on the https://www.thinkbroadband.com/download, and got this snackbar "No app found to open zip files".
On RC 86.1.1, and beta 87.0.0-beta.2 build, the snackbar message is "Could not open file".

The proposed and agreed upon solution eas to "Display a different message for Zipfiles in the Snackbar (i.e. Cannot Open Zip Files)".

Could you please review, and let us know if the new behavior is the expected one?

@Amejia481
Copy link
Contributor

We are using the "No app found" message because when we download a file Fenix doesn't open the file itself it delegates to any app available on the device that can open that type of file, and when we can't find an app that is able to open the file we show the message, if later the user installs an app that can handle that type of files we will be able to open the download file via the new app. This message is more clear about why we can't open the file and let users know that have to install an app for handling that type of file as the previous message give the impression that Fenix is the one that can't open the file.

@lobontiumira
Copy link

Thanks, Arturo!
Indeed, after installing an app that can read the .zip files, tapping the "Open" button, redirects the user to that app.
I'll close this issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Crashes, Something isn't working, .. E5 Estimation Point: about 5 days eng:qa:verified QA Verified Feature:Download S3 Blocks non-critical functionality and a work around exists
Projects
None yet
Development

No branches or pull requests

8 participants