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

dotnet restore never completes #17481

Open
CollinAlpert opened this issue Oct 9, 2023 · 6 comments
Open

dotnet restore never completes #17481

CollinAlpert opened this issue Oct 9, 2023 · 6 comments

Comments

@CollinAlpert
Copy link

This one is a bit difficult to reproduce and to explain. Once in a while, when I execute dotnet restore on the command line, I get the "Determining projects to restore..." output, followed by "error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json" after a few minutes, but after that nothing happens and the command never completes. Restarting the computer always solves the issue and dotnet restore completes without any problems, however a restart is the only solution I have found so far.

As far as I can tell this happens at random times and I haven't been able to correlate to any certain event reliably. Here are a few of my observations, however please take my confirmation bias into account:

  • Oftentimes when the issue occurred, I had been working on dotnet/roslyn-analyzers the day before.
  • I first encountered the issue sometime after installing the preview version of .NET 7.
  • The issue always arises after being away from my computer for a few hours. It never worked and then stopped working while I was sitting at the computer, so I am thinking maybe something "Sleep"-related (in terms of the computer).
  • Maybe this is Apple Silicon related? I have a Windows machine and have never had this issue there, even when having Preview versions installed and working on dotnet/roslyn-analyzers.
  • There is no fixed time after the computer restart when the issue resurfaces. Sometimes everything will work for a few weeks, sometimes only for a couple of days.

I am just dumping this here in the hopes that someone a lot smarter than me will be able to make sense of it. Please let me know if you need more information or if you want me to try anything, I am desperate to get this resolved since it is very annoying.

Screenshot 2023-10-09 at 18 36 48

dotnet --info output:

.NET SDK:
 Version:   8.0.100-rc.1.23463.5
 Commit:    e7f4de8816

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  13.6
 OS Platform: Darwin
 RID:         osx-arm64
 Base Path:   /Users/collin/.dotnet/sdk/8.0.100-rc.1.23463.5/

.NET workloads installed:
There are no installed workloads to display.

Host:
  Version:      8.0.0-rc.1.23419.4
  Architecture: arm64
  Commit:       92959931a3
  RID:          osx-arm64

.NET SDKs installed:
  8.0.100-rc.1.23463.5 [/Users/collin/.dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.13 [/Users/collin/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.2 [/Users/collin/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.0-preview.6.23329.11 [/Users/collin/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.0-preview.7.23375.9 [/Users/collin/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.0-rc.1.23421.29 [/Users/collin/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.11 [/Users/collin/.dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.13 [/Users/collin/.dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.0 [/Users/collin/.dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.2 [/Users/collin/.dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.0-preview.6.23329.7 [/Users/collin/.dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.0-preview.7.23375.6 [/Users/collin/.dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.0-rc.1.23419.4 [/Users/collin/.dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [/Users/collin/.dotnet]

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

I am running macOS Ventura 13.6 with an M1 Pro chip.

@marcpopMSFT
Copy link
Member

@nkolev92 @zivkan is the timeout on the nuget side or on the SDK side?

@nkolev92
Copy link

The timeout is likely NuGet.

@CollinAlpert We haven't seen too many of these issues.

If you enable normal verbosity, you'd get more details about potential http calls being made.
Best way to help investigate a potential hang is to grab a procdump.

@CollinAlpert
Copy link
Author

It happened again and I managed to create a Sample and a Spindump (using the Mac's Activity Monitor) of the dotnet restore process.

dump.txt
sample.txt

@CollinAlpert
Copy link
Author

Unfortunately the problem still persists even after installing .NET 8. So it seems it has nothing to do with the preview versions.

@naeimsf
Copy link

naeimsf commented Mar 18, 2024

same issue here

@zachpainter77
Copy link

For me the issue was I needed to put my project name before the feedname.. like:
vstsFeed: <devops project name>/<artifact feed name>

another big indicator is if you look at the url that the app is trying to connect to, it might not be right. Try navigating to it and then comparing it to the one that you get if you click "connect to feed" in azure artifacts.

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

5 participants