Package: yubikey-manager
Version: 5.4.0-1
Severity: grave
X-Debbugs-Cc: hert...@debian.org
Control: forwarded -1 https://github.com/Yubico/yubikey-manager/issues/634

Hello, I am unable to use yubikey-manager in unstable right now...

$ ykman info
WARNING: Failed opening device
ERROR: Failed to connect to YubiKey.

The debug output is at the end. But the relevant bit of the log seems to
be:
DEBUG 17:00:47.882 [ykman.device.add:165] Add device for <class 
'yubikit.core.smartcard.SmartCardConnection'>: ScardYubiKeyDevice(pid=0404, 
fingerprint='Yubico YubiKey CCID 00 00')
WARNING 17:00:47.900 [ykman.device.add:179] Failed opening device
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ykman/device.py", line 171, in add
    with dev.open_connection(conn_type) as conn:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/ykman/pcsc/__init__.py", line 88, in 
open_connection
    return self._open_smartcard_connection()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/ykman/pcsc/__init__.py", line 96, in 
_open_smartcard_connection
    return ScardSmartCardConnection(self.reader.createConnection())
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/smartcard/pcsc/PCSCReader.py", line 101, 
in createConnection
    return CardConnectionDecorator(PCSCCardConnection(self.name))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Can't instantiate abstract class CardConnectionDecorator without an 
implementation for abstract methods 'doControl', 'doGetAttrib', 'doTransmit'


Once I downgrade to python3-pyscard 2.0.10 (from Debian Testing), then the
package works fine.

I also note that there's an new upstream version of the package that
is available:
https://developers.yubico.com/yubikey-manager/Releases/yubikey_manager-5.5.1.tar.gz

I haven't checked whether that version works any better. But judging from
the release notes, there's no mention of fixes related to newer versions
of pyscard:
https://developers.yubico.com/yubikey-manager/Release_Notes.html

Thus I directly opened an upstream issue:
https://github.com/Yubico/yubikey-manager/issues/634

Have a good day!

Full debug output:
------------------

$ ykman -l DEBUG info
INFO 17:00:47.849 [ykman.logging.set_log_level:60] Logging at level: DEBUG
WARNING 17:00:47.849 [ykman.logging.set_log_level:64]
#############################################################################
#                                                                           #
# WARNING: Sensitive data may be logged!                                    #
# Some personally identifying information may be logged, such as usernames! #
#                                                                           #
#############################################################################
INFO 17:00:47.849 [ykman._cli.__main__.cli:276] System info:
  ykman:            5.4.0
  Python:           3.12.6 (main, Sep  7 2024, 14:20:15) [GCC 14.2.0]
  Platform:         linux
  Arch:             x86_64
  System date:      2024-09-09
  Running as admin: False

DEBUG 17:00:47.876 [ykman.hid.linux.list_devices:123] Couldn't read HID 
descriptor for /dev/hidraw3
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ykman/hid/linux.py", line 115, in 
list_devices
    with open(hidraw, "rb") as f:
         ^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/dev/hidraw3'
DEBUG 17:00:47.877 [ykman.hid.linux.list_devices:123] Couldn't read HID 
descriptor for /dev/hidraw4
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ykman/hid/linux.py", line 115, in 
list_devices
    with open(hidraw, "rb") as f:
         ^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/dev/hidraw4'
DEBUG 17:00:47.878 [ykman.hid.linux.list_devices:123] Couldn't read HID 
descriptor for /dev/hidraw0
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ykman/hid/linux.py", line 115, in 
list_devices
    with open(hidraw, "rb") as f:
         ^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/dev/hidraw0'
DEBUG 17:00:47.879 [fido2.hid.linux.list_descriptors:103] Failed opening device 
/dev/hidraw3
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/fido2/hid/linux.py", line 98, in 
list_descriptors
    devices.append(get_descriptor(hidraw))
                   ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/fido2/hid/linux.py", line 55, in 
get_descriptor
    with open(path, "rb") as f:
         ^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/dev/hidraw3'
DEBUG 17:00:47.880 [fido2.hid.linux.list_descriptors:103] Failed opening device 
/dev/hidraw4
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/fido2/hid/linux.py", line 98, in 
list_descriptors
    devices.append(get_descriptor(hidraw))
                   ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/fido2/hid/linux.py", line 55, in 
get_descriptor
    with open(path, "rb") as f:
         ^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/dev/hidraw4'
DEBUG 17:00:47.881 [fido2.hid.linux.list_descriptors:103] Failed opening device 
/dev/hidraw0
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/fido2/hid/linux.py", line 98, in 
list_descriptors
    devices.append(get_descriptor(hidraw))
                   ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/fido2/hid/linux.py", line 55, in 
get_descriptor
    with open(path, "rb") as f:
         ^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/dev/hidraw0'
DEBUG 17:00:47.882 [ykman.device.add:165] Add device for <class 
'yubikit.core.smartcard.SmartCardConnection'>: ScardYubiKeyDevice(pid=0404, 
fingerprint='Yubico YubiKey CCID 00 00')
WARNING 17:00:47.900 [ykman.device.add:179] Failed opening device
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ykman/device.py", line 171, in add
    with dev.open_connection(conn_type) as conn:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/ykman/pcsc/__init__.py", line 88, in 
open_connection
    return self._open_smartcard_connection()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/ykman/pcsc/__init__.py", line 96, in 
_open_smartcard_connection
    return ScardSmartCardConnection(self.reader.createConnection())
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/smartcard/pcsc/PCSCReader.py", line 101, 
in createConnection
    return CardConnectionDecorator(PCSCCardConnection(self.name))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Can't instantiate abstract class CardConnectionDecorator without an 
implementation for abstract methods 'doControl', 'doGetAttrib', 'doTransmit'
ERROR 17:00:47.903 [ykman._cli.__main__.main:437] Failed to connect to YubiKey.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ykman/_cli/__main__.py", line 421, in 
main
    cli(obj={})
  File "/usr/lib/python3/dist-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/decorators.py", line 33, in 
new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/ykman/_cli/info.py", line 154, in info
    info = ctx.obj["info"]
           ~~~~~~~^^^^^^^^
  File "/usr/lib/python3/dist-packages/ykman/_cli/util.py", line 197, in 
__getitem__
    self.resolve()
  File "/usr/lib/python3/dist-packages/ykman/_cli/util.py", line 194, in resolve
    self._objects[k] = f()
                       ^^^
  File "/usr/lib/python3/dist-packages/ykman/_cli/__main__.py", line 314, in 
<lambda>
    ctx.obj.add_resolver("device", lambda: resolve()[0])
                                           ^^^^^^^^^
  File "/usr/lib/python3/dist-packages/ykman/_cli/__main__.py", line 310, in 
resolve
    items = require_device(connections, device)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/ykman/_cli/__main__.py", line 170, in 
require_device
    raise CliFail("Failed to connect to YubiKey.")
ykman._cli.util.CliFail: Failed to connect to YubiKey.



-- System Information:
Debian Release: trixie/sid
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.10.7-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages yubikey-manager depends on:
ii  pcscd                 2.3.0-1
ii  python3               3.12.5-1
ii  python3-click         8.1.7-2
ii  python3-cryptography  42.0.5-2+b1
ii  python3-fido2         1.1.3-1
ii  python3-ykman         5.4.0-1

Versions of packages yubikey-manager recommends:
ii  libyubikey-udev  1.20.0-4

yubikey-manager suggests no packages.

-- no debconf information

  • Bug#1081222: yubikey-manager: python3-pyscard 2.1.0 seems... Raphaël Hertzog

Reply via email to