Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error! '<' not supported between instances of 'NoneType' and 'tuple' on openSUSE Tumbleweed #72

Closed
unguul opened this issue Nov 8, 2018 · 9 comments · Fixed by #73
Closed

Comments

@unguul
Copy link

unguul commented Nov 8, 2018

Hello,

I'm having issues getting my YubiKey 5 NFC to work on openSUSE.

I'm getting the error message in the title when clicking Applications -> OTP.

  • openSUSE Tumbleweed (20181105);
  • YubiKey Manager 1.0.1;
  • YubiKey 5 NFC with 5.1.1 firmware;

dmesg seems to be happy. [ 4463.340801] hid-generic 0003:1050:0407.0010: hiddev98,hidraw5: USB HID v1.10 Device [Yubico YubiKey OTP+FIDO+CCID] on usb-0000:02:00.0-4/input1

Works just fine on Ubuntu 16.04.

From an initial google search it seems to just be a syntax error but I might be wrong.

Thank you!

@emlun
Copy link
Member

emlun commented Nov 8, 2018

Thanks for the report! Could you try running YubiKey Manager as ykman-gui --log-level DEBUG and post the output here?

@unguul
Copy link
Author

unguul commented Nov 8, 2018

Output of ykman-gui --log-level DEBUG as root:

qt.qpa.screen: QXcbConnection: Could not connect to display 
Could not connect to any X display.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
error: XDG_RUNTIME_DIR not set in the environment.
Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: wayland-org.kde.kwin.qpa, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

Aborted (core dumped)

@unguul
Copy link
Author

unguul commented Nov 8, 2018

I guess I'm just missing some required plugin as per Available platform plugins are: wayland-org.kde.kwin.qpa, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb. ?

@emlun
Copy link
Member

emlun commented Nov 8, 2018

It looks like you're running it in a different environment than when you got the previous error - it doesn't even start up now, right? You shouldn't need to run it as root.

@unguul
Copy link
Author

unguul commented Nov 8, 2018

That's a good point about the environment. Running as root, both with and without the --log-level DEBUG flag fails as per my previous message and the GUI doesn't show up at all.

However, running as non-root, plugging the yubikey in and clicking Applications -> OTP shows up with the error in the title and the following the terminal:

Got library name:  "/usr/lib64/qt5/qml/io/thp/pyotherside/libpyothersideplugin.so"
Cannot convert: QVariant(std::nullptr_t, (nullptr))
2018-11-08T14:58:02+0200 INFO [ykman.logging_setup.setup:59] Initialized logging for ykman version: 1.0.1
2018-11-08T14:58:18+0200 DEBUG [ykman.descriptor.Descriptor.open_device:75] transports: 0x7, self.mode.transports: 0x7
2018-11-08T14:58:18+0200 DEBUG [ykman.descriptor.open_device:80] Opening driver for serial: None, type: YUBIKEY.YK4, mode: OTP+FIDO+CCID
2018-11-08T14:58:18+0200 DEBUG [ykman.descriptor.open_device:82] Attempt 1 of 10
2018-11-08T14:58:18+0200 DEBUG [ykman.descriptor.open_device:86] Found driver: <ykman.driver_ccid.CCIDDriver object at 0x7fa0fbc24358>, key_type: YUBIKEY.YK4, mode: OTP+FIDO+CCID
2018-11-08T14:58:18+0200 DEBUG [ykman.device.__init__:198] Read config from device...
2018-11-08T14:58:18+0200 DEBUG [ykman.driver_ccid.send_apdu:175] SEND: b'00a4040008a000000527471117'
2018-11-08T14:58:18+0200 DEBUG [ykman.driver_ccid.send_apdu:177] RECV: b'5669727475616c206d6772202d2046572076657273696f6e20352e312e319000'
2018-11-08T14:58:18+0200 DEBUG [ykman.driver_ccid.send_apdu:175] SEND: b'001d000000'
2018-11-08T14:58:18+0200 DEBUG [ykman.driver_ccid.send_apdu:177] RECV: b'2b0102023f0302023f02040089b95804010105030501010602000007010f0801000d02023f0e02022b0a01009000'
2018-11-08T14:58:18+0200 DEBUG [ykman.device.__init__:200] Success!
2018-11-08T14:58:18+0200 DEBUG [ykman.device.__init__:284] Identified YubiKey 5
2018-11-08T14:58:18+0200 DEBUG [ykman.driver_ccid.close:216] Close <ykman.driver_ccid.CCIDDriver object at 0x7fa0fbc24358>
2018-11-08T14:58:18+0200 DEBUG [ykman.driver_ccid.__del__:220] Destroy <ykman.driver_ccid.CCIDDriver object at 0x7fa0fbc24358>
2018-11-08T14:58:18+0200 DEBUG [ykman.driver_ccid.close:216] Close <ykman.driver_ccid.CCIDDriver object at 0x7fa0fbc24358>
2018-11-08T14:58:30+0200 DEBUG [ykman.descriptor.Descriptor.open_device:75] transports: 0x1, self.mode.transports: 0x7
2018-11-08T14:58:30+0200 DEBUG [ykman.descriptor.open_device:80] Opening driver for serial: None, type: YUBIKEY.YK4, mode: OTP+FIDO+CCID
2018-11-08T14:58:30+0200 DEBUG [ykman.descriptor.open_device:82] Attempt 1 of 10
2018-11-08T14:58:30+0200 ERROR [yubikey.slots_status:154] Failed to read slot status
Traceback (most recent call last):
  File "qrc:///py/yubikey.py", line 145, in slots_status
    with self._open_device(TRANSPORT.OTP) as dev:
  File "qrc:///py/yubikey.py", line 52, in _open_device
    return self._descriptor.open_device(transports=transports)
  File "/usr/lib/python3.6/site-packages/ykman/descriptor.py", line 84, in open_device
    for drv in _list_drivers(transports):
  File "/usr/lib/python3.6/site-packages/ykman/descriptor.py", line 142, in _list_drivers
    for dev in open_otp():
  File "/usr/lib/python3.6/site-packages/ykman/driver_otp.py", line 213, in open_devices
    if libversion < (1, 18):
TypeError: '<' not supported between instances of 'NoneType' and 'tuple'

Thanks for helping out btw! 😄

@emlun
Copy link
Member

emlun commented Nov 8, 2018

Ah, it looks like libykpers is missing on your system. Do you have that library installed?

@unguul
Copy link
Author

unguul commented Nov 8, 2018

Aha! Installing libykpers makes that error go away. Thank you!. I also just saw #73 .

Might be worth adding libykpers as a dependency to this package so it automatically gets installed with yubikey-manager-qt ? I'd offer a pull request but I have absolutely no clue on how to define dependencies. (Happy to learn though)

Unfortunately, this doesn't seem to fix the issues I'm having getting the key to simply work with as a security key for an online account. I've tried Google, Github and Facebook until now. All say something cryptic like "Something went wrong..".

Any suggestions on that? Maybe a recommended way to (re)install packages required for the Yubikey to work with my system?

Thanks again!

@emlun
Copy link
Member

emlun commented Nov 8, 2018

Glad that helped!

We don't maintain packages for OpenSUSE, so you'd have to bring that to the OpenSUSE packagers. The Debian package that we do maintain for yubikey-manager (the library this GUI depends on) has libykpers as a dependency.

As for your issues with using your YubiKey as a security key on the web, Yubico Support should be able to help you with that. I'd suggest that the first thing to do is make sure that the YubiKey has the FIDO U2F and FIDO2 interfaces enabled. Or perhaps you may need another client library like libu2f-host or libfido2. Anyway, Support should be able to help you with that.

@emlun emlun closed this as completed in #73 Nov 8, 2018
@kbabioch
Copy link

kbabioch commented Nov 9, 2018

openSUSE package maintainer here. I have somehow missed this dependency and am going to fix this. Thanks for looking into it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants