WSL-Hello-sudo icon indicating copy to clipboard operation
WSL-Hello-sudo copied to clipboard

Authenticator fails to find valid window when Hello detection returns false

Open BlackHoleFox opened this issue 4 years ago • 0 comments

In the case that Windows Hello isn't supported, but a key is still generated (or you just run the WindowsHelloAuthenticator` binary by hand), it fails to upon the expected error UI box.

Output:

> sudo whoami

Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.Exception: Invalid window handle.

This API must be called from a thread with a CoreWindow or a window must have been set explicitly.
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at WindowsHelloAuthenticator.Program.<VerifyUser>d__9.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at WindowsHelloAuthenticator.Program.Main(String[] args)

This all said, I'm not sure if there's actually a way to open a window on the desktop from WSL like this.

System details: WSL Version: 1, Ubuntu 18 OS Info: Windows 10 Pro, 19043.1288 Terminal: Windows Terminal Preview

BlackHoleFox avatar Oct 27 '21 03:10 BlackHoleFox