You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you plug / unplug a Yubikey a lot (and YubiKeyDeviceListener has been instantiated), it's possible to occasionally hit a KeyNotFoundException in CmDevice.
This exception is thrown on a background thread, meaning that it crashes the user's application, and there is no way for the user to prevent this.
The stack trace is:
Yubico.Core.dll!Yubico.PlatformInterop.CmDevice.GetProperty<string>(Yubico.PlatformInterop.CmDeviceProperty property) Line 112
Yubico.Core.dll!Yubico.PlatformInterop.CmDevice.CmDevice(string devicePath) Line 41
Yubico.Core.dll!Yubico.Core.Devices.Hid.WindowsHidDeviceListener.OnEventReceived(nint hNotify, nint context, Yubico.PlatformInterop.NativeMethods.CM_NOTIFY_ACTION action, nint eventDataPtr, int eventDataSize) Line 97
The line in question is this one, called with CmDeviceProperty.PdoName from here.
Expected Behavior
The expected behaviour is that Yubikey does not crash the user's application in an unrecoverable way.
Steps To Reproduce
In a Windows project, subscribe to YubiKeyDeviceListener.Instance.Arrived. I don't think the subscription is actually necessary (just accessing YubiKeyDeviceListener.Instance might be enough), since the YuibKeyDeviceListener ctor calls HidDeviceListener.Create(), which is what instantiates WindowsHidDeviceListener, which is what has the unsafe event handler.
Plug and unplug the Yubikey a lot (might take a number of minutes). Vary the amount of time that the Yubikey is plugged in for, but no need to have it plugged in for more than 2s. Having Yubico Authenticator open at the same time might help reproduce, but I have seen it with nothing else open
Watch your application crash with the above exception
I have seen this pop up two or three times in normal usage.
Version
1.9.0
Version
5.4.3
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Current Behavior
If you plug / unplug a Yubikey a lot (and
YubiKeyDeviceListener
has been instantiated), it's possible to occasionally hit aKeyNotFoundException
inCmDevice
.This exception is thrown on a background thread, meaning that it crashes the user's application, and there is no way for the user to prevent this.
The stack trace is:
The line in question is this one, called with
CmDeviceProperty.PdoName
from here.Expected Behavior
The expected behaviour is that Yubikey does not crash the user's application in an unrecoverable way.
Steps To Reproduce
YubiKeyDeviceListener.Instance.Arrived
. I don't think the subscription is actually necessary (just accessingYubiKeyDeviceListener.Instance
might be enough), since theYuibKeyDeviceListener
ctor callsHidDeviceListener.Create()
, which is what instantiatesWindowsHidDeviceListener
, which is what has the unsafe event handler.I have seen this pop up two or three times in normal usage.
Version
1.9.0
Version
5.4.3
Anything else?
No response
The text was updated successfully, but these errors were encountered: