Code Monkey home page Code Monkey logo

Comments (5)

fdennis avatar fdennis commented on July 28, 2024

I am not able to reproduce on Ubuntu. Could you perhaps launch through the terminal and post the stack trace / exception here? You might have to turn on DEBUG level with the --log-level DEBUG flag at the end. We don't need the whole log, just the stack trace should be enough to help us understand what is going on.

from yubikey-manager-qt.

ipaqmaster avatar ipaqmaster commented on July 28, 2024

Oh, I thought I pasted the stack trace in here already. I've stopped the pcscd service now and got this fresh stacktrace to paste:

PC/SC not available. Smart card (CCID) protocols will not function.
Unable to list devices for connection
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/ykman/device.py", line 287, in list_all_devices
    for dev in _CONNECTION_LIST_MAPPING[connection_type]():
  File "/usr/lib/python3.10/site-packages/ykman/device.py", line 71, in inner
    return f()
  File "/usr/lib/python3.10/site-packages/ykman/device.py", line 88, in list_ccid_devices
    return _list_ccid_devices()
  File "/usr/lib/python3.10/site-packages/ykman/pcsc/__init__.py", line 169, in list_devices
    for reader in list_readers():
  File "/usr/lib/python3.10/site-packages/ykman/pcsc/__init__.py", line 157, in list_readers
    return System.readers()
  File "/usr/lib/python3.10/site-packages/smartcard/System.py", line 41, in readers
    return smartcard.reader.ReaderFactory.ReaderFactory.readers(groups)
  File "/usr/lib/python3.10/site-packages/smartcard/reader/ReaderFactory.py", line 58, in readers
    zreaders += fm(groups)
  File "/usr/lib/python3.10/site-packages/smartcard/pcsc/PCSCReader.py", line 109, in readers
    hcontext = PCSCContext().getContext()
  File "/usr/lib/python3.10/site-packages/smartcard/pcsc/PCSCContext.py", line 56, in __init__
    self.renewContext()
  File "/usr/lib/python3.10/site-packages/smartcard/pcsc/PCSCContext.py", line 70, in renewContext
    PCSCContext.instance = PCSCContext.__PCSCContextSingleton()
  File "/usr/lib/python3.10/site-packages/smartcard/pcsc/PCSCContext.py", line 40, in __init__
    raise EstablishContextException(hresult)
smartcard.pcsc.PCSCExceptions.EstablishContextException: Failed to establish context: Service not available. (0x8010001D)
Uncaught exception
Traceback (most recent call last):
  File "qrc:///py/yubikey.py", line 78, in wrapped
    return f(*args, **kwargs)
  File "qrc:///py/yubikey.py", line 300, in refresh_piv
    with self._open_device([SmartCardConnection]) as conn:
AttributeError: __enter__
qml: Unmapped error: null __enter__

My original provided screeenshot happened again exactly the same.

I am not able to reproduce on Ubuntu

Probably because you did not stop pcscd -- but it is also a testament that the socket may have automatically started it on that distro but doesn't do that on Archlinux. Here it does not start it on its own despite the existence of pcscd.socket --- but also, the GUI error does not accurately describe the issue to the user so it can be fixed manually.

from yubikey-manager-qt.

ipaqmaster avatar ipaqmaster commented on July 28, 2024

To clarify, this seems to be a problem on fresh installs. Ever since I started pcscd myself, the socket seems to be doing its job correctly? But it still doesn't address that the GUI error it throws doesn't help troubleshoot / self-resolve in the slightest.

from yubikey-manager-qt.

fdennis avatar fdennis commented on July 28, 2024

Thanks for the log!

Probably because you did not stop pcscd

I should have been more clear. I meant to say that I cannot reproduce the same error message that you get (Unmapped error: null __enter__) on my Ubuntu machine. I am stopping pcscd but when I press PIV I get the correct error message, which basically explains that it cannot connect to the YubiKey. Perhaps this is not an issue on Ubuntu but is an issue on Arch and/or other distros. I do agree that the GUI error is not that helpful. We will look into this. Thank you!

from yubikey-manager-qt.

ipaqmaster avatar ipaqmaster commented on July 28, 2024

I appreciate your understanding of the issue and a desire to at least make it more clear for the UI.

Thanks

from yubikey-manager-qt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.