No error message if insufficient rights to update firmware
Fails to update firmware, app message:
Exception ignored in: <generator object Updater._get_bootloader at 0x7f7a569b29e0>
Traceback (most recent call last):
File "/home/martin/projects/nitrokey-app2/venv/lib/python3.11/site-packages/nitrokeyapp/pynitrokey_for_gui.py", line 223, in nk3_update
info_frame.set_text("Failed to update Nitrokey 3.")
RuntimeError: generator ignored GeneratorExit
Right after touching the nitrokey to start the update, it reconnects to the computer with a different idProduct.
[ 5238.198952] usb 1-6: new full-speed USB device number 15 using xhci_hcd
[ 5238.368019] usb 1-6: New USB device found, idVendor=20a0, idProduct=42b2, bcdDevice= 1.02
[ 5238.368025] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 5238.368028] usb 1-6: Product: Nitrokey 3
[ 5238.368030] usb 1-6: Manufacturer: Nitrokey
[ 5238.505140] hid-generic 0003:20A0:42B2.000E: hiddev100,hidraw9: USB HID v1.11 Device [Nitrokey Nitrokey 3] on usb-0000:05:00.1-6/input1
[ 5238.508052] cdc_acm 1-6:1.2: ttyACM0: USB ACM device
[ 5358.775169] usb 1-6: USB disconnect, device number 15
[ 5359.037111] usb 1-6: new high-speed USB device number 16 using xhci_hcd
[ 5359.178500] usb 1-6: New USB device found, idVendor=20a0, idProduct=42dd, bcdDevice= 3.00
[ 5359.178507] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 5359.178510] usb 1-6: Product: USB COMPOSITE DEVICE
[ 5359.178511] usb 1-6: Manufacturer: NXP SEMICONDUCTOR INC.
[ 5359.264147] hid-generic 0003:20A0:42DD.000F: hiddev100,hidraw10: USB HID v1.00 Device [NXP SEMICONDUCTOR INC. USB COMPOSITE DEVICE] on usb-0000:05:00.1-6/input0
note USB disconnect, device number 15 , which signals I allowed the Nitrokey to update.
After physically reconnecting the nitrokey, nitropy nk3 test runs successfully, so I presume the nitrokey isn't dead :)
Found the logs in /tmp , missing access rights to the hidraw device.
nitropy.txt
Some kind of error message about this would be nice.
The underlying error is originating from pynitrokey there is an issue for that: https://github.com/Nitrokey/nitrokey-3-firmware/issues/250
Nevertheless I keep this open as such an error should: a) not crash the nitrokey-app b) some better error reporting should be in place
this should be resolved by now - please open a new one if you see similar thing happen