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!

    NuGet restore fails with HTTP500 even if push works in Azure Devops Server 2019

    Scheduled Pinned Locked Moved Support
    5 Posts 2 Posters 12 Views
    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.
    • B Offline
      bju_2095
      last edited by

      Hello,

      I'm using a ProGet server to store our NuGet packages,
      and we run into a problem when restoring packages in an
      Azure Devops Server 2019 build pipeline.

      The servers answers with HTTP 500 when restoring packages :

      Retrying 'FindPackagesByIdAsyncCore' for source 'https://../nuget//FindPackagesById()?id='..**'&semVerLevel=2.0.0'.
      Response status code does not indicate success: 500 (Internal Server Error).

      We are using API Key authentication and this is the error message in the ProGet console :

      An error occurred in the web application: Value cannot be null. Parameter name: userName
      Details:
      URL: http://../nuget//FindPackagesById()?id='..**'&semVerLevel=2.0.0
      Referrer: (not set)
      User: (unknown)
      User Agent: NuGet .NET Core MSBuild Task/5.7.0 (Microsoft Windows 6.3.9600)
      Stack trace: at Inedo.ProGet.Extensions.UserDirectories.BuiltInUserDirectory.TryGetAndValidateUser(String userName, String password)
      at Inedo.ProGet.WebApplication.ProGetHttpModule.ValidateUser(HttpApplication app, String userName, String password)
      at Inedo.Web.InedoHttpModule.AuthenticateRequestAsync(HttpApplication app)
      at Inedo.Web.InedoHttpModule.ProcessBegin(Object sender, EventArgs e, AsyncCallback cb, Object extraData)
      at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
      at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
      at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

      There is no problem in Visual Studio or for publishing packages.

      We are using ProGet 3.2.

      Do you have any clue ?

      Best Regards,
      Bruno Juste

      1 Reply Last reply Reply Quote 0
      • rhessingerR Offline
        rhessinger inedo-engineer
        last edited by

        Hi @bju_2095,

        It looks like Azure DevOps is looking to use a username and password with ProGet but the username is not set. If you are using an API key, then you would need to use api for the username and then your API key as the password. Is that what you are currently using to connect to ProGet?

        Thanks,
        Rich

        Products Engineer, Inedo

        1 Reply Last reply Reply Quote 0
        • B Offline
          bju_2095
          last edited by

          Hello,

          thank you for your quick response, I setup a quick
          more isolated reproduction setting and it seems the problem
          is when there are two feeds.

          When I specify an API key, I do not have the possibility
          to specify a username.

          I can only specify one set of credentials in the Azure Devops
          task, even if the account used has the rights on both feeds.
          It then fails with the above error message.

          If I make a small project with only one of the two feeds, it works.

          I'll try on my big project to have only one feed.

          Best Regards,
          Bruno Juste

          1 Reply Last reply Reply Quote 0
          • B Offline
            bju_2095
            last edited by

            Ok confirmed : it works with only one feed, but as soon as I have two feeds, things mess up and I have the error above.

            Is this more on Azure Devops or ProGet do you think ?

            Best Regards,
            Bruno Juste

            1 Reply Last reply Reply Quote 0
            • rhessingerR Offline
              rhessinger inedo-engineer
              last edited by

              Hi @bju_2095,

              Are you using a Nuget.config file for specifying your multiple feeds? From what I can see is Azure DevOps wants you to use the NuGet.config when specifying multiple NuGet feeds. I would lean towards this being an issue with Azure DevOps. Can I confirm that you are using ProGet 3.2? You could create a new feed in ProGet with connectors pointing to the existing two feeds you need. Then Azure DevOps would only need to connect to one feed.

              Thanks,
              Rich

              Products Engineer, Inedo

              1 Reply Last reply Reply Quote 0

              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