Yubico / yubioath-flutter

Yubico Authenticator for Desktop (Windows, macOS and Linux) and Android
https://developers.yubico.com/yubioath-flutter/
Apache License 2.0
1.03k stars 139 forks source link

Only reads Yubikey in one USB port #271

Closed pauby closed 6 years ago

pauby commented 6 years ago

Steps to reproduce

I just plug my Yubikey into any socket, except the one that works with Yubico Authenticator, to reproduce.

Expected result

It to popup and ask me for my PIN.

Actual results

I get the message 'No Yubikey detected'.

Other info

In a much older version I never had this issue (I cannot tell you the version but I do remember it used to work).

emlun commented 6 years ago

Thanks for the report. First off, please try upgrading to version 4.3.3. If the problem persists, run the executable as yubioath-desktop.exe --log-level DEBUG --log-file yubioath.log and post the contents of yubioath.log here. Please run it once with the YubiKey in a bad port and once with a good port, and post the log outputs separately.

pauby commented 6 years ago

The log file when it's in a bad port is completely empty.

The log file when it's in a good port is below:

2018-02-20T19:36:20-0000 DEBUG [ykman.descriptor.Descriptor.open_device:86] transports: 0x4, self.mode.transports: 0x7
2018-02-20T19:36:20-0000 DEBUG [ykman.descriptor.open_driver:141] Opening driver for serial: None, pid: PID.NEO_OTP_U2F_CCID
2018-02-20T19:36:20-0000 DEBUG [ykman.descriptor.open_driver:143] Attempt 1 of 10
2018-02-20T19:36:21-0000 DEBUG [ykman.descriptor.open_driver:148] Found driver: <ykman.driver_ccid.CCIDDriver object at 0x0C445370> serial: 4874427, pid: PID.NEO_OTP_U2F_CCID
2018-02-20T19:36:21-0000 DEBUG [ykman.driver_ccid.probe_capabilities_support:140] Found applet: aid: AID.OTP , capability: CAPABILITY.OTP
2018-02-20T19:36:21-0000 DEBUG [ykman.driver_ccid.probe_capabilities_support:140] Found applet: aid: AID.U2F , capability: CAPABILITY.U2F
2018-02-20T19:36:21-0000 DEBUG [ykman.driver_ccid.probe_capabilities_support:143] Missing applet: aid: AID.U2F_YUBICO , capability: CAPABILITY.U2F
2018-02-20T19:36:21-0000 DEBUG [ykman.driver_ccid.probe_capabilities_support:140] Found applet: aid: AID.PIV , capability: CAPABILITY.PIV
2018-02-20T19:36:21-0000 DEBUG [ykman.driver_ccid.probe_capabilities_support:140] Found applet: aid: AID.OPGP , capability: CAPABILITY.OPGP
2018-02-20T19:36:21-0000 DEBUG [ykman.driver_ccid.probe_capabilities_support:140] Found applet: aid: AID.OATH , capability: CAPABILITY.OATH
2018-02-20T19:36:21-0000 DEBUG [ykman.descriptor.Descriptor.open_device:86] transports: 0x4, self.mode.transports: 0x7
2018-02-20T19:36:21-0000 DEBUG [ykman.descriptor.open_driver:141] Opening driver for serial: 4874427, pid: PID.NEO_OTP_U2F_CCID
2018-02-20T19:36:21-0000 DEBUG [ykman.descriptor.open_driver:143] Attempt 1 of 10
2018-02-20T19:36:21-0000 DEBUG [ykman.descriptor.open_driver:148] Found driver: <ykman.driver_ccid.CCIDDriver object at 0x0C445350> serial: 4874427, pid: PID.NEO_OTP_U2F_CCID
2018-02-20T19:36:21-0000 DEBUG [ykman.driver_ccid.probe_capabilities_support:140] Found applet: aid: AID.OTP , capability: CAPABILITY.OTP
2018-02-20T19:36:21-0000 DEBUG [ykman.driver_ccid.probe_capabilities_support:140] Found applet: aid: AID.U2F , capability: CAPABILITY.U2F
2018-02-20T19:36:21-0000 DEBUG [ykman.driver_ccid.probe_capabilities_support:143] Missing applet: aid: AID.U2F_YUBICO , capability: CAPABILITY.U2F
2018-02-20T19:36:21-0000 DEBUG [ykman.driver_ccid.probe_capabilities_support:140] Found applet: aid: AID.PIV , capability: CAPABILITY.PIV
2018-02-20T19:36:21-0000 DEBUG [ykman.driver_ccid.probe_capabilities_support:140] Found applet: aid: AID.OPGP , capability: CAPABILITY.OPGP
2018-02-20T19:36:21-0000 DEBUG [ykman.driver_ccid.probe_capabilities_support:140] Found applet: aid: AID.OATH , capability: CAPABILITY.OATH
2018-02-20T19:36:23-0000 DEBUG [ykman.descriptor.Descriptor.open_device:86] transports: 0x4, self.mode.transports: 0x7
2018-02-20T19:36:23-0000 DEBUG [ykman.descriptor.open_driver:141] Opening driver for serial: 4874427, pid: PID.NEO_OTP_U2F_CCID
2018-02-20T19:36:23-0000 DEBUG [ykman.descriptor.open_driver:143] Attempt 1 of 10
2018-02-20T19:36:23-0000 DEBUG [ykman.descriptor.open_driver:148] Found driver: <ykman.driver_ccid.CCIDDriver object at 0x0C866B30> serial: 4874427, pid: PID.NEO_OTP_U2F_CCID
2018-02-20T19:36:23-0000 DEBUG [ykman.driver_ccid.probe_capabilities_support:140] Found applet: aid: AID.OTP , capability: CAPABILITY.OTP
2018-02-20T19:36:23-0000 DEBUG [ykman.driver_ccid.probe_capabilities_support:140] Found applet: aid: AID.U2F , capability: CAPABILITY.U2F
2018-02-20T19:36:23-0000 DEBUG [ykman.driver_ccid.probe_capabilities_support:143] Missing applet: aid: AID.U2F_YUBICO , capability: CAPABILITY.U2F
2018-02-20T19:36:23-0000 DEBUG [ykman.driver_ccid.probe_capabilities_support:140] Found applet: aid: AID.PIV , capability: CAPABILITY.PIV
2018-02-20T19:36:23-0000 DEBUG [ykman.driver_ccid.probe_capabilities_support:140] Found applet: aid: AID.OPGP , capability: CAPABILITY.OPGP
2018-02-20T19:36:23-0000 DEBUG [ykman.driver_ccid.probe_capabilities_support:140] Found applet: aid: AID.OATH , capability: CAPABILITY.OATH
2018-02-20T19:36:23-0000 DEBUG [ykman.descriptor.Descriptor.open_device:86] transports: 0x4, self.mode.transports: 0x7
2018-02-20T19:36:23-0000 DEBUG [ykman.descriptor.open_driver:141] Opening driver for serial: 4874427, pid: PID.NEO_OTP_U2F_CCID
2018-02-20T19:36:23-0000 DEBUG [ykman.descriptor.open_driver:143] Attempt 1 of 10
2018-02-20T19:36:23-0000 DEBUG [ykman.descriptor.open_driver:148] Found driver: <ykman.driver_ccid.CCIDDriver object at 0x0C445630> serial: 4874427, pid: PID.NEO_OTP_U2F_CCID
2018-02-20T19:36:23-0000 DEBUG [ykman.driver_ccid.probe_capabilities_support:140] Found applet: aid: AID.OTP , capability: CAPABILITY.OTP
2018-02-20T19:36:23-0000 DEBUG [ykman.driver_ccid.probe_capabilities_support:140] Found applet: aid: AID.U2F , capability: CAPABILITY.U2F
2018-02-20T19:36:23-0000 DEBUG [ykman.driver_ccid.probe_capabilities_support:143] Missing applet: aid: AID.U2F_YUBICO , capability: CAPABILITY.U2F
2018-02-20T19:36:23-0000 DEBUG [ykman.driver_ccid.probe_capabilities_support:140] Found applet: aid: AID.PIV , capability: CAPABILITY.PIV
2018-02-20T19:36:23-0000 DEBUG [ykman.driver_ccid.probe_capabilities_support:140] Found applet: aid: AID.OPGP , capability: CAPABILITY.OPGP
2018-02-20T19:36:23-0000 DEBUG [ykman.driver_ccid.probe_capabilities_support:140] Found applet: aid: AID.OATH , capability: CAPABILITY.OATH
dagheyman commented 6 years ago

That's weird. I don't think this is an actual issue with this software, my guess is your system have some problems with CCID communications on some USB ports. I would recommend opening a support ticket, and see if they have any ideas. Feel free to reopen this issue if you do believe the problem is in this software.

zypA13510 commented 6 years ago

I had a similar issue before, all ports on my USB hub refuse to work with my Yubikey NEO in TOTP mode (that means authenticator does not detect the device, but tapping the button will output the Yubico OTP string). After I moved my computer and reconnected all my USB devices afterward (probably connected the hub to a different port), the issue resolved on its own.

Coernel82 commented 5 years ago

I had this issue as well and it is solved easily: The Yubikey can be plugged in both ways - with the contact facing nothing and the contact really contacting contacts. Any more to say ;- So maybe the ONE usb port which is working is just turned 180° to the others.

pauby commented 5 years ago

@coernel82 that's a fundamental of plugging USB devices in. It certainly wasn't that.

The solution for me was to plug it into a USB 2 port where it worked fine. But the that's been the solution for all computers. I put it down to the software having issues with (some?) USB 3 ports (under Windows as that's all I've tested it with).