microsoft / artifacts-credprovider

The Azure Artifacts Credential Provider enables dotnet, NuGet.exe, and MSBuild to interactively acquire credentials for Azure Artifacts feeds.
MIT License
747 stars 709 forks source link

Azure Artifacts Credential provider failing to start #454

Closed vickyen closed 5 months ago

vickyen commented 10 months ago

Hi, I'm seeing an issue where Azure Artifacts credential provider is failing to start and timing out. Previously, the timeout was set to 5s and was increased to 60s, but we are still seeing this issue.

Has anyone seen this before?

Here's the stack trace: Using d:\os\tools\CredentialProvider\CredentialProvider.Microsoft\CredentialProvider.Microsoft.exe as a credential provider plugin. Problem starting the plugin 'd:\os\tools\CredentialProvider\CredentialProvider.Microsoft\CredentialProvider.Microsoft.exe'. Plugin 'CredentialProvider.Microsoft' failed within 60.070 seconds with exit code -1. NuGet.Protocol.Plugins.PluginException: Plugin 'CredentialProvider.Microsoft' failed within 60.070 seconds with exit code -1. ---> System.Threading.Tasks.TaskCanceledException: A task was canceled. at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NuGet.Protocol.Plugins.MessageDispatcher.d29`2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NuGet.Protocol.Plugins.SymmetricHandshake.d14.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NuGet.Protocol.Plugins.Connection.d27.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NuGet.Protocol.Plugins.PluginFactory.d7.MoveNext() --- End of inner exception stack trace --- at NuGet.Protocol.Plugins.PluginFactory.d7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NuGet.Protocol.Plugins.PluginFactory.d6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NuGet.Protocol.Plugins.PluginManager.d__22.MoveNext() Problem starting the plugin 'd:\os\tools\CredentialProvider\CredentialProvider.Microsoft\CredentialProvider.Microsoft.exe'. Plugin 'CredentialProvider.Microsoft' failed within 60.070 seconds with exit code -1. Plugin 'CredentialProvider.Microsoft' failed within 60.070 seconds with exit code -1. A task was canceled.

embetten commented 9 months ago

@vickyen is the credential provider in the correct location on your machine? See the install location by Os in this section of our ReadMe. From the error message, it looks like nuget.exe is failing to find or start the plugin at all. Furthermore, can you make sure you have the latest version of the credential provider installed and please let me know if it was working before.

vickyen commented 9 months ago

Yes, I've checked that the credential provider is in the location its trying to invoke from. I have also verified that the version is the latest 1.0.0.0. It was working before and still works, but the issue is transient - we see it 0.08% of the time

embetten commented 9 months ago

The latest version is 1.0.9. And does this occur in a pipeline or locally? On what OS?

vickyen commented 8 months ago

This occurs on machines we use to build Windows, which have Windows OS. I've updated the credential provider to version 1.0.9 and will see if it helps

embetten commented 8 months ago

could be related to (or the same as) previous issue #192

github-actions[bot] commented 5 months ago

This issue has had no activity in 90 days. Please comment if it is not actually stale.