kingwingfly / fav

Back up your favorite bilibili resources with CLI.
https://crates.io/crates/fav_core
MIT License
85 stars 1 forks source link

[Bug] [CRASH] ERROR NetworkErr: Error decoding response body #76

Closed Silicon7921 closed 3 months ago

Silicon7921 commented 3 months ago

Describe the bug 下载时如标题所示,程序崩溃。

To Reproduce 高频发生 执行pull然后等待。观察到下载速度随时间递减,错误发生,程序输出报错后退出。 似乎下载到特定几个大文件时更容易发生。

Expected behavior 正常下载

Screenshots 屏幕截图 2024-06-04 205500

Information (please complete the following information): OS: win11 build 22621

Additional context 某些异常可不可以无视()发生错误说不定可以试着跳过或者重试

Silicon7921 commented 3 months ago

卡死是不一定的。似乎过段时间会自行退出,但能确定的是没有执行完毕命令。

Silicon7921 commented 3 months ago

已经炸了十几次了(悲)怀疑是阿b服务器的锅 是不是应该抓几个数据包分析一下啊

Silicon7921 commented 3 months ago

有个奇怪的细节,输出的进度条相同的一项重复了很多次 而且实际上压根一个都没下完就炸了 感觉这点很怪

kingwingfly commented 3 months ago

主要是执行重试的话,最优的解决方法是用 channel,架构就得改了(悲)

Silicon7921 commented 3 months ago

this bug is not solved yet. only 808 files are updated after performing "fav pull“, but i am tracking 883 files. when this bug occurs, the program skips current task, download the next file and quit "normally". IDK what happened. a screenshot will be uploaded later since i am busy now

Silicon7921 commented 3 months ago

btw this bug appears immediately after performing"fav pull", causing the first file skipped (not downloaded)

kingwingfly commented 3 months ago

If you pull many times with videos not increasing, it means all videos downloadable were saved except those expired or permission refused.

Silicon7921 commented 3 months ago

You are right. all files vaild are downloaded correctly. When encountering video sources with errors, it displays ERROR and skip it. If a video is invalid, the program should not be able to fetch it and an ERROR appears at once (0% downloaded). But NetworkErr seems will not occur at 0%. instead, it appears during the download (about 50% downloaded). I dont think the video is invaild since it can be downloaded partly and it can be seen on Bilibili.

屏幕截图 2024-06-05 214047

kingwingfly commented 3 months ago

已通过直接打印错误、用户再次尝试解决。

Silicon7921 commented 3 months ago

多次尝试后最终可以成功下载,该issue可认为已修复。 根据我的研究,我认为该issue是b站服务器问题造成,短时间大量下载会产生限流导致下载失败。