yubikey-manager-qt icon indicating copy to clipboard operation
yubikey-manager-qt copied to clipboard

PyOtherSide errors on startup sometimes

Open fezie opened this issue 5 years ago • 7 comments
trafficstars

yubikey-manager-qt version 8918b116db self compiled from git OS is updated Debian unstable Yubikey 5 NFC

Sometimes but not always I get the following errors on startup:

"PyOtherSide error: Traceback (most recent call last):\n\n  File \"<string>\", line 1, in <module>\n\nAttributeError: module 'yubikey' has no attribute 'init'\n"
qml: Function not found: 'yubikey.init' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

AttributeError: module 'yubikey' has no attribute 'init'
)
"PyOtherSide error: Traceback (most recent call last):\n\n  File \"<string>\", line 1, in <module>\n\nAttributeError: module 'yubikey' has no attribute 'controller'\n"
qml: Function not found: 'yubikey.controller.count_devices' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

AttributeError: module 'yubikey' has no attribute 'controller'
)

Seems to be a related bug to this issue from yubioath-desktop:

https://github.com/Yubico/yubioath-desktop/issues/491

fezie avatar Nov 24 '19 19:11 fezie

Thanks for the report. Could you provide us the whole output from running the application with --log-level DEBUG?

emlun avatar Nov 26 '19 09:11 emlun

Unfortunately it only prints additional things if it works. If it fails I get only the already written things above.

Here's the one when it works without an inserted yubikey:

Got library name: "/usr/lib/x86_64-linux-gnu/qt5/qml/io/thp/pyotherside/libpyothersideplugin.so" Cannot convert: QVariant(std::nullptr_t, (nullptr)) 2019-11-26T15:21:11+0100 INFO [ykman.logging_setup.setup:59] Initialized logging for ykman version: 3.1.0

So it seems to fail even before the 'Cannot convert QVariant' output.

Debian sid still uses Python 3.7.5. So it seems to be different then that Python 3.8 related bug mentioned in the other issue.

edit: Oh and I forgot to mention it: I compiled it as a Debian package with cowbuilder and pdebuild. Not directly with qmake/make

fezie avatar Nov 26 '19 14:11 fezie

Ok, so you mean the logs begin immediately with the snippet in the top post? Was that with --log-level DEBUG? If not, please post the logs from running with --log-level DEBUG as well.

emlun avatar Nov 27 '19 12:11 emlun

Yes exactly. When it fails there's no difference with and without --log-level DEBUG

I tried it now even with pyotherside and yubikey-manager-qt packages from launchpad. But they fail too. I wonder if this is something specific in Python or something. else in Debian? When I have time I'll try a complete Ubuntu chroot.

fezie avatar Nov 27 '19 13:11 fezie

Still, please post the output from --log-level DEBUG.

emlun avatar Nov 27 '19 13:11 emlun

$ ykman-gui --log-level DEBUG
Got library name:  "/usr/lib/x86_64-linux-gnu/qt5/qml/io/thp/pyotherside/libpyothersideplugin.so"
"PyOtherSide error: Traceback (most recent call last):\n\n  File \"<string>\", line 1, in <module>\n\nAttributeError: module 'yubikey' has no attribute 'init_with_logging'\n"
qml: Function not found: 'yubikey.init_with_logging' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

AttributeError: module 'yubikey' has no attribute 'init_with_logging'
)
"PyOtherSide error: Traceback (most recent call last):\n\n  File \"<string>\", line 1, in <module>\n\nAttributeError: module 'yubikey' has no attribute 'controller'\n"
qml: Function not found: 'yubikey.controller.count_devices' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

AttributeError: module 'yubikey' has no attribute 'controller'
)
qml: qrc:/qml/YubiKey.qml:263: Error: Cannot assign [undefined] to int
"PyOtherSide error: Traceback (most recent call last):\n\n  File \"<string>\", line 1, in <module>\n\nAttributeError: module 'yubikey' has no attribute 'controller'\n"
qml: Function not found: 'yubikey.controller.count_devices' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

AttributeError: module 'yubikey' has no attribute 'controller'
)
qml: qrc:/qml/YubiKey.qml:263: Error: Cannot assign [undefined] to int
"PyOtherSide error: Traceback (most recent call last):\n\n  File \"<string>\", line 1, in <module>\n\nAttributeError: module 'yubikey' has no attribute 'controller'\n"
qml: Function not found: 'yubikey.controller.count_devices' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

AttributeError: module 'yubikey' has no attribute 'controller'
)

fezie avatar Nov 27 '19 13:11 fezie

Great, thanks! We'll look into it.

emlun avatar Nov 27 '19 14:11 emlun