Issue ID:
Type
Bug
Title:
FIX: NuGet packages with 2.1B+ downloads cause parsing error in some searches
Created:
8/4/2022 5:57:12 AM by Alana Tripp
Status:
Awaiting Release on 8/4/2022 2:29:38 PM
Last pulled:
8/5/2022 10:54:21 AM
Description:
It appears a few Microsoft packages have passed the 2,147,483,647 mark for total downloads, and ProGet now returns a 500 status code parsing the search results if those packages are included. A little PowerShell with the standard NuGet SearchQueryService API identifies these as the offenders in the first 1000 Microsoft search results: Microsoft.NETCore.Platforms Microsoft.Extensions.Primitives Microsoft.Extensions.DependencyInjection.Abstractions Any search that returns those packages results, at least when using NuGet v3 APIs, in a 500 Server Error return code after an an OverflowException. System.OverflowException: Value was either too large or too small for an Int32. at System.Convert.ThrowInt32OverflowException() at System.Convert.ToInt32(Int64 value) at Newtonsoft.Json.Linq.JToken.op_Explicit(JToken value) at Inedo.ProGet.Feeds.NuGet.V3.NuGetPackageV3..ctor(JObject obj, NuGetConnector connector, String contentUrl, Byte[] sha512Hash, String registrationUrl) at Inedo.ProGet.Feeds.NuGet.V3.NuGetV3Client.b__8_0(JObject o) at System.Linq.Enumerable.SelectEnumerableIterator2.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator1.MoveNext() at System.Linq.Enumerable.UnionIterator1.MoveNext() at Inedo.ProGet.Feeds.NuGet.NuGetFeed.RemoveDuplicatesAndApplyFilters(IEnumerable1 source) at Inedo.ProGet.Feeds.NuGet.NuGetFeed.SearchV3Async(String searchTerm, Int32 skip, Nullable`1 maxResults, Boolean includePrerelease) at Inedo.ProGet.Feeds.NuGet.NuGetFeed.Inedo.ProGet.Feeds.IBrowsablePackageFeed.SearchPackagesAsync(String query, Int32 maxCount, Boolean includePrerelease) at Inedo.ProGet.WebApplication.Pages.Packages.ListPackagesPage.PackageList.InitializeAsyncInternal() at Inedo.ProGet.WebApplication.Pages.Packages.ListPackagesPage.PackageList.InitializeAsync() It's a hassle because it breaks some pretty common searches (most anything including Microsoft, Microsoft.Extensions, etc.),