Restoring nuget packages of a solution in .net Rider IDE: Failed to download package `x` The HTTP request to GET `x` has timedout after 100000ms
Asked Answered
G

2

13

I have ArchLinux distro, I'm testing .Net SDK on Linux for the first time. I installed a trial version of JetBrains Rider IDE. I created new ASP.Net Core project, but I get this error message in the Event Log window when building the solution or manually restoring Nuget packages of the solution:

1:51 PM Can't restore NuGet packages in integrated projects Failed to retrieve information about 'Microsoft.AspNetCore.WebUtilities' from remote source 'https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.webutilities/index.json'. Settings Log Packages folder

1:51 PM Restore failed Failed to retrieve information about 'Microsoft.AspNetCore.WebUtilities' from remote source 'https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.webutilities/index.json'. Settings Log Packages folder

This is the Log window content, as it's very large content I uploaded it to google drive: Here

Is anyone has faced this problem before? Also, why rider is trying to fetch all Nuget packages on planet Earth? I don't have a reference to Microsoft.Win32.Registry and one of these error lines complain:

COREMINIMAL: Failed to download package 'Microsoft.Win32.Registry.4.4.0'

EDIT 1

After, trying dotnet restore I get the following output:

$ dotnet restore

Permission denied to modify the '/opt/dotnet/sdk/NuGetFallbackFolder' folder.

Here are some options to fix this error:
---------------------
1. Re-run this command with elevated access.
2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true.
3. Copy the .NET Core SDK to a non-protected location and use it from there.

  Restoring packages for /home/m/Prog Projects Mid 2018/CSharp/testingRider/WebApplication1/WebApplication1/WebApplication1.csproj...
  Failed to download package 'Microsoft.Win32.Registry.4.4.0' from 'https://api.nuget.org/v3-flatcontainer/microsoft.win32.registry/4.4.0/microsoft.win32.registry.4.4.0.nupkg'.
  The download of 'https://api.nuget.org/v3-flatcontainer/microsoft.win32.registry/4.4.0/microsoft.win32.registry.4.4.0.nupkg' timed out because no data was received for 60000ms.
    Exception of type 'System.TimeoutException' was thrown.
  Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.webutilities/index.json'.
  An error occurred while sending the request.
    SSL connect error
  Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.mvc.viewfeatures/index.json'.
  An error occurred while sending the request.

The output is long too, and most of it is about retrying to download packages.

Griseous answered 11/2, 2018 at 12:43 Comment(7)
I tried explicitly downloading one of these packages, rider complains about, manually form the browser and it succeededGriseous
Sorry, I'm running it form home.Griseous
Are you able to restore the packages using dotnet restore from terminal in the project folder? (see learn.microsoft.com/en-us/dotnet/core/tools/…)Anecdotal
@ZdeněkJelínek I've edited the questionGriseous
Have you tried the steps to alleviate the issue recommended by the tool's output? You can also adjust the output verbosity as per the link attached in my previous comment.Anecdotal
Anyway, this looks more like a network issue between you and the NuGet server, not related to Rider which only integrates the dotnet sdk.Anecdotal
Thank you so much @ZdeněkJelínek, you were right, I mistakenly assumed that the problem caused by the IDE were in fact it is a network problem and dotnet CLI tool parameters. Can you please add the latest two comments as answer so I can close this question, I decided to keep the question as it might help someone elseGriseous
G
5

According to the attached Rider and dotnet logs, this problem is not related to Rider IDE.

There appears to be some first-time experience feature of dotnet that requires an access to dotnet/sdk/NuGetFallbackFolder which is not given so you get an error in the logs but that is probably not the real root case.

The issue is somewhere in your network between your computer and NuGet server as per the log message The download of 'https://api.nuget.org/v3-flatcontainer/microsoft.win32.registry/4.4.0/microsoft.win32.registry.4.4.0.nupkg' timed out because no data was received for 60000ms.

You should probably check your network and dotnet/NuGet settings.

Godgiven answered 11/2, 2018 at 19:54 Comment(7)
The problem is that my internet connection is not very stable, it's randomly stable so to speak. Sometimes a package get downloaded within 500-700 ms time frame, sometimes more. The real problem is that dotnet uses parallel to speed up packages downloading so multiple packages downloaded at the same time, the solution was just to disable the paralleling dotnet restore --disable-parallel so just one file get downloaded at the same time, no file will take more than 10 seconds limit, and everything is OK now.Griseous
Hi, I am facing the same issue. I am using nuget.exe restore to restore packages. but the same error is coming for only One single package and that to when I try to restore it from different network's build machine( I am able to browse that artifactory URL from that machine). On the same network's build machine this package is getting restored. Can you suggest on this ? -- I tried disabling parallel process. but no luck with the same error.Concession
Well, the general rule applies - your nuget cannot reach the nuget server. Is there perhaps any network configuration in place that is required for you to reach into the other network? Proxies? Firewalls?Anecdotal
@ZdeněkJelínek, except one, all other packages are getting restored. and also able to browse the link. Still can we consider it for proxies and firewall (network issue)?Concession
@ZdeněkJelínek, please check this thread as well for more info- #61248602Concession
Yes, it is possible for e.g. browser to already have proxy configuration where the NuGet client has none. It is possible that the other resolved packages are already cached - try purging the cache and restoring again (see Nuget cache docs). You may also try restoring with a higher Verbosity level to diagnose further (see Nuget restore reference)Anecdotal
@ZdeněkJelínek, I have checked clearing all cache too. But so unfortunate with this.Concession
E
0

If your feed is a private feed, you can execute the below command on the Rider's terminal tab,

dotnet restore --interactive

This way, it will give you directions to log the IDE in to use the private feed.

Exit answered 19/8 at 16:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.