10

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.

Rickless
  • 1,377
  • 3
  • 17
  • 36
  • I tried explicitly downloading one of these packages, rider complains about, manually form the browser and it succeeded – Rickless Feb 11 '18 at 12:44
  • Sorry, I'm running it form home. – Rickless Feb 11 '18 at 12:45
  • Are you able to restore the packages using `dotnet restore` from terminal in the project folder? (see https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-restore?tabs=netcore2x) – Zdeněk Jelínek Feb 11 '18 at 12:48
  • @ZdeněkJelínek I've edited the question – Rickless Feb 11 '18 at 12:59
  • 2
    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 Feb 11 '18 at 13:00
  • 2
    Anyway, this looks more like a network issue between you and the NuGet server, not related to Rider which only integrates the dotnet sdk. – Zdeněk Jelínek Feb 11 '18 at 13:13
  • 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 else – Rickless Feb 11 '18 at 14:09

1 Answers1

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.

Zdeněk Jelínek
  • 2,611
  • 1
  • 17
  • 23
  • 4
    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. – Rickless Feb 11 '18 at 20:07
  • 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. – Darshana Patel Apr 16 '20 at 09:51
  • 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? – Zdeněk Jelínek Apr 16 '20 at 09:58
  • @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 Apr 16 '20 at 11:31
  • 1
    @ZdeněkJelínek, please check this thread as well for more info- https://stackoverflow.com/questions/61248102/nuget-package-failed-to-restore-with-the-error-the-http-request-has-timed-out – Darshana Patel Apr 16 '20 at 11:35
  • 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](https://learn.microsoft.com/en-us/nuget/consume-packages/managing-the-global-packages-and-cache-folders)). You may also try restoring with a higher Verbosity level to diagnose further (see [Nuget restore reference](https://learn.microsoft.com/en-us/nuget/reference/cli-reference/cli-ref-restore)) – Zdeněk Jelínek Apr 16 '20 at 11:35
  • @ZdeněkJelínek, I have checked clearing all cache too. But so unfortunate with this. – Darshana Patel Apr 16 '20 at 12:35