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

13,628

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.

Share:
13,628

Related videos on Youtube

Rickless
Author by

Rickless

Updated on June 04, 2022

Comments

  • Rickless
    Rickless almost 2 years

    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.

    • Zdeněk Jelínek
      Zdeněk Jelínek about 6 years
      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.
    • Zdeněk Jelínek
      Zdeněk Jelínek about 6 years
      Anyway, this looks more like a network issue between you and the NuGet server, not related to Rider which only integrates the dotnet sdk.
  • Rickless
    Rickless about 6 years
    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.
  • Darshana Patel
    Darshana Patel about 4 years
    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.
  • Zdeněk Jelínek
    Zdeněk Jelínek about 4 years
    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?
  • Darshana Patel
    Darshana Patel about 4 years
    @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)?
  • Darshana Patel
    Darshana Patel about 4 years
    @ZdeněkJelínek, please check this thread as well for more info- stackoverflow.com/questions/61248102/…
  • Zdeněk Jelínek
    Zdeněk Jelínek about 4 years
    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)
  • Darshana Patel
    Darshana Patel about 4 years
    @ZdeněkJelínek, I have checked clearing all cache too. But so unfortunate with this.