Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

ProGet Packages error getting records



  • Hi Support,

    We have a problem with the packages option in ProGet. We are getting the following error when selected.

    231c0c44-e80e-4ebb-a48c-279bcedda026-image.png

    We have narrowed it down to one feed, the Maven-WTG feed. The others are working without issues.

    0b69135c-d2b8-48c4-89e9-2eb8ac3dfff7-image.png

    e2fa7c4b-12ed-4816-aa91-b66708145dd6-image.png

    There is an error in the diagnostic centre.

    Message: Value cannot be null. (Parameter 'stringToEscape')
    
    Details:
    
    System.ArgumentNullException: Value cannot be null. (Parameter 'stringToEscape')
    at System.UriHelper.EscapeString(String stringToEscape, Boolean checkExistingEscaped, ReadOnlySpan`1 unreserved, Char forceEscape1, Char forceEscape2)
    at Inedo.ProGet.WebApplication.Pages.Packages.PackageOverviewPage.BuildUrl(FeedId feedId, String group, String name, String version)
    at Inedo.ProGet.WebApplication.Controls.PackageLink.GetPackageUrl(Int32 feedId, String packageId, String groupId, String version)
    at Inedo.ProGet.WebApplication.Controls.PackageLink..ctor(FeedPackageVersions_Extended p)
    at Inedo.ProGet.WebApplication.Pages.Packages.ListLocalPackagesPage.<>c__DisplayClass18_1.<<CreateChildControls>g__enumerat|6>d.MoveNext()
    at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
    at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
    at Inedo.Web.Controls.AhTable.Inedo.Web.Controls.ISimpleCallbackHandler.ProcessRequestAsync(AhHttpContext context, String eventName, String eventArgument)
    

  • inedo-engineer

    Hi @scott-wright_8356 ,

    That's strange; I'm not sure how that's possible. There's clearly some bad/unexpected data in the maven tables, and I'm not sure how that happened. Maybe an error/bad API call? I don't know.

    Can you help us identify this by running EXEC Packages_GetPackages or SELECT * FROM FeedPackageVersions_ExtendedWithMaven, and seeing if you can spot any rows with with a null Package_Name`?

    Specifically, I'm looking for something that would cause this below function to crash. The only thing I can think of is a null Package_Name.

            public static string BuildUrl(FeedId feedId, string group, string name, string version)
            {
                var builder = new StringBuilder();
                builder.Append("/feeds/");
                builder.Append(Uri.EscapeDataString(feedId.Name));
                builder.Append('/');
                if (!string.IsNullOrWhiteSpace(group))
                {
                    builder.Append(Uri.EscapeUriString(group));
                    builder.Append('/');
                }
    
                builder.Append(Uri.EscapeDataString(name));
    
                if (!string.IsNullOrEmpty(version))
                {
                    builder.Append('/');
                    builder.Append(Uri.EscapeDataString(version));
                }
    
                return builder.ToString();
            }
    


  • Yes, Using SELECT * FROM FeedPackageVersions_ExtendedWithMaven. I have found several packages with null Package_Names across the Maven feeds. The ones for the Maven-WTG can be seen here.

    ae3c2812-0605-4a50-9609-fe72edcd2c81-image.png

    So there are a few in there. We used the bulk import process to bring these across. The Maven feed is a public cache feed, and these were all downloaded. Latest version of ProGet


  • inedo-engineer

    Hi @scott-wright_8356 ,

    Thanks for sharing that; I think I see where the issue is.

    This is recent regression... can you run the 1.FeedPackageVersions_ExtendedWithMaven.sql script that's attached to PG-2604? I think that will fix the issue.

    Thanks,
    Alana



  • Hi, we are having the exact same error when opening a Maven feed, after updating to the latest version. Should we execute the same SQL script and change the view?


  • inedo-engineer

    @appplat_4310 yes please :)

    Once I get confirmation it works, i'll commit the changes so it goes in the next maintenance release



  • @atripp We applied the script, can confirm that we are not getting the error anymore. Thanks!


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation