Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    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

    Scheduled Pinned Locked Moved Support
    7 Posts 3 Posters 34 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      scott.wright_8356
      last edited by

      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)
      
      atrippA 1 Reply Last reply Reply Quote 0
      • atrippA Offline
        atripp inedo-engineer @scott.wright_8356
        last edited by

        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();
                }
        
        1 Reply Last reply Reply Quote 0
        • S Offline
          scott.wright_8356
          last edited by

          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

          atrippA 1 Reply Last reply Reply Quote 0
          • atrippA Offline
            atripp inedo-engineer @scott.wright_8356
            last edited by

            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

            1 Reply Last reply Reply Quote 0
            • A Offline
              appplat_4310
              last edited by

              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?

              atrippA 1 Reply Last reply Reply Quote 0
              • atrippA Offline
                atripp inedo-engineer @appplat_4310
                last edited by

                @appplat_4310 yes please :)

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

                A 1 Reply Last reply Reply Quote 0
                • A Offline
                  appplat_4310 @atripp
                  last edited by

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

                  1 Reply Last reply Reply Quote 1

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  • 1 / 1
                  • First post
                    Last post
                  Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation