fluttercommunity / fluttercommunity/flutter_downloader

I encounter failure while downloading some files, although it succeeds in downloading other files

Open
#929 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Kotlin
Stars
940
Forks
561
Avg merge
1h 18m
Merged PRs (30d)
1

Description

![Uploading Screenshot 2023-12-20 225605.png…]()
this error show !!
Update notification: {notificationId: 24, title: https://drive.google.com/uc?export=download&id=14IncUOyBeXpFKJECVirkpcqoKeNhIsxQ, status: FAILED, progress: -1}
I/flutter (15751): Background Isolate Callback: taskid (1fa03720-2d0b-4c6e-8f6f-1e1c56854ab3) is in Status (4) and progress (-1)
W/System.err(15751): java.net.SocketTimeoutException: timeout
W/System.err(15751): at com.android.okhttp.okio.Okio$3.newTimeoutException(Okio.java:221)
W/System.err(15751): at com.android.okhttp.okio.AsyncTimeout.exit(AsyncTimeout.java:261)
W/System.err(15751): at com.android.okhttp.okio.AsyncTimeout$2.read(AsyncTimeout.java:215)
W/System.err(15751): at com.android.okhttp.okio.RealBufferedSource.indexOf(RealBufferedSource.java:316)
W/System.err(15751): at com.android.okhttp.okio.RealBufferedSource.indexOf(RealBufferedSource.java:310)
W/System.err(15751): at com.android.okhttp.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:206)
W/System.err(15751): at com.android.okhttp.internal.http.Http1xStream.readResponse(Http1xStream.java:395)
W/System.err(15751): at com.android.okhttp.internal.http.Http1xStream.readResponseHeaders(Http1xStream.java:144)
W/System.err(15751): at com.android.okhttp.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:887)
W/System.err(15751): at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:759)
W/System.err(15751): at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:498)
W/System.err(15751): at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:434)
W/System.err(15751): at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:565)
W/System.err(15751): at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
W/System.err(15751): at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:26)
W/System.err(15751): at vn.hunghd.flutterdownloader.DownloadWorker.downloadFile(DownloadWorker.kt:321)
W/System.err(15751): at vn.hunghd.flutterdownloader.DownloadWorker.doWork(DownloadWorker.kt:206)
W/System.err(15751): at androidx.work.Worker$1.run(Worker.java:86)
W/System.err(15751): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
W/System.err(15751): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
W/System.err(15751): at java.lang.Thread.run(Thread.java:764)
W/System.err(15751): Caused by: java.net.SocketException: socket is closed
W/System.err(15751): at com.android.org.conscrypt.ConscryptFileDescriptorSocket$SSLInputStream.read(ConscryptFileDescriptorSocket.java:584)
W/System.err(15751): at com.android.okhttp.okio.Okio$2.read(Okio.java:141)
W/System.err(15751): at com.android.okhttp.okio.AsyncTimeout$2.read(AsyncTimeout.java:211)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the failure with the reported Google Drive URL and inspect the timeout path in DownloadWorker.kt at downloadFile (line 321), called from doWork (line 206). Compare files that succeed with those that time out, then verify that the affected downloads complete instead of reporting FAILED with progress -1.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, flutter, kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.