Intermittent failure to authenticate on WSL
janheindejong opened this issue · 3 comments
janheindejong commented
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:
- Run Ubuntu on WSL on Windows
- Install Poetry
- Add artifacts keyring (
poetry self add artifacts-keyring
) - 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 commented
Setting poetry config installer.parallel false
helps. It seems that if two installations are fired at the same time, it fails.
JohnSchmeichel commented
Thanks for reporting this, opened an issue on the artifacts credential provider microsoft/artifacts-credprovider#416