Open Bug 1816330 Opened 1 year ago Updated 2 months ago

Download failed when the file to download is too big

Categories

(Fenix :: Downloads, defect, P2)

Firefox 110
All
Android

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: dragons.fire.zx, Unassigned)

References

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Android 8.0.0; Mobile; rv:109.0) Gecko/110.0 Firefox/110.0

Steps to reproduce:

I tried to download an apk (150mb) here https://m.apkpure.com/it/hero-of-aethric-classic-rpg/com.avalon.rpg/download

Actual results:

"Download failed, retry" no matter how many times i retry

Expected results:

Download of this apk file doesn't fail.
Device: huawei p8 lite 2017
Os: android 8 miui 8
Extra informations: I tried to download the file with DuckDuckGo browser(android) and it gave me the same result (impossible to download); I tried to download the file with Brave browser and the file downloaded successfully. The difference is that Brave asked me a kind of "are you sure you want to download this dangerous file?", Fenix instead just straight deny that :/

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

For more information, please visit auto_nag documentation.

Flags: needinfo?(cpeterson)
Flags: needinfo?(cpeterson)
Severity: -- → S3

Cannot reproduce this. The file can be downloaded normally.

I re-tried to download that file with the latest version and it still happens, I have 2.88Gb free in my device.

It would be helpful to debug if you could share your adb log.

i used adb before but idk how to take the logs of firefox. Do you have a guide for that?

using adb logcat , filter out logs based on time ( from the time a bit before download operation to the time after fail message) or based on tag (for this case AbstractFetchDownloadService is the most related tag) , and don't forget to redact your privacy information.

Do you have a step by step guide for that?
I am a normal user and i have no idea on how to do that.
I have tried the app "Logcat Extreme" i filtered by app and no log came out.

You could not get log from app ( Android forbid application to read system logs) except your device is rooted .
You'll need a computer
then

  1. Enable Developer mode , then in Settings > Additional Settings > Developer Options , Enable USB Debugging.
  2. connect your device to your computer via USB cable and if there's a prompt about allowing this computer to debug, select allow.
  3. Download Platform Tools from https://developer.android.com/tools/releases/platform-tools and unzip
  4. Open a Cmd Prompt and cd to the unziped folder, type adb devices to check if your device is attached.
  5. type adb logcat to see logs. if you want to save logs to file do adb logcat -d > filename
Attached file loogcat.txt

Here you go. i tried redownloading that file from that website again and 10 sec later i created the logcat

Thanks for your log

Here's the key point log

06-20 20:27:03.674  3024 15788 E AbstractFetchDownloadService: Unable to complete download for 87389c0f-4e7c-498a-ab41-0503b14db97d marked as FAILED
06-20 20:27:03.674  3024 15788 E AbstractFetchDownloadService: java.io.FileNotFoundException: /storage/3131-3835/Download/Hero of Aethric | Classic RPG_1.1.28_Apkpure.xapk (Invalid argument)
06-20 20:27:03.674  3024 15788 E AbstractFetchDownloadService: 	at java.io.FileOutputStream.open0(Native Method)
06-20 20:27:03.674  3024 15788 E AbstractFetchDownloadService: 	at java.io.FileOutputStream.open(FileOutputStream.java:287)
06-20 20:27:03.674  3024 15788 E AbstractFetchDownloadService: 	at java.io.FileOutputStream.<init>(FileOutputStream.java:223)
06-20 20:27:03.674  3024 15788 E AbstractFetchDownloadService: 	at mozilla.components.feature.downloads.AbstractFetchDownloadService$performDownload$1.invoke(AbstractFetchDownloadService.kt:401)
06-20 20:27:03.674  3024 15788 E AbstractFetchDownloadService: 	at mozilla.components.concept.fetch.Response$Body.useStream(Response.kt:8)
06-20 20:27:03.674  3024 15788 E AbstractFetchDownloadService: 	at mozilla.components.feature.downloads.AbstractFetchDownloadService.performDownload$feature_downloads_release(AbstractFetchDownloadService.kt:241)
06-20 20:27:03.674  3024 15788 E AbstractFetchDownloadService: 	at mozilla.components.feature.downloads.AbstractFetchDownloadService.startDownloadJob$feature_downloads_release(AbstractFetchDownloadService.kt:36)
06-20 20:27:03.674  3024 15788 E AbstractFetchDownloadService: 	at mozilla.components.feature.downloads.AbstractFetchDownloadService$handleDownloadIntent$1.invokeSuspend(AbstractFetchDownloadService.kt:8)
06-20 20:27:03.674  3024 15788 E AbstractFetchDownloadService: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:9)
06-20 20:27:03.674  3024 15788 E AbstractFetchDownloadService: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:107)
06-20 20:27:03.674  3024 15788 E AbstractFetchDownloadService: 	at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:13)
06-20 20:27:03.674  3024 15788 E AbstractFetchDownloadService: 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:3)
06-20 20:27:03.674  3024 15788 E AbstractFetchDownloadService: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:79)

It looks like "|" ( vertical bar ) in filename is treated as pipe in linux , hence the OS perhaps refuses to create file .

There're some discussions in StackOverflow shows that this may device related , some other devices allow this char in filename. some other devices automatically change | to _.

There's also possibly related ticket https://bugzilla.mozilla.org/show_bug.cgi?id=1815613

See Also: → 1815613

We should look into how Firefox on Linux handles this scenario to determine the best course of action for this bug.

Priority: -- → P2

Some hint for how Firefox Desktop does:

  1. Call textToSubURI->UnEscapeURIForUI in NS_GetFilenameFromDispositionhttps://searchfox.org/mozilla-central/source/netwerk/base/nsNetUtil.cpp#2728

  2. Call NS_UnescapeURL https://searchfox.org/mozilla-central/source/xpcom/io/nsEscape.cpp#564 in UnEscapeURIForUI

  3. Escape table https://searchfox.org/mozilla-central/source/xpcom/io/nsEscape.cpp#265-281

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: