Closed Bug 1825477 Opened 2 years ago Closed 1 year ago

Cannot download the same file if previously it was a failed download

Categories

(Firefox for Android :: Downloads, defect, P2)

Firefox 113
All
Android
defect

Tracking

()

RESOLVED FIXED
130 Branch
Tracking Status
firefox112 --- wontfix
firefox113 --- wontfix
firefox130 --- verified

People

(Reporter: cristi.nechita, Assigned: giorga)

References

Details

(Whiteboard: [geckoview:m114?] [fxdroid] [group4])

Attachments

(3 files, 1 obsolete file)

Preconditions:

You have "Downloads" folder empty.

Steps to reproduce

  1. Open app. Open the next link: http://xcal1.vodafone.co.uk/
  2. Download "Very Large File 1 GB (1,024 MB)" by pressing on "80" button.
  3. Wait until the file reaches 10% of download (look in progress bar) and disable wifi.
  4. Go to "Files" App and delete the current interrupted downloaded file.
  5. Enable wifi. Re-download the same file (same 80" button).

Expected behavior

File is succesfully delete. File can be again downloaded.

Actual behavior

Cannot delete the interrupted download file.
When new download starts, "Download failed" error is displayed in Firefox and in Notifications.

Device information

  • Firefox version: Nightly 113.0a1 (2023-03-29), Beta 112.0b8 (2023-03-28)
  • Android device model: OnePlus 5 (A5000)
  • Android OS version: Android 10
Severity: -- → S2

Additional info if needed:
I repeated the same scenario with Google Chrome and I stopped the wifi (step 3) - downloading process is on hold because is waiting for the network. You have 2 options: "Pause" and "Cancel".

  • If you press "Pause" , enable the wifi and
    a. press "Resume" - download process is resumed.
    b. press "Cancel" - download process is canceled. You can re-download the file with no errors.
  • If you press "Cancel", enable the wifi and try again to download the same file - you can download the file with no errors.
Priority: -- → P2
Whiteboard: [geckoview:m114?]
Assignee: nobody → giorga
Assignee: giorga → nobody

I cannot reproduce this with an Android 10 device ( Nokia ).
Can QA try to reproduce this issue on a different device? TY!

Flags: qe-verify+

I was not able to reproduce this issue on Lenovo tab M10 (Android 10), Oppo Find X3 Lite (Android 11), and Xiaomi Mi8 Lite (Android 10).
We will retest on the OnePlus 5T device as soon as possible.

Devices used:

  • Samsung Galaxy A13 (SM-A135SF/DSN) (Android 12)
  • RealMe GT Master Edition ( Android 11)
  • Motorola g6 (XT1925-5) (Android 8)

Builds used:

  • Firefox Beta 113.0b5 (2023-04-180
  • Firefox NIghtly 114.0a1 (2023-04-20)

Testing notes:

  • I used other devices to test this issue. I cannot reproduce this issue on the following devices anymore: Samsung Galaxy A13 (SM-A135SF/DSN) (Android 12), RealMe GT Master Edition (Android 11), Motorola g6 (XT1925-5) (Android 8)
  • I tested with the same phone used when bug was reported (OnePlus 5 (A5000)) and the issue is partially fixed.
    "Cannot delete the interrupted download file." - this is not fixed.
    "When new download starts, "Download failed" error is displayed in Firefox and in Notifications." - this is fixed.

In case it helps: I was able to reproduce the issue in the past (a few times) while running the automated UI test DownloadTest#pauseResumeCancelDownloadTest() on a Pixel 2 device (Android 10): for some reason the 1 GB file download failed and I was unable to delete it from the Downloads directory. After this, any subsequent attempt to download the same file failed. Couldn't determine yet the cause of the initial failure (possibly a network problem).

I can still reproduce the issue with the same device on today's Nightly build (I still have the 1gb file in my device storage).

Flags: qe-verify+

I can reproduce this even without switching the network off. Resuming the download after pausing always fails. Only "Try again" works.

My guess based on the interaction is that if the file with the same name exists (as we paused and resumed the download), it fails to resume, when "Try again" is clicked, it appends "(1)" to the file name and then it works.

Whiteboard: [geckoview:m114?] → [geckoview:m114?] [fxdroid] [group4]
Assignee: nobody → nbond
Status: NEW → ASSIGNED
Attached image image.png

I spent some time today trying to reproduce this, but I have not been able to do so on my Pixel 2 (Android 9) and Samsung Galaxy Tab S7+ (Android 11).

I did notice that there's some hidden files in the Downloads folder, though, after starting/stopping some downloads.

See Also: → 1812789
See Also: → 1812788
See Also: → 1852871

I tried reproducing a different bug and got some unexpected behaviour that I believe may be related to this bug (also bug1812789, bug1812788, bug1852871):

Steps to Reproduce

  1. Download the same file at least 2 times. I did it 3 times. You can use this site: http://xcal1.vodafone.co.uk/
  2. Let one of the downloads finish to completion and pause the remaining ones.
  3. Check the downloads folder to see that there is 1 copy of the downloaded file.
  4. Cancel one of the other paused downloads and notice that the downloaded file in downloads is now gone. Note that there were instances where I had to hit cancel on all of the remaining paused downloads for this unexpected behaviour to be observed.

Expected Behaviour

The downloaded file is still in the downloads folder untouched.

Actual Behaviour

The downloaded file is deleted from the downloads folder. Please see the attached video for more details.

Device Name

Samsung A35

Android Version

Android 14

Assignee: nbond → giorga
Attachment #9413529 - Attachment is obsolete: true
Attachment #9413489 - Attachment description: Bug 1825477 - You should download the same file if previously it was a failed download. → Bug 1825477 - Allow to download the same file if previously failed.
Pushed by giorga@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e1ecb4d2f29d Allow to download the same file if previously failed. r=android-reviewers,tthibaud
Flags: qe-verify+
Pushed by giorga@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/96c886416942 Allow to download the same file if previously failed. r=android-reviewers,tthibaud
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 130 Branch

Verified on the latest Nightly build (130.0a1 from 2024-07-29).
Used both the main steps to reproduce as well as the ones from Comment 8.

Devices used:

  • Redmi 9C NFC (Android 10)
  • Samsung Galaxy Z Fold 4 (Android 14)
  • Google Pixel 7 (Android 15 Beta 3)

Marking the ticket as Verified on 130.

Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: