Scoop icon indicating copy to clipboard operation
Scoop copied to clipboard

[Bug] Built-in So many aria2 config, and it can cause to some avoidable failures

Open lgq1349422030 opened this issue 3 years ago • 7 comments

Bug Report

Current Behavior

failed download apps with SO MUCH built-in config.

Expected Behavior

Download Successfully

Additional context/output

Installing 'nodejs' (17.8.0) [64bit]
Starting download with aria2 ...
Download: 04/05 12:33:02 [ERROR] CUID#8 - Download aborted. URI=https://nodejs.org/dist/v17.8.0/nodeDownload: Exception: [AbstractCommand.cc:312] errorCode=1 Network problem has occurred. cause:A sockDownload: Download Results:
Download: gid   |stat|avg speed  |path/URI
Download: ======+====+===========+=======================================================
Download: 7127a8|ERR |       0B/s|C:/Users/l1349/scoop/cache/nodejs#17.8.0#https_nodejs.org_dist_v17.8.0_node-v17.8.0-win-x64.7z
Download: Status Legend:
Download: (ERR):error occurred.
Download: aria2 will resume download if the transfer is restarted.
Download: If there are any errors, then see the log file. See '-l' option in help/man page for details.

ERROR Download failed! (Error 1) An unknown error occurred
ERROR https://nodejs.org/dist/v17.8.0/node-v17.8.0-win-x64.7z
    referer=https://nodejs.org/dist/v17.8.0/
    dir=C:\Users\l1349\scoop\cache
    out=nodejs#17.8.0#https_nodejs.org_dist_v17.8.0_node-v17.8.0-win-x64.7z

ERROR & 'C:\Users\l1349\scoop\apps\aria2\current\aria2c.exe' --input-file='C:\Users\l1349\scoop\cache\nodejs.txt' --user-agent='Scoop/1.0 (+http://scoop.sh/) PowerShell/7.2 (Windows NT 10.0; Win64; x64; Core)' --allow-overwrite=true --auto-file-renaming=false --retry-wait=2 --split=5 --max-connection-per-server=5 --min-split-size=5M --console-log-level=warn --enable-color=false --no-conf=true --follow-metalink=true --metalink-preferred-protocol=https --min-tls-version=TLSv1.2 --stop-with-process=20968 --continue --summary-interval=0 --auto-save-interval=1 --conf-path 'C:\Users\l1349\OneDrive - Tsinghua University\Softwares\Program Files\aria2\Profiles\aria2-base.ini'

Please try again or create a new issue by using the following link and paste your console output:
https://github.com/ScoopInstaller/Main/issues/new?title=nodejs%4017.8.0%3a+download+via+aria2+failed

Especially, why built in --no-conf=true? it caused most of the failure

The problem it not caused by my --conf-path option

scoop install nodejs
Installing 'nodejs' (17.8.0) [64bit]
Starting download with aria2 ...
Download: 04/05 12:37:58 [ERROR] CUID#8 - Download aborted. URI=https://nodejs.org/dist/v17.8.0/nodeDownload: Exception: [AbstractCommand.cc:312] errorCode=1 Network problem has occurred. cause:A sockDownload: Download Results:
Download: gid   |stat|avg speed  |path/URI
Download: ======+====+===========+=======================================================
Download: 64649b|ERR |       0B/s|C:/Users/l1349/scoop/cache/nodejs#17.8.0#https_nodejs.org_dist_v17.8.0_node-v17.8.0-win-x64.7z
Download: Status Legend:
Download: (ERR):error occurred.
Download: aria2 will resume download if the transfer is restarted.
Download: If there are any errors, then see the log file. See '-l' option in help/man page for details.

ERROR Download failed! (Error 1) An unknown error occurred
ERROR https://nodejs.org/dist/v17.8.0/node-v17.8.0-win-x64.7z
    referer=https://nodejs.org/dist/v17.8.0/
    dir=C:\Users\l1349\scoop\cache
    out=nodejs#17.8.0#https_nodejs.org_dist_v17.8.0_node-v17.8.0-win-x64.7z

ERROR & 'C:\Users\l1349\scoop\apps\aria2\current\aria2c.exe' --input-file='C:\Users\l1349\scoop\cache\nodejs.txt' --user-agent='Scoop/1.0 (+http://scoop.sh/) PowerShell/7.2 (Windows NT 10.0; Win64; x64; Core)' --allow-overwrite=true --auto-file-renaming=false --retry-wait=2 --split=5 --max-connection-per-server=5 --min-split-size=5M --console-log-level=warn --enable-color=false --no-conf=true --follow-metalink=true --metalink-preferred-protocol=https --min-tls-version=TLSv1.2 --stop-with-process=24604 --continue --summary-interval=0 --auto-save-interval=1

Please try again or create a new issue by using the following link and paste your console output:
https://github.com/ScoopInstaller/Main/issues/new?title=nodejs%4017.8.0%3a+download+via+aria2+failed

Possible Solution

image Give possibility to remove built-in config and do not affect scoop update Especially --no-conf=true!

System details

**Windows version:11

**OS architecture:64bit

**PowerShell version:7.2.2

Additional software: [(optional) e.g. ConEmu, Git]

Scoop Configuration

{
  "lastupdate": "2022-04-05T11:51:15.4672299+03:00",
  "aria2-warning-enabled": false,
  "SCOOP_REPO": "https://github.com/ScoopInstaller/Scoop",
  "SCOOP_BRANCH": "master",
  "aria2-options": "--conf-path 'C:\\Users\\l1349\\OneDrive - Tsinghua University\\Softwares\\Program Files\\aria2\\Profiles\\aria2-base.ini'"
}

even without aria2-options, this problem still exists! I have already upload error messages with/without aria2-ooptions

lgq1349422030 avatar Apr 05 '22 09:04 lgq1349422030

My aria2-base.ini

########## 配置文件 ##########
dht-file-path  =
dht-file-path6 = 
load-cookies   =
save-cookies   = 
server-stat-if = 
server-stat-of =
########## 配置文件 ##########
########## 下载选项 ##########
allow-overwrite                  = true
allow-piece-length-change        = false
always-resume                    = true
async-dns                        = false
async-dns-server                 = 101.6.6.6, [2001:da8::666]
auto-file-renaming               = true
auto-save-interval               = 60
check-certificate                = false
check-integrity                  = false
conditional-get                  = true
console-log-level                = warn
content-disposition-default-utf8 = true
continue                         = true
daemon                           = true
deferred-input                   = true
disk-cache                       = 64M
enable-mmap                      = true
file-allocation                  = none
# file-allocation                  = trunc
force-save                       = false
force-sequential                 = false
hash-check-only                  = false
http-accept-gzip                 = true
http-auth-challenge              = true
keep-unfinished-download-result  = false
log-level                        = error
max-connection-per-server        = 16
max-concurrent-downloads         = 8
min-split-size                   = 1M
min-tls-version                  = TLSv1.2
optimize-concurrent-downloads    = false
parameterized-uri                = false
pause-metadata                   = false
realtime-chunk-checksum          = true
remote-time                      = true
reuse-uri                        = true
save-not-found                   = true
save-session-interval            = 60
split                            = 64
summary-interval                 = 0
########## 下载选项 ##########
########## BT 选项 ##########
bt-detach-seed-only             = true
bt-enable-lpd                   = true
bt-force-encryption             = true
bt-hash-check-seed              = true
bt-load-saved-metadata          = true
bt-max-peers                    = 0
bt-min-crypto-level             = arc4
bt-remove-unselected-file       = true
bt-request-peer-speed-limit     = 1M
bt-require-crypto               = true
bt-seed-unverified              = true
dht-listen-port                 = 64380
enable-dht                      = true
enable-dht6                     = true
enable-peer-exchange            = true
follow-metalink                 = mem
follow-torrent                  = mem
listen-port                     = 64381
metalink-enable-unique-protocol = false
metalink-location               = cn, hk, mo, tw, jp, ru, sg
seed-ratio                      = 0.0
########## BT 选项 ##########
########## PT 伪装 ##########
peer-agent     = uTorrent/2040(22967)
peer-id-prefix = -UT2040-
user-agent     = uTorrent/2040(22967)
########## PT 伪装 ##########
bt-tracker=

lgq1349422030 avatar Apr 05 '22 09:04 lgq1349422030

Relevant discussion https://github.com/ScoopInstaller/Scoop/pull/2312

rashil2000 avatar Apr 05 '22 10:04 rashil2000

Relevant discussion #2312

No, it see through it, it's different. I means, the built-in options some times can cause problem, and it can be simply resolved by remove 'unnecessary aria2 options', and the most needed remove one it '--no-conf=true'

i can comment it myselsf, but it can cause problem when i run scoop update

lgq1349422030 avatar Apr 05 '22 10:04 lgq1349422030

Relevant discussion #2312

i mean my aria2-base-ini can make it works well on my pc, but your --no-conf=true makes --conf-path do not take affect

lgq1349422030 avatar Apr 05 '22 10:04 lgq1349422030

Can reproduce, is there no way to workaround this? This makes aria2 pretty unusable for me

brian6932 avatar Aug 26 '22 20:08 brian6932

Shouldn't it be --config-path='<pathtofile.ini>' instead of --config-path '<pathtofile.ini>' I don't know what happens if no-conf and conf-path are both provided.

--no-conf was added to prevent unwanted behavior if a custom configuration was present on a system. Making this configurable could be an option. (e.g. aria2-conf-path, if provided it will use the file, else it would use --no-conf)

r15ch13 avatar Aug 26 '22 21:08 r15ch13

The solution to this is for me was actually just to, it overrides scoop's set options

{
  "aria2-options": "--no-conf=false"
}

brian6932 avatar Aug 26 '22 21:08 brian6932