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

Symlink errors? Failures when downloading; "Something went wrong" #3767

Open
haf opened this issue Jan 2, 2020 · 7 comments
Open

Symlink errors? Failures when downloading; "Something went wrong" #3767

haf opened this issue Jan 2, 2020 · 7 comments

Comments

@haf
Copy link
Member

haf commented Jan 2, 2020

Description

Paket has started throwing lots of errors while restoring in the latter releases:

-version 5.226.0
-clitool paket 5.226.0
+version 5.241.5
+clitool paket 5.241.5

or:

 Downloading fake-cli 5.19.0 (Build)
 Download of fake-cli 5.19.0 (Build) done in 1 second. (53127 kbit/s, 7 MB)
 Downloading Http.fs 5.3
 Something went wrong while downloading System.Diagnostics.PerformanceCounter 4.5
 Message: Start of process ln failed.
   ==> Trying again
 Downloading Argu 5.5
 Downloading System.Diagnostics.PerformanceCounter 4.5
 Something went wrong while downloading runtime.rhel.7-x64.runtime.native.System.    Security.Cryptography.OpenSsl 4.3.3
 Message: Start of process ln failed.
   ==> Trying again

Repro steps

Please provide the steps required to reproduce the problem

  1. .paket/paket install

Expected behavior

Please provide a description of the behavior you expect.

Paket should not corrupt installs or else it should say what's wrong, not just "Something went wrong", as that's not a proper error message to act on.

Known workarounds

Downgrade? Perhaps it's .net 3.1-based?


Another output:

Downloading Paket 5.241.5
Download of System.Runtime.InteropServices 4.3 done in 373 milliseconds. (55700 kbit/s, 2 MB)
Not moving as '/Users/h/.nuget/packages/paket/5.241.5/paket.5.241.5.nupkg' already exists (maybe some other instance downloaded it as well)
Download of Paket 5.241.5 done in 2 seconds. (23799 kbit/s, 5 MB)
Performance:
 - Resolver: 28 seconds (2 runs)
    - Runtime: 1 second
    - Blocked (retrieving package details): 26 seconds (329 times)
    - Blocked (retrieving package versions): 1 second (2 times)
 - Disk IO: 1 second
 - Average Download Time: 187 milliseconds
 - Number of downloads: 10
 - Average Request Time: 61 milliseconds
 - Number of Requests: 528
 - Runtime: 36 seconds
Paket failed with
-> Could not find nuspec in '/Users/h/dev/app/packages/Paket', try deleting the directory and restoring again.

Same issue with 6.0.0-alpha011.

@forki
Copy link
Member

forki commented Jan 3, 2020 via email

@haf
Copy link
Member Author

haf commented Jan 3, 2020

It's probably not related to network issues as this happens no matter on what network I'm on. But I think it is related to storage: symlinks that seemingly got broken a few releases back, or because of an upgrade to .net core 3.1.

  • the Paket folder is empty
  • " Message: Start of process ln failed."

Removing the storage option makes it all work again.

@forki
Copy link
Member

forki commented Jan 3, 2020 via email

@haf
Copy link
Member Author

haf commented Jan 3, 2020

So then it might be due to either security upgrades on macOS's part of because I've installed the latest .Net Core. Let's keep this issue open for symlink-related errors?

@haf haf changed the title Upgrading to latest causes lots of failures when downloading Symlink errors? Failures when downloading; "Something went wrong" Jan 3, 2020
@forki
Copy link
Member

forki commented Jan 3, 2020 via email

@ThisFunctionalTom
Copy link

I just got the same error on windows.

Repro:

dotnet new -i waypoint
dotnet new waypoint
dotnet tool restore
dotnet paket restore

and I get following error:

Paket failed with
-> symlink C:\Users\leko.tomas\.nuget\packages\runtime.fedora.28-x64.runtime.native.system.security.cryptography.openssl\4.3.3 -> C:\Users\Leko.Tomas\playground\Svldb.Core\packages\docs\runtime.fedora.28-x64.runtime.native.System.Security.Cryptography.OpenSsl failed with error : [1] with output :
    and error : You do not have sufficient privilege to perform this operation.

@ThisFunctionalTom
Copy link

I just got the same error on windows.

Repro:

dotnet new -i waypoint
dotnet new waypoint
dotnet tool restore
dotnet paket restore

and I get following error:

Paket failed with
-> symlink C:\Users\leko.tomas\.nuget\packages\runtime.fedora.28-x64.runtime.native.system.security.cryptography.openssl\4.3.3 -> C:\Users\Leko.Tomas\playground\Svldb.Core\packages\docs\runtime.fedora.28-x64.runtime.native.System.Security.Cryptography.OpenSsl failed with error : [1] with output :
    and error : You do not have sufficient privilege to perform this operation.

So, I just found out the solution.

It is not a problem of paket but in windows the symlinks cannot be created without elevated shell. In windows 10 you have to enable "Developer Mode" to enable creating symlinks from the command line without elevated shell. For more information see here: https://blogs.windows.com/windowsdeveloper/2016/12/02/symlinks-windows-10/

knocte pushed a commit to fsprojects/FSharpLint that referenced this issue Nov 22, 2023
I've been trying to get everything [building with .NET 6](#606) and the related tooling, and have been getting CI build failures in the macOS builds, with errors that look like those described at fsprojects/Paket#3767

It looks like changing Paket to use 'packages' storage instead of 'symlink' avoids that issue, by putting the restored nuget packages directly into the local packages folder instead of symlinking them. (I don't know much about this Paket feature - the docs suggest its for reducing disk usage by avoid duplicates, which might not really be an issue for the builds?)

On a related note, we also have this issue - #578 - where you have to either run the build as admin on windows or set some extra OS options otherwise the package restore will fail. I think this change would avoid that as well.

Note: Changing the paket storage to 'none' helped with package restore issue, but caused the 'docs' build to break for me because the Fornax tool couldn't find the libraries, whereas it works when set to 'packages'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants