Nitrokey / nitrokey-app2

Graphical application to manage and use Nitrokey 3 devices
https://www.nitrokey.com/products/nitrokeys
Apache License 2.0
79 stars 13 forks source link

App v2.3.0+ fails to start with an AssertionError #273

Open mss opened 17 hours ago

mss commented 17 hours ago

I just installed the Flatpak (version 2.3.0) and tried to start it. It dies with an SeertionError right away:

# flatpak run com.nitrokey.nitrokey-app2 
Traceback (most recent call last):
  File "/app/bin/nitrokeyapp", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/app/lib/python3.11/site-packages/nitrokeyapp/__main__.py", line 34, in main
    window = GUI(app, log_file)
             ^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/nitrokeyapp/gui.py", line 141, in __init__
    self.init_gui()
  File "/app/lib/python3.11/site-packages/nitrokeyapp/gui.py", line 235, in init_gui
    self.show_device(data)
  File "/app/lib/python3.11/site-packages/nitrokeyapp/gui.py", line 281, in show_device
    view.refresh(data, force=True)
  File "/app/lib/python3.11/site-packages/nitrokeyapp/overview_tab/__init__.py", line 92, in refresh
    assert data.status.variant
           ^^^^^^^^^^^^^^^^^^^
AssertionError
QThread: Destroyed while thread is still running

I did not yet install the udev rules as mentioned as step 3 on https://docs.nitrokey.com/software/nk-app2/installation_linux so that might be the issue. If it is, the app should display a proper error message and don't die right away.

I am trying to run this on

Operating System: KDE neon 6.0
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.8.0-40-generic (64-bit)
Graphics Platform: Wayland
mss commented 17 hours ago

After installing the udev rules the app still crashes with that AssertionError. My device is a

Bus 001 Device 002: ID 20a0:42b2 Clay Logic Nitrokey 3
mss commented 15 hours ago

Looks like this assertion was added by @daringer in 93c3d82879c87a3be215e5d1c49d7cc3e371568a which essentially converted a

        if data.status.variant is None:
            return

to this assertion (among adding other code which should probably have taken care of this situation).

mss commented 14 hours ago

I checked v2.2.2 and it doesn't crash but also doesn't like my Nitrokey very much (even though the device itself works):

image