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

downloaded file has bin extension instead of opensudoku #17263

Closed
maurerle opened this issue Dec 30, 2020 · 13 comments
Closed

downloaded file has bin extension instead of opensudoku #17263

maurerle opened this issue Dec 30, 2020 · 13 comments
Assignees
Labels
🐞 bug Crashes, Something isn't working, .. eng:qa:verified QA Verified Feature:Download needs:ac Needs Android Component Work S3 Blocks non-critical functionality and a work around exists

Comments

@maurerle
Copy link

maurerle commented Dec 30, 2020

Downloading new sudokus for the opensudoku app from their website:
https://opensudoku.moire.org/ downloads a file with bin extension instead of opensudoku extension which is why it can not get recognized by the app.

Steps to reproduce

  1. Open https://opensudoku.moire.org/sudoku/easy.opensudoku in Fennec Android downloaded from F-Droid
  2. Downloaded file gets saved as easy.bin instead of easy.opensudoku

Expected behavior

File gets saved as easy.opensudoku

Actual behavior

Device information

  • Android device: Redmi Note 7 lavender (reproduced on a samsung too)
  • Fenix version: Fennec 84.1.2 from F-Droid

┆Issue is synchronized with this Jira Task

@maurerle maurerle added the 🐞 bug Crashes, Something isn't working, .. label Dec 30, 2020
@github-actions github-actions bot added the needs:triage Issue needs triage label Dec 30, 2020
@sflorean
Copy link
Contributor

I wasn't able to reproduce the issue on Nightly 30/12 with Xiaomi Redmi Note 8T (Android 9).

@maurerle
Copy link
Author

I just downloaded Firefox for Android Beta from the Play Store which is Version 85.0.0-beta.4 and could reproduce the issue on Android 10.
The other device which reproduced the issue is also running on Android 10?

@maurerle
Copy link
Author

Just tested current Firefox Nightly 201229 and could also reproduce the issue

@sflorean
Copy link
Contributor

Thanks @maurerle for the extra info, I was able to reproduce it on an Android 10 devices.

@sflorean sflorean added Feature:Download and removed needs:triage Issue needs triage labels Dec 30, 2020
@maurerle
Copy link
Author

The .bin extension seems to come from here:
https://github.com/mozilla-mobile/android-components/blob/51bd9843331f62f63cdef5f9c98361198158c67d/components/support/utils/src/main/java/mozilla/components/support/utils/DownloadUtils.kt#L148-L152

It is unclear to me why this code branch is taken as the filename obviously contains a dot?

the mime-type of the file is [application/octet-stream]

@evilpie
Copy link

evilpie commented Jan 4, 2021

I suspect what might happen is that changeExtension changes the extension for files with the MIME type application/octet-stream. @Amejia481

@Amejia481 Amejia481 added the S3 Blocks non-critical functionality and a work around exists label Jan 4, 2021
@Amejia481
Copy link
Contributor

Thanks for the report I added the issue to our backlog

@Amejia481
Copy link
Contributor

The fix should be in master, QA team please help us to verify. Thanks in advance!

@Amejia481 Amejia481 added the eng:qa:needed QA Needed label Jan 29, 2021
@Amejia481 Amejia481 self-assigned this Jan 29, 2021
@Amejia481
Copy link
Contributor

I suspect what might happen is that changeExtension changes the extension for files with the MIME type application/octet-stream. @Amejia481

The problem was that we were not considering generic MIME types you can see more details on mozilla-mobile/android-components#9526 and mozilla-mobile/android-components#9526 :)

@maurerle
Copy link
Author

maurerle commented Jan 29, 2021

Thanks @Amejia481! when will the fix be available in Firefox Nightly?

@Amejia481
Copy link
Contributor

It should be available in the next update. You can check the version by going to Settings -> About Firefox Nightly the AC version should be 73.0.20210128143151 or higher

@maurerle
Copy link
Author

Yes its working now. Tested with current Firefox Nightly.
Thank you!

@sflorean
Copy link
Contributor

sflorean commented Feb 1, 2021

I can confirm that this is also fixed in latest Nightly builds. Closing as verified.

@sflorean sflorean closed this as completed Feb 1, 2021
@sflorean sflorean added eng:qa:verified QA Verified and removed eng:qa:needed QA Needed labels Feb 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Crashes, Something isn't working, .. eng:qa:verified QA Verified Feature:Download needs:ac Needs Android Component Work S3 Blocks non-critical functionality and a work around exists
Projects
None yet
Development

No branches or pull requests

5 participants