Closed Bug 1852871 Opened 2 years ago Closed 11 months ago

Corrupted/Missing download after moving previous file with same name to a different folder

Categories

(Firefox for Android :: Downloads, defect)

Firefox 117
All
Android
defect

Tracking

()

RESOLVED DUPLICATE of bug 1812788
Tracking Status
firefox124 --- affected

People

(Reporter: dcthelord, Unassigned)

References

Details

(Whiteboard: [qa-triaged][fxdroid][group4])

Steps to reproduce:

  1. Download a apk (I downloaded https://github.com/Helium314/openboard/releases/download/v1.4.5_new_v7/openboard_1.4.5-release.apk)
  2. After download, move it away from Download folder (I moved it to /Backup/APPs(Non Play Store)/Openboard)
  3. Restart the phone
  4. Redownload the same apk

Actual results:

Re-Download finishes successfully, but does not show in Download folder.
Also opening it directly, it fails to open file (This second issue happens intermittently, not always)
(Android 12. Samsung S10+)

Expected results:

New download should be saved to Download folder.

See Also: → 1812788

The severity field is not set for this bug.
:mavduevskiy, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(mavduevskiy)

I was not able to reproduce this issue on the latest release of Firefox for Android 119, nor on the latest Nightly 120.0a1 from 10/23.
Tested with Xiaomi Mi8 Lite (Android 10), and Samsung Galaxy Note 8 (Android 9).

Could you provide us more details:

  • is this issue happening only for .apk files?
  • is this issue happening only when downloading from the website mentioned in the first step?

Thank you!

Flags: needinfo?(dcthelord)
Whiteboard: [qa-triaged]
Severity: -- → S4
Priority: -- → P5

I have this problem as well. I believe there is new functionality in Android which helps it determine whether the file already exists locally.

First of all here is how to reproduce it:

  1. open Firefox/Chrome
  2. go to https://newpipe.net/
  3. download NewPipe
  4. move the downloaded file from /0/Download/ to a directory, for example /0/APKs/
  5. download NewPipe again

Firefox will overwrite the file in /0/APKs/, whereas Chrome will ask you if you want to download the file "again". If you accept the prompt from Chrome, it will download the file again, store it in /0/Download/, and append (1) at the end f the filename.

Note: between step 4 and 5, deleting private data of any browser (or even using private mode) changes nothing to this behaviour.
Note: this happens to all filetypes, I know certainly it happens to .apk and .jpg files

Now this wouldn't be the end of the world, since it just overwrites the exact same file (trying to create a file with the exact same name, Firefox will just leave it alone), but not always, and unfortunately I don't know when this issue happens: I had a .jpg image downloaded with a generic name (something-wallpaper.jpg), I had it moved to /0/Pictures/Wallpapers/ and upon downloading a completely different image, but with the exact same name, Firefox just overwritten the one from /0/Pictures/Wallpapers/.

My wallpaper aside, this can be potentially dangerous to user's data. I have tried enabling "External download manager" option in Firefox, but this behaviour doesn't change.

Phones tested:
Samsung S22 Ultra running Android 13 and Android 14
Samsung S23 Ultra running Android 13 and Android 14
ZTE Nubia RedMagic 8S Pro running Android 13

All phones on all the forementioned Android versions are affected.

Another thing I just discovered: If the file has been downloaded with Firefox first, then moved to /0/APKs/, Chrome won't ask if I want to download the file again. It will just download it once more, and store it in /0/Download/, without (1) appended at the end.

Same for Firefox. If the file was initially downloaded with Chrome and moved to /0/APKs/, Firefox will leave taht file alone and simply download write it into the /0/Download/ again.

I am still unable to reproduce this issue.
I've done the steps provided by the two reporters, and everything works fine, the files are downloaded every time in the default folder "downloads".
Tested on Firefox for Android Nightly 125.0a1 from 3/18, and Firefox for Android 124.0, with a Samsung Galaxy A14 (Android 13), and Samsung Galaxy S24 (Android 14).

Could you, please, retry on your end with your devices, on the latest 124.0 build?
Thank you!

Flags: needinfo?(mavduevskiy) → needinfo?(dragos.slash)

Redirect a needinfo that is pending on an inactive user to the triage owner.
:007, since the bug has recent activity, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(dcthelord) → needinfo?(nbond)

I just tried it on 124.1.0, using an S24 Ultra running Android 14. Yep, the problem still persists. Firefox insists overwriting the file in the /0/APKs/newpipe/ instead or writing a new one in /0/Download/.

Flags: needinfo?(dragos.slash)

I recorded a couple of videos as well:
Chrome v122: https://files.catbox.moe/pnnfj0.mp4
Firefox v124: https://files.catbox.moe/ypaypu.mp4

For demonstration sake, I have used the same file, since it has the same name. But this behaviour can be a lot more destructive, Firefox just overwriting a file with a different checksum, just because they have the same name.

Thank you for the additional details and short videos.
Unfortunately, I'm still unable to reproduce it on the latest Fenix Nightly 126.0a1, or Firefox for Android 124.1.0.
Tested with Samsung Galaxy S24 (Android 14).

I'll confirm this issue based on your short video.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(nbond)
See Also: → 1825477
See Also: → 1812789

This bug should be severity S2 because it causes data loss. A Reddit user reported seeing this bug yesterday. Saving a file will overwrite any existing file with the same name regardless of folder location.

https://www.reddit.com/r/firefox/comments/1hg28or/downloading_anything_on_ff_mobile_will_save_over/

Severity: S4 → S2
Priority: P5 → --
Whiteboard: [qa-triaged] → [qa-triaged][fxdroid][group4]
Status: NEW → RESOLVED
Closed: 11 months ago
Duplicate of bug: 1812788
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.