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

scoop fails to install anything with aria2 #4472

Open
Merith-TK opened this issue Oct 1, 2021 · 19 comments · May be fixed by #6257
Open

scoop fails to install anything with aria2 #4472

Merith-TK opened this issue Oct 1, 2021 · 19 comments · May be fixed by #6257
Labels

Comments

@Merith-TK
Copy link

Merith-TK commented Oct 1, 2021

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 Merith-TK changed the title scoop fails to install anything scoop fails to install anything with aria2 Oct 1, 2021
@Merith-TK
Copy link
Author

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

@HUMORCE
Copy link
Member

HUMORCE commented Oct 8, 2021

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?

@Merith-TK
Copy link
Author

File straight up does not exist

@Merith-TK
Copy link
Author

image

@HUMORCE
Copy link
Member

HUMORCE commented Oct 9, 2021

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?

@Merith-TK
Copy link
Author

Merith-TK commented Oct 9, 2021

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

@HUMORCE
Copy link
Member

HUMORCE commented Oct 9, 2021

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

@brandon3343
Copy link

It's the same case with me.

@niheaven
Copy link
Member

Please check if it still occurred after set SCOOP_BRANCH to develop

scoop config SCOOP_BRANCH develop
scoop update

@brandon3343
Copy link

brandon3343 commented Nov 17, 2021

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
Copy link

brandon3343 commented Nov 17, 2021

Please check if it still occurred after set SCOOP_BRANCH to develop

scoop config SCOOP_BRANCH develop
scoop update

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

@niheaven
Copy link
Member

Maybe TLS error? Try to delete

"--min-tls-version=TLSv1.2"
and try again.

Please check if it still occurred after set SCOOP_BRANCH to develop

scoop config SCOOP_BRANCH develop
scoop update

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

@brandon3343
Copy link

Maybe TLS error? Try to delete

"--min-tls-version=TLSv1.2"

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 : (

@niheaven
Copy link
Member

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

@brandon3343
Copy link

brandon3343 commented Nov 18, 2021

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.

@Eastegg
Copy link

Eastegg commented Feb 6, 2022

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
Copy link

Eastegg commented Feb 6, 2022

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?

@rashil2000
Copy link
Member

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

@detain
Copy link

detain commented Nov 11, 2022

just run this to disable ssl cert validation:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants