-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[Bug] Crash when downloading file with a period in the name #16443
Comments
You can try it with this link https://send.vis.ee/download/9c75816f98eb53d0/#O2E5KMqIiE7NOdHOH0JIOQ, or if its expired upload any text file with a period to test it |
@mobd thanks for reporting, could you go to I wasn't able to replicate in nightly using pixel 3 with Android 11, possible a devices specific bug. QA team please help us to confirm.
|
@Amejia481 hi, I already posted the relevant stacktrace above. Or is there something else that would help? |
Sorry @mobd my bad, got mixed up with another bug, the stack trace above will be sufficient. |
I had tested this issue on the latest Nightly 201117 05:03 (Build #2015776107) GV 84 from 11/17 with the following devices:
and I was not able to reproduce the crash, when downloading files from https://send.vis.ee/. @mobd Hi! Is this issue still reproducible on the latest Nightly? What type of file you where downloading when the app crashed? I will remove the qa:needed label for now. |
@ebalazs-sv thanks :) |
@Amejia481 hi, please reopen this, I don't think I have the permissions to do so. I can still reproduce with the latest nightly #2015776011. @ebalazs-sv I did some more testing and it seems that it only happens when there are two consecutive periods anywhere in the filename, I'll edit the main issue too. I can consistently reproduce this by creating a dummy text file with some content and downloading it from send.vis.ee. I've tried the following filenames and they all crash the browser.
It also happens with videos that have consecutive periods in the name so I don't think the filetype or website matters. And sample file https://send.vis.ee/download/adddda3bf01aba79/#gatmoe2sQn8Qh5nBcFAdRg Thank you both for looking at this! |
Thank you for the details! |
Thanks @mobd, I was able to reproduce with an emulator with Android 10 looks like this is something specific about this version. I will take a look. |
Thanks @ebalazs-sv for quickly retesting :) |
@ebalazs-sv Actually I forgot to mention something 😅 If there already is a file with the same name in downloads, so that the downloaded file has a name like 1..(1).txt or whatever, I don't get a crash either. It's only if the name of the downloaded file is the same as the original that it happens. Sorry for the bad explanation! |
This is ready for QA review, @mobd could you confirm if the issue is fixed for you? :) |
Hi @Amejia481, I can confirm the browser no longer crashes in Nightly 201208 17:06 (Build #2015780235). The sanitizing of the filename when uploading or downloading does seem like unexpected behaviour to me, chrome doesn't attempt to do this. But not having the browser crash is the most important part, thanks for fixing this! |
Verified as fixed on Nightly 10/9 with Nokia 6(Android 7.1.1) and Pixel 3(Android 11). |
Thanks @sflorean! |
Steps to reproduce
Download a file that has two consecutive periods as part of the filename
Expected behavior
The browser doesn't crash.
Actual behavior
The file is downloaded, but the browser crashes. Stacktrace:
d41c7934-4f47-436c-bf2e-eb29011bedce
java.lang.IllegalArgumentException: Invalid file path: /storage/emulated/0/Download/o..txt
java.lang.IllegalArgumentException: Invalid file path: /storage/emulated/0/Download/o..txt
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:170)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:140)
at android.content.ContentProviderProxy.insert(ContentProviderNative.java:481)
at android.content.ContentResolver.insert(ContentResolver.java:1844)
at android.app.DownloadManager.addCompletedDownload(DownloadManager.java:1530)
at android.app.DownloadManager.addCompletedDownload(DownloadManager.java:1446)
at mozilla.components.feature.downloads.AbstractFetchDownloadService.updateDownloadNotification$feature_downloads_release(AbstractFetchDownloadService.kt:21)
at mozilla.components.feature.downloads.AbstractFetchDownloadService.access$updateDownloadNotification(AbstractFetchDownloadService.kt:5)
at mozilla.components.feature.downloads.AbstractFetchDownloadService$onStartCommand$2.invokeSuspend(AbstractFetchDownloadService.kt:7)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:3)
at kotlinx.coroutines.AwaitKt.resume(Await.kt:7)
at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:18)
at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:5)
at kotlinx.coroutines.CancellableContinuationImpl.resumeUndispatched(CancellableContinuationImpl.kt:2)
at kotlinx.coroutines.android.HandlerContext$scheduleResumeAfterDelay$$inlined$Runnable$1.run(Runnable.kt:1)
at android.os.Handler.handleCallback(Handler.java:900)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8347)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
Device information
┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: