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
-
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
-
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
-
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
-
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
-
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