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

用法上@Download.onTaskFail被调用的时候我想要知道失败的原因应该如何方便的查看哈? #393

Closed
halohoop opened this issue May 9, 2019 · 6 comments

Comments

Projects
None yet
2 participants
@halohoop
Copy link

commented May 9, 2019

Aria版本

"com.arialyy.aria:aria-core:3.6.3",
"com.arialyy.aria:aria-compiler:3.6.3"

什么问题

用法上@Download.onTaskFail被调用的时候我想要知道失败的原因应该如何方便的查看哈?

如何复现此问题

突然遇到了这个错误。

控制台日志

image
image
2019-05-09 13:01:46.665 4037-4261/a.b.c E/AbsThreadTask: ExceptionDetailed:
====================Exception Info====================
com.arialyy.aria.exception.TaskException: 任务【c_prd_20190401_2019_1.1_5.apk】下载失败,filePath: /data/user/0/a.b.c/files/upgrade/aaaaa.apk, url: http://a.b.c/resource/im/d9bf2ca22f071100a651c18b443e226fe4f6afb1a2edab41039a96c9bb1b3208.apk
length=8192; regionStart=0; regionLength=-1
com.arialyy.aria.core.download.downloader.HttpThreadTask.call(HttpThreadTask.java:134)
com.arialyy.aria.core.download.downloader.HttpThreadTask.call(HttpThreadTask.java:51)
java.util.concurrent.FutureTask.run(FutureTask.java:266)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
java.lang.Thread.run(Thread.java:784)
===================================================

@AriaLyy

This comment has been minimized.

Copy link
Owner

commented May 9, 2019

image
用这个

@halohoop

This comment has been minimized.

Copy link
Author

commented May 9, 2019

可能文档需要更新一下咯。
image

@halohoop

This comment has been minimized.

Copy link
Author

commented May 9, 2019

我这边定义到我的问题是解析响应头部的文件长度的时候失败,因为我们的下载地址经过了一层转发,然后又不归我们后台维护,所以响应头部不能够自己定义,所以提出一个如下图的需求,谢谢。
image
还是说这个接口已经存在了?

@AriaLyy

This comment has been minimized.

Copy link
Owner

commented May 9, 2019

可以

@halohoop

This comment has been minimized.

Copy link
Author

commented May 9, 2019

哈哈,谢谢,焦急等待中……

@AriaLyy

This comment has been minimized.

Copy link
Owner

commented May 15, 2019

使用3.6.4_dev_3

      .setFileLenAdapter(new IHttpFileLenAdapter() {
        @Override public long handleFileLen(Map<String, List<String>> headers) {
          ...
          // 处理header中的文件长度

          return fileLen;
        }
       })

@AriaLyy AriaLyy closed this May 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.