Open EchterAgo opened 1 month ago
Interesting, I will try to reproduce that and figure out how to fix it.
I noticed that I wasn't running the latest version yet, I have upgraded now and will see if the issue happens again. I noticed it occasionally with the version from June.
So far I haven't gotten AuthenticatorChooser to crash, but I have gotten AuthenticatorChooser to move the dialog box to the top-left corner of the screen if the dialog opens while the Alt+Tab window is open. Even when AuthenticatorChooser isn't running, opening a credentials dialog while the Alt+Tab window is open seems to frequently cause both the credentials window and Alt+Tab windows to become invisible and frozen, requiring you to kill CredentialsUIHost.exe
to proceed, but sometimes that's insufficient and Alt+Tab is still invisible and frozen after that, at which point you have to restart explorer.exe
using Task Manager's Restart Task or by just killing it.
I will keep working on this and also send you a build that has logging and line numbers to get more detailed information.
To easily get a WebAuthn dialog box to appear when I want, I am following these steps.
setTimeout(() => document.getElementById("login-button").click(), 1000);
The Alt+Tab window has class XamlExplorerHostIslandWindow
and title Task Switching
from process explorer.exe
. (The old 95/NT CoolSwitch is from csrss.exe
and you can trigger it with Alt+Alt+Tab).
To make issues easier to debug, I should also
Exe
and recompileHere is a development build with the following changes.
COMException
from your stacktraceAdded ability to log debug messages to a file
# log to %TEMP%\AuthenticatorChooser.log
.\AuthenticatorChooser.exe --log
# log to custom file path
.\AuthenticatorChooser.exe --log="c:\users\ben\desktop\ac.log"
It seems that getUserLocaleId
throws for me on startup:
---------------------------
AuthenticatorChooser
---------------------------
Uncaught exception: System.TypeInitializationException: The type initializer for 'AuthenticatorChooser.I18N' threw an exception.
---> System.Security.SecurityException: Requested registry access is not allowed.
at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
at Microsoft.Win32.Registry.GetValue(String keyName, String valueName, Object defaultValue)
at AuthenticatorChooser.I18N.getUserLocaleId(Boolean currentUser) in /_/AuthenticatorChooser/I18N.cs:line 83
at AuthenticatorChooser.I18N..cctor() in /_/AuthenticatorChooser/I18N.cs:line 30
--- End of inner exception stack trace ---
at AuthenticatorChooser.I18N.getUserLocaleId(Boolean currentUser) in /_/AuthenticatorChooser/I18N.cs:line 83
at AuthenticatorChooser.Startup.OnExecute() in /_/AuthenticatorChooser/Startup.cs:line 52
---------------------------
OK
---------------------------
I also see the same when using shell to query the value:
C:\Users\axel>reg query "HKEY_USERS\S-1-5-20\Control Panel\International"
ERROR: Access is denied.
Thanks, I'll find another way to read that. I must not have tested with the right permissions.
Note to self: try https://learn.microsoft.com/en-us/powershell/module/international/get-winsystemlocale?view=windowsserver2022-ps
Here is a fixed version that fetches the system locale using a Windows API call instead of a registry read on a different user's hive. Tested on Windows 11 23H2 with UAC turned all the way up.
I keep seeing this sometimes. I think it happens if the security key dialog opens when the Alt+Tab switcher is open.