NuGet / NuGetGallery

NuGet Gallery is a package repository that powers https://www.nuget.org. Use this repo for reporting NuGet.org issues.
https://www.nuget.org/
Apache License 2.0
1.55k stars 643 forks source link

[NuGet.org Bug]: Unable to access api.nuget.org using the .NET SDK, but can access it using curl or Firefox. #9769

Closed gimbling-away closed 9 months ago

gimbling-away commented 10 months ago

Impact

I'm unable to use NuGet.org

Describe the bug

When I do dotnet restore, it times out while fetching https://api.nuget.org/v3/index.json but I can access it using curl or open it in Firefox.

Note: I honestly have no idea whether this is a .NET SDK bug or a NuGet.org problem. The original issue at dotnet/sdk for this is https://github.com/dotnet/sdk/issues/37673. I did see similar issues regarding connectivity to the API in this repo, so felt this should be the place. I apologize if this is the wrong place. 😅

Repro Steps

Expected Behavior

Not time out

Screenshots

image

Additional Context and logs

No response

gimbling-away commented 10 months ago

Going through some older similar issues, --disable-parallel doesn't seem to help either

gimbling-away commented 10 months ago

Weird, I tried using a VPN and it instantly restores. That doesn't explain why I am able to access the API using curl or Firefox though without the VPN.

zhhyu commented 10 months ago

Hi! My apologies for this inconvenience! Some intermittent failures were detected in some regions and likely our CDN provider in your region had a regression at that time. If it is still happening, could you please follow this document (https://learn.microsoft.com/en-us/nuget/nuget-org/nuget-org-faq#why-can-t-i-restore-packages-from-nuget-org) and send more diagnose information to the support mailbox? There are also some suggestions in the document that should help you enhance the resilience on the client side.

Feel free to reach out to the support mailbox or open an issue under this repo at any time when you meet failures!

gimbling-away commented 10 months ago

Hey \o

Can still reproduce it unfortunately :(

Ben305 commented 10 months ago

Possibly related: https://github.com/NuGet/Home/issues/13148

gimbling-away commented 9 months ago

Can't reproduce anymore, seems fixed, cheers! 🥳