You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
java.lang.IllegalArgumentException
at android.app.DownloadManager.validateArgumentIsNonEmpty(DownloadManager.java:1430)
at android.app.DownloadManager.addCompletedDownload(DownloadManager.java:1388)
at android.app.DownloadManager.addCompletedDownload(DownloadManager.java:1368)
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:6)
at kotlinx.coroutines.CancellableContinuationImpl.resumeUndispatched(CancellableContinuationImpl.kt:3)
at kotlinx.coroutines.android.HandlerContext$scheduleResumeAfterDelay$$inlined$Runnable$1.run(Runnable.kt:1)
at android.os.Handler.handleCallback(Handler.java:809)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7377)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:469)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:963)
Based on the stacktraces I saw the exception being thrown because of this DownloadManager check for even an empty mime type.
This seems to be a general issue, not tied to a specific device or Android version but I could not reproduce it.
Haven't saw anything immediately wrong with our current implementation of inferring the mimeType and given that the code in AC is pretty tight about nullability I think that in specific cases the mime type gets to be empty.
As a speculative fix (without actually having a broken download to verify) we can treat the cases of empty mime types the same as we treat the null ones -> replace them with a default */* one.
Crash report: https://crash-stats.mozilla.org/report/index/160819c3-1b57-4902-917a-4bd130210301
Java stack trace:
┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: