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

NRE retrieving package metadata from nuget.org feed #13804

Open
kzu opened this issue Sep 24, 2024 · 1 comment
Open

NRE retrieving package metadata from nuget.org feed #13804

kzu opened this issue Sep 24, 2024 · 1 comment
Labels

Comments

@kzu
Copy link

kzu commented Sep 24, 2024

NuGet Product Used

NuGet SDK

Product Version

6.11.0

Worked before?

No response

Impact

I'm unable to use this version

Repro Steps & Context

#r "nuget: NuGet.Protocol, 6.11.0"

using NuGet.Configuration;
using NuGet.Protocol.Core.Types;

var repository = new SourceRepository(new PackageSource("https://api.nuget.org/v3/index.json"), Repository.Provider.GetCoreV3());
var resource = await repository.GetResourceAsync<PackageMetadataResource>();

var metadata = await resource.GetMetadataAsync("Uno.WinUI.Runtime.Skia.Wpf", false, false, 
    new SourceCacheContext(), NuGet.Common.NullLogger.Instance, CancellationToken.None);

Throws as follows:

   at NuGet.Protocol.PackageMetadataResourceV3.ProcessRegistrationPage(RegistrationPage registrationPage, List`1 results, VersionRange range, Boolean includePrerelease, Boolean includeUnlisted, MetadataReferenceCache metadataCache)
   at NuGet.Protocol.PackageMetadataResourceV3.GetMetadataAsync(String packageId, Boolean includePrerelease, Boolean includeUnlisted, VersionRange range, SourceCacheContext sourceCacheContext, ILogger log, CancellationToken token)
   at NuGet.Protocol.PackageMetadataResourceV3.GetMetadataAsync(String packageId, Boolean includePrerelease, Boolean includeUnlisted, SourceCacheContext sourceCacheContext, ILogger log, CancellationToken token)
   at Program.<Main>$(String[] args) in C:\Users\dev\AppData\Local\Temp\roslynpad\build\f6b45e491fed44ce87ff7a925cf3aa27\Program.cs:line 9
   at Program.<Main>(String[] args)

NOTE: this fails regardless of where the code runs: unit test, console app, etc. I just used RoslynPad to verify outside of my scenario.

Verbose Logs

No response

@kzu
Copy link
Author

kzu commented Sep 24, 2024

Seems like it was transient, but kinda weird for it to fail :/. I added Polly around that exception too now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants