Scoop icon indicating copy to clipboard operation
Scoop copied to clipboard

scoop fails to install anything with aria2

Open Merith-TK opened this issue 2 years ago • 18 comments

C:\Users\zachd>scoop update nano
nano: 5.7-34 -> 5.8-44
WARN  Scoop uses 'aria2c' for multi-connection downloads.
WARN  Should it cause issues, run 'scoop config aria2-enabled false' to disable it.
Updating one outdated app:
Updating 'nano' (5.7-34 -> 5.8-44)
Downloading new version
Set-Content : Could not find a part of the path 'C:\Users\zachd\scoop\cache\nano.txt'.
At C:\Users\zachd\scoop\apps\scoop\current\lib\install.ps1:279 char:9
+         Set-Content -Path $urlstxt $urlstxt_content
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\zachd\scoop\cache\nano.txt:String) [Set-Content], DirectoryNotFoundException
    + FullyQualifiedErrorId : GetContentWriterDirectoryNotFoundError,Microsoft.PowerShell.Commands.SetContentCommand

Starting download with aria2 ...
Exception caught
Exception: [download_helper.cc:562] errorCode=1 Failed to open the file C:\Users\zachd\scoop\cache\nano.txt, cause: File not found or it is a directory


ERROR Download failed! (Error 1) An unknown error occurred
ERROR https://files.lhmouse.com/nano-win/nano-win_9672_v5.8-44-gc04962b5e.7z
    referer=https://files.lhmouse.com/nano-win/
    dir=C:\Users\zachd\scoop\cache
    out=nano#5.8-44#https_files.lhmouse.com_nano-win_nano-win_9672_v5.8-44-gc04962b5e.7z

ERROR & 'C:\Users\zachd\scoop\apps\aria2\current\aria2c.exe' --input-file='C:\Users\zachd\scoop\cache\nano.txt' --user-agent='Scoop/1.0 (+http://scoop.sh/) PowerShell/5.1 (Windows NT 10.0; Win64; x64; Desktop)' --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=12620 --continue --summary-interval 0

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=nano%405.8-44%3a+download+via+aria2+failed

Merith-TK avatar Oct 01 '21 23:10 Merith-TK

disabling aria2c

C:\Users\zachd>scoop update nano
nano: 5.7-34 -> 5.8-44
Updating one outdated app:
Updating 'nano' (5.7-34 -> 5.8-44)
Downloading new version
nano-win_9672_v5.8-44-gc04962b5e.7z (596.8 KB) [===================================================================================================================================================================================] 100%
Checking hash of nano-win_9672_v5.8-44-gc04962b5e.7z ... ok.
Uninstalling 'nano' (5.7-34)
Removing shim for 'nano'.
Unlinking ~\scoop\apps\nano\current
Installing 'nano' (5.8-44) [64bit]
Loading nano-win_9672_v5.8-44-gc04962b5e.7z from cache
Extracting nano-win_9672_v5.8-44-gc04962b5e.7z ... done.
Linking ~\scoop\apps\nano\current => ~\scoop\apps\nano\5.8-44
Creating shim for 'nano'.
Running post-install script...
'nano' (5.8-44) was installed successfully!
Notes
-----
Configure nano by editing its configuration file %USERPROFILE%\.nanorc
NOTE: The config file was named nano.rc in the 2.5.3 release, but is now named .nanorc

Merith-TK avatar Oct 01 '21 23:10 Merith-TK

Exception caught
Exception: [download_helper.cc:562] errorCode=1 Failed to open the file C:\Users\zachd\scoop\cache\nano.txt, cause: File not found or it is a directory

write access?

HUMORCE avatar Oct 08 '21 12:10 HUMORCE

File straight up does not exist

Merith-TK avatar Oct 08 '21 20:10 Merith-TK

image

Merith-TK avatar Oct 08 '21 20:10 Merith-TK

Set-Content : Could not find a part of the path 'C:\Users\zachd\scoop\cache\nano.txt'.
At C:\Users\zachd\scoop\apps\scoop\current\lib\install.ps1:279 char:9
+         Set-Content -Path $urlstxt $urlstxt_content
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\zachd\scoop\cache\nano.txt:String) [Set-Content], DirectoryNotFoundException
    + FullyQualifiedErrorId : GetContentWriterDirectoryNotFoundError,Microsoft.PowerShell.Commands.SetContentCommand

Starting download with aria2 ...
Exception caught
Exception: [download_helper.cc:562] errorCode=1 Failed to open the file C:\Users\zachd\scoop\cache\nano.txt, cause: File not found or it is a directory

i notice that your screenshot contains mutiple usernames:

  • root
  • zachd
  • merith

why merith owns access to most of the files in zachd's home directory?

HUMORCE avatar Oct 09 '21 00:10 HUMORCE

filepath is zachd, system username is merith, root is because i have busybox installed and am using those commands over windows since its more informative

C:\Users\zachd>whoami
merith

Merith-TK avatar Oct 09 '21 01:10 Merith-TK

what happens if delete the cache folder then install(with aria2). will the cache/app.txt file be created?

HUMORCE avatar Oct 09 '21 02:10 HUMORCE

It's the same case with me.

brandon3343 avatar Nov 17 '21 03:11 brandon3343

Please check if it still occurred after set SCOOP_BRANCH to develop

scoop config SCOOP_BRANCH develop
scoop update

niheaven avatar Nov 17 '21 05:11 niheaven

Please check if it still occurred after set SCOOP_BRANCH to develop

scoop config SCOOP_BRANCH develop
scoop update

It's not work yet, and I found that aria2 caused the problem, maybe the network caused the problem, but I can download all the files from browser. aria2 log: [SocketCore.cc:1018] errorCode=1 SSL/TLS handshake failure.

brandon3343 avatar Nov 17 '21 07:11 brandon3343

Please check if it still occurred after set SCOOP_BRANCH to develop

scoop config SCOOP_BRANCH develop
scoop update

呀,大哥自己人呀,我翻墙了,clash全局翻墙那种,怎么还是会报错呢,明明浏览器没问题呀,我不用aria2就是正常的。

brandon3343 avatar Nov 17 '21 23:11 brandon3343

Maybe TLS error? Try to delete https://github.com/ScoopInstaller/Scoop/blob/2bc2e652e34893b91bc07c4e7a9b2ea2394f9d9c/lib/install.ps1#L225 and try again.

Please check if it still occurred after set SCOOP_BRANCH to develop

scoop config SCOOP_BRANCH develop
scoop update

呀,大哥自己人呀,我翻墙了,clash全局翻墙那种,怎么还是会报错呢,明明浏览器没问题呀,我不用aria2就是正常的。

niheaven avatar Nov 18 '21 01:11 niheaven

Maybe TLS error? Try to delete

https://github.com/ScoopInstaller/Scoop/blob/2bc2e652e34893b91bc07c4e7a9b2ea2394f9d9c/lib/install.ps1#L225

and try again.

Please check if it still occurred after set SCOOP_BRANCH to develop

scoop config SCOOP_BRANCH develop
scoop update

呀,大哥自己人呀,我翻墙了,clash全局翻墙那种,怎么还是会报错呢,明明浏览器没问题呀,我不用aria2就是正常的。

There's a wrong proxy rule( aria2 not proxy ) caused the problem, My fault : (

brandon3343 avatar Nov 18 '21 07:11 brandon3343

Okay, the proxy setting in scoop is somehow confused, we'll check the code base and unify them.

niheaven avatar Nov 18 '21 09:11 niheaven

what happens if delete the cache folder then install(with aria2). will the cache/app.txt file be created?

I reproduced the problem。 1、install a old version of nano. 2、enable or disable aria2 here. 3、delete cache folder. 4、scoop update nano -f.

case1: if aria2 is disabled cache folder will be created case2: if aria2 is not disabled cache folder won't be created, and show the same error.

brandon3343 avatar Nov 18 '21 23:11 brandon3343

Hi, I have the same problem too. I wonder, when I use "scoop config aria2-enabled true", the same time I set scoop use proxy. Will it use aria2 through the proxy ?

Eastegg avatar Feb 06 '22 08:02 Eastegg

what happens if delete the cache folder then install(with aria2). will the cache/app.txt file be created?

I reproduced the problem。 1、install a old version of nano. 2、enable or disable aria2 here. 3、delete cache folder. 4、scoop update nano -f.

case1: if aria2 is disabled cache folder will be created case2: if aria2 is not disabled cache folder won't be created, and show the same error.

Maybe when we set aria2 on ,aria2 will not through the scoop proxy. Have anyone knows how should I set aria2 on proxy?

Eastegg avatar Feb 06 '22 09:02 Eastegg

You can pass arguments to aria2 using the aria2-options config - see https://github.com/ScoopInstaller/Scoop#multi-connection-downloads-with-aria2

rashil2000 avatar Feb 06 '22 09:02 rashil2000

just run this to disable ssl cert validation:

scoop config aria2-options "--check-certificate false"

detain avatar Nov 11 '22 02:11 detain