Yubico / yubikey-manager-qt

Cross-platform application for configuring any YubiKey over all USB interfaces.
https://developers.yubico.com/yubikey-manager-qt/
BSD 2-Clause "Simplified" License
237 stars 29 forks source link

cli can find Yubikey but not GUI #361

Open YueMiyuki opened 5 months ago

YueMiyuki commented 5 months ago

Steps to reproduce

  1. plug in the yubikey
  2. start yubikey manager

Expected result


Yubikey show up in the GUI

Actual results


Nothing Showed up

Other info

image

YueMiyuki commented 5 months ago

sudo systemctl status pcscd image

apollo13 commented 5 months ago

This is due to the usage of Python 3.12 which is not supported by pyotherside (yet, see https://github.com/thp/pyotherside/pull/131 etc).

As a workaround you can download https://raw.githubusercontent.com/Yubico/yubikey-manager-qt/main/ykman-gui/py/yubikey.py to ~/.local/lib/python3.12/site-packages

kimdre commented 4 months ago

This is due to the usage of Python 3.12 which is not supported by pyotherside (yet, see thp/pyotherside#131 etc).

As a workaround you can download https://raw.githubusercontent.com/Yubico/yubikey-manager-qt/main/ykman-gui/py/yubikey.py to ~/.local/lib/python3.12/site-packages

Thank you this also worked for me! However I had to add the file to /usr/lib/python3.12/site-packages/yubikey.py

orjawell commented 4 months ago

This is due to the usage of Python 3.12 which is not supported by pyotherside (yet, see thp/pyotherside#131 etc). As a workaround you can download https://raw.githubusercontent.com/Yubico/yubikey-manager-qt/main/ykman-gui/py/yubikey.py to ~/.local/lib/python3.12/site-packages

Thank you this also worked for me! However I had to add the file to /usr/lib/python3.12/site-packages/yubikey.py

Thanks, it worked for me !

rathann commented 2 months ago

This is due to the usage of Python 3.12 which is not supported by pyotherside (yet, see thp/pyotherside#131 etc).

As a workaround you can download https://raw.githubusercontent.com/Yubico/yubikey-manager-qt/main/ykman-gui/py/yubikey.py to ~/.local/lib/python3.12/site-packages

This doesn't fix the issue for me. strace shows that yubikey.py is found and opened, but the GUI still shows no key.

leigh123linux commented 2 months ago

I have bisected the offending commit

https://github.com/Yubico/yubikey-manager/commit/2bcf81b6dffc9ae6748eb251ff54a864b306e794

apollo13 commented 2 months ago

This might be fixed with #363

darix commented 1 month ago

the patch in #363 has so many unrelated changes. not sure how this happened. the minimal patch is:

diff --git a/ykman-gui/py/yubikey.py b/ykman-gui/py/yubikey.py
index 2c91bc4..32a2b37 100644
--- a/ykman-gui/py/yubikey.py
+++ b/ykman-gui/py/yubikey.py
@@ -50,12 +50,10 @@ from ykman import __version__ as ykman_v
 if int(ykman_v.split(".")[0] ) > 4:
     from yubikit.support import get_name
     from ykman.device import list_all_devices, scan_devices
-    from ykman.otp import (
-    _PrepareUploadFailed as PrepareUploadFailed
-    , _prepare_upload_key as prepare_upload_key, generate_static_pw)
+    from ykman.otp import (generate_static_pw)
 else:
     from ykman import connect_to_device, scan_devices, get_name
-    from ykman.otp import PrepareUploadFailed, prepare_upload_key, generate_static_pw
+    from ykman.otp import generate_static_pw

 from fido2.ctap2 import Ctap2, ClientPin

@@ -400,17 +398,6 @@ class Controller(object):
         upload_url = None

         with self._open_device([OtpConnection]) as conn:
-            if upload:
-                try:
-                    upload_url = prepare_upload_key(
-                        key, public_id, private_id,
-                        serial=self._dev_info['serial'],
-                        user_agent='ykman-qt/' + app_version)
-                except PrepareUploadFailed as e:
-                    logger.debug('YubiCloud upload failed', exc_info=e)
-                    return failure('upload_failed',
-                                   {'upload_errors': [err.name
-                                                      for err in e.errors]})
             try:
                 session = YubiOtpSession(conn)
                 session.put_configuration(
apollo13 commented 1 month ago

My changes in #363 are not unrelated, your minimal patch just fixes the python code while still leaving a broken UI if you click in the wrong buttons etc. my patch also removes the functionality from the UI

On Mon, Aug 5, 2024, at 23:50, darix wrote:

the patch in #363 https://github.com/Yubico/yubikey-manager-qt/pull/363 has so many unrelated changes. not sure how this happened. the minimal patch is:

`diff --git a/ykman-gui/py/yubikey.py b/ykman-gui/py/yubikey.py index 2c91bc4..32a2b37 100644 --- a/ykman-gui/py/yubikey.py +++ b/ykman-gui/py/yubikey.py @@ -50,12 +50,10 @@ from ykman import version as ykman_v if int(ykman_v.split(".")[0] ) > 4: from yubikit.support import get_name from ykman.device import list_all_devices, scan_devices

  • from ykman.otp import (
  • _PrepareUploadFailed as PrepareUploadFailed
  • , _prepare_upload_key as prepare_upload_key, generate_static_pw)
  • from ykman.otp import (generate_static_pw) else: from ykman import connect_to_device, scan_devices, get_name
  • from ykman.otp import PrepareUploadFailed, prepare_upload_key, generate_static_pw
  • from ykman.otp import generate_static_pw

    from fido2.ctap2 import Ctap2, ClientPin

@@ -400,17 +398,6 @@ class Controller(object): upload_url = None

     with self._open_device([OtpConnection]) as conn:
  • if upload:
  • try:
  • upload_url = prepare_upload_key(
  • key, public_id, private_id,
  • serial=self._dev_info['serial'],
  • user_agent='ykman-qt/' + app_version)
  • except PrepareUploadFailed as e:
  • logger.debug('YubiCloud upload failed', exc_info=e)
  • return failure('upload_failed',
  • {'upload_errors': [err.name
  • for err in e.errors]}) try: session = YubiOtpSession(conn) session.put_configuration(

` — Reply to this email directly, view it on GitHub https://github.com/Yubico/yubikey-manager-qt/issues/361#issuecomment-2269979924, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAT5CYCW2B7WJWPU64S273ZP7XRLAVCNFSM6AAAAABG6KD5Q6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRZHE3TSOJSGQ. You are receiving this because you commented.Message ID: @.***>

darix commented 1 month ago

the changes in .github/workflow/ seem unrelated still.

apollo13 commented 1 month ago

It is not really unrelated. It removes a patch for macosx that was needed for the otp upload functionality which your and my patch removes.

On Tue, Aug 6, 2024, at 10:11, darix wrote:

the changes in .github/workflow/ seem unrelated still.

— Reply to this email directly, view it on GitHub https://github.com/Yubico/yubikey-manager-qt/issues/361#issuecomment-2270653298, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAT5CYHXZYRGDYIYACZ6VLZQCAKLAVCNFSM6AAAAABG6KD5Q6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZQGY2TGMRZHA. You are receiving this because you commented.Message ID: @.***>

apollo13 commented 1 month ago

FWIW yubikey-manager-qt is apparently deprecated since three months: https://github.com/Yubico/yubikey-manager-qt/commit/28dc02d11b081683b59d16d12043aaa3c0a6c75f

As such I have switched to the Yubico Authenticator which works well enough. So instead of trying to patch this in distros, they should probably get rid of this package and switch over to the authenticator.

darix commented 1 month ago

yeah. I already asked them to maybe archive the now deprecated projects via https://github.com/Yubico/yubikey-manager/issues/627