Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot download chunked resource. #345

Open
rantianhua opened this issue Dec 7, 2019 · 0 comments · Fixed by RomanBorisenko1991/okdownload#1 · May be fixed by #346
Open

Cannot download chunked resource. #345

rantianhua opened this issue Dec 7, 2019 · 0 comments · Fixed by RomanBorisenko1991/okdownload#1 · May be fixed by #346
Assignees
Labels
Milestone

Comments

@rantianhua
Copy link
Collaborator

OkDownload Version

v1.0.6

Problem Describe

Chunked source cannot be downloaded, test url: http://www.httpwatch.com/httpgallery/chunked/chunkedimage.aspx?0.04400023248109086 .

Log

2019-12-07 10:04:03.016 16765-16765/com.liulishuo.okdownload.sample W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@e7acec8
2019-12-07 10:04:03.124 16765-16765/com.liulishuo.okdownload.sample D/Util: Get final download store is com.liulishuo.okdownload.core.breakpoint.RemitStoreOnSQLite@300cd6c
2019-12-07 10:04:03.124 16765-16765/com.liulishuo.okdownload.sample D/OkDownload: downloadStore[com.liulishuo.okdownload.core.breakpoint.BreakpointStoreOnSQLite@3768f35] connectionFactory[com.liulishuo.okdownload.core.connection.DownloadOkHttp3Connection$Factory@11b4fca
2019-12-07 10:04:03.127 16765-16765/com.liulishuo.okdownload.sample D/DownloadDispatcher: isPending: 1
2019-12-07 10:04:03.127 16765-16765/com.liulishuo.okdownload.sample D/DownloadDispatcher: isRunning: 1
2019-12-07 10:04:03.276 16765-16801/com.liulishuo.okdownload.sample D/EGL_emulation: eglMakeCurrent: 0xec56d820: ver 3 0 (tinfo 0xf1549990)
2019-12-07 10:04:03.293 16765-16801/com.liulishuo.okdownload.sample D/EGL_emulation: eglMakeCurrent: 0xec56d820: ver 3 0 (tinfo 0xf1549990)
2019-12-07 10:04:03.311 16765-16801/com.liulishuo.okdownload.sample D/EGL_emulation: eglMakeCurrent: 0xec56d820: ver 3 0 (tinfo 0xf1549990)
2019-12-07 10:04:03.319 16765-16801/com.liulishuo.okdownload.sample D/EGL_emulation: eglMakeCurrent: 0xec56d820: ver 3 0 (tinfo 0xf1549990)
2019-12-07 10:04:03.752 16765-16801/com.liulishuo.okdownload.sample D/EGL_emulation: eglMakeCurrent: 0xec56d820: ver 3 0 (tinfo 0xf1549990)
2019-12-07 10:04:04.375 16765-16801/com.liulishuo.okdownload.sample D/EGL_emulation: eglMakeCurrent: 0xec56d820: ver 3 0 (tinfo 0xf1549990)
2019-12-07 10:04:04.387 16765-16765/com.liulishuo.okdownload.sample D/DownloadDispatcher: enqueueLocked for single task: com.liulishuo.okdownload.DownloadTask@ebfc134b@1@http://www.httpwatch.com/httpgallery/chunked/chunkedimage.aspx?0.04400023248109086@/storage/emulated/0/Android/data/com.liulishuo.okdownload.sample/cache/single-test
2019-12-07 10:04:04.395 16765-16818/com.liulishuo.okdownload.sample D/CallbackDispatcher: taskStart: 1
2019-12-07 10:04:04.458 16765-16818/com.liulishuo.okdownload.sample D/NetworkSecurityConfig: Using Network Security Config from resource network_security_config debugBuild: true
2019-12-07 10:04:04.470 16765-16818/com.liulishuo.okdownload.sample W/download.sampl: Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (light greylist, reflection)
2019-12-07 10:04:04.470 16765-16818/com.liulishuo.okdownload.sample W/download.sampl: Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (light greylist, reflection)
2019-12-07 10:04:04.470 16765-16818/com.liulishuo.okdownload.sample W/download.sampl: Accessing hidden method Ldalvik/system/CloseGuard;->warnIfOpen()V (light greylist, reflection)
2019-12-07 10:04:04.486 16765-16818/com.liulishuo.okdownload.sample D/CallbackDispatcher: -----> start trial task(1) {range=[bytes=0-0]}
2019-12-07 10:04:05.355 16765-16818/com.liulishuo.okdownload.sample D/ConnectTrial: task[1] redirect location: null
2019-12-07 10:04:05.356 16765-16818/com.liulishuo.okdownload.sample D/CallbackDispatcher: <----- finish trial task(1) code[200]{arr-disable-session-affinity=[True], cache-control=[no-cache, no-store], content-type=[image/jpeg; charset=utf-8], date=[Sat, 07 Dec 2019 02:03:18 GMT], expires=[-1], pragma=[no-cache], server=[Microsoft-IIS/10.0], trailer=[X-HttpWatch-Sample], transfer-encoding=[chunked], x-aspnet-version=[4.0.30319], x-powered-by=[ASP.NET]}
2019-12-07 10:04:05.460 16765-16818/com.liulishuo.okdownload.sample D/DownloadDispatcher: is file conflict after run: 1
2019-12-07 10:04:05.462 16765-16818/com.liulishuo.okdownload.sample D/DownloadCall: breakpoint invalid: download from beginning because of local check is dirty 1 fileExist[false] infoRight[false] outputStreamSupport[true] com.liulishuo.okdownload.core.download.BreakpointLocalCheck@2b243d2
2019-12-07 10:04:05.465 16765-16818/com.liulishuo.okdownload.sample D/CallbackDispatcher: downloadFromBeginning: 1
2019-12-07 10:04:05.466 16765-16818/com.liulishuo.okdownload.sample W/resetBlockIfDirty: block is dirty so have to reset: [0, -2)-current:0
2019-12-07 10:04:05.473 16765-16822/com.liulishuo.okdownload.sample D/DownloadChain: create connection on url: http://www.httpwatch.com/httpgallery/chunked/chunkedimage.aspx?0.04400023248109086
2019-12-07 10:04:05.473 16765-16822/com.liulishuo.okdownload.sample D/HeaderInterceptor: AssembleHeaderRange (1) block(0) downloadFrom(0) currentOffset(0)
2019-12-07 10:04:05.474 16765-16822/com.liulishuo.okdownload.sample D/CallbackDispatcher: -----> start connection task(1) block(0) {range=[bytes=0--2], user-agent=[OkDownload/1.0.7-SNAPSHOT]}
2019-12-07 10:04:05.907 16765-16816/com.liulishuo.okdownload.sample D/RemitSyncExecutor: sync info with id: 1
2019-12-07 10:04:06.200 16765-16822/com.liulishuo.okdownload.sample D/CallbackDispatcher: <----- finish connection task(1) block(0) code[400]{connection=[close], content-length=[339], content-type=[text/html; charset=us-ascii], date=[Sat, 07 Dec 2019 02:03:18 GMT]}
2019-12-07 10:04:06.206 16765-16818/com.liulishuo.okdownload.sample D/CallbackDispatcher: taskEnd: 1 ERROR com.liulishuo.okdownload.core.exception.ServerCanceledException: Response code can't handled on internal 400 with current offset 0
2019-12-07 10:04:06.206 16765-16816/com.liulishuo.okdownload.sample D/RemitSyncExecutor: remove free bunch id 1
2019-12-07 10:04:06.206 16765-16818/com.liulishuo.okdownload.sample D/DownloadCall: call is finished 1
2019-12-07 10:04:06.207 16765-16823/com.liulishuo.okdownload.sample D/DownloadChain: release connection com.liulishuo.okdownload.core.connection.DownloadOkHttp3Connection@6665359 task[1] block[0]
2019-12-07 10:04:06.211 16765-16765/com.liulishuo.okdownload.sample E/SingleActivity: download error
    com.liulishuo.okdownload.core.exception.ServerCanceledException: Response code can't handled on internal 400 with current offset 0
        at com.liulishuo.okdownload.core.download.DownloadStrategy$ResumeAvailableResponseCheck.inspect(DownloadStrategy.java:304)
        at com.liulishuo.okdownload.core.interceptor.connect.HeaderInterceptor.interceptConnect(HeaderInterceptor.java:103)
        at com.liulishuo.okdownload.core.download.DownloadChain.processConnect(DownloadChain.java:215)
        at com.liulishuo.okdownload.core.interceptor.BreakpointInterceptor.interceptConnect(BreakpointInterceptor.java:48)
        at com.liulishuo.okdownload.core.download.DownloadChain.processConnect(DownloadChain.java:215)
        at com.liulishuo.okdownload.core.interceptor.RetryInterceptor.interceptConnect(RetryInterceptor.java:40)
        at com.liulishuo.okdownload.core.download.DownloadChain.processConnect(DownloadChain.java:215)
        at com.liulishuo.okdownload.core.download.DownloadChain.start(DownloadChain.java:180)
        at com.liulishuo.okdownload.core.download.DownloadChain.run(DownloadChain.java:247)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:764)
@rantianhua rantianhua self-assigned this Dec 7, 2019
@rantianhua rantianhua added the bug label Dec 7, 2019
@rantianhua rantianhua added this to the 1.0.7 milestone Dec 7, 2019
@rantianhua rantianhua changed the title Cannot download chunked source. Cannot download chunked resource. Dec 7, 2019
rantianhua pushed a commit that referenced this issue Dec 7, 2019
@rantianhua rantianhua linked a pull request Dec 7, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant