artifacts-keyring icon indicating copy to clipboard operation
artifacts-keyring copied to clipboard

Intermittent failure to authenticate on WSL

Open janheindejong opened this issue 2 years ago • 3 comments

I sometimes get the following error, when using artifacts-keyring on WSL.

Unhandled exception. System.PlatformNotSupportedException: Wait operations on multiple wait handles including a named synchronization primitive are not supported on this platform.
   at System.Threading.WaitHandle.WaitMultipleIgnoringSyncContext(IntPtr* waitHandles, Int32 numHandles, Boolean waitAll, Int32 millisecondsTimeout)
   at System.Threading.WaitHandle.WaitMultiple(ReadOnlySpan`1 waitHandles, Boolean waitAll, Int32 millisecondsTimeout)
   at System.Threading.WaitHandle.WaitMultiple(WaitHandle[] waitHandles, Boolean waitAll, Int32 millisecondsTimeout)
   at System.Threading.WaitHandle.WaitAny(WaitHandle[] waitHandles, Int32 millisecondsTimeout)
   at NuGetCredentialProvider.Util.SessionTokenCache.get_Cache()
   at NuGetCredentialProvider.Util.SessionTokenCache.TryGetValue(Uri key, String& value)
   at NuGetCredentialProvider.RequestHandlers.GetAuthenticationCredentialsRequestHandler.TryCache(GetAuthenticationCredentialsRequest request, String& cachedToken)
   at NuGetCredentialProvider.RequestHandlers.GetAuthenticationCredentialsRequestHandler.HandleRequestAsync(GetAuthenticationCredentialsRequest request)

Retrying usually helps, so no biggy, but feels like a difficult bug.

Steps to reproduce:

  1. Run Ubuntu on WSL on Windows
  2. Install Poetry
  3. Add artifacts keyring (poetry self add artifacts-keyring)
  4. Try running poetry install on project that has Azure Artifacts as default source

I'm using Poetry, but I wonder if that is the problem?

janheindejong avatar May 10 '23 14:05 janheindejong

Setting poetry config installer.parallel false helps. It seems that if two installations are fired at the same time, it fails.

janheindejong avatar May 11 '23 08:05 janheindejong

Thanks for reporting this, opened an issue on the artifacts credential provider https://github.com/microsoft/artifacts-credprovider/issues/416

JohnSchmeichel avatar Jun 01 '23 00:06 JohnSchmeichel

This issue should be fixed with 0.3.5 please let me know if the issue persists on this new version

embetten avatar Apr 29 '24 22:04 embetten

closing due to no further reports after 0.3.5

embetten avatar Oct 28 '24 18:10 embetten