Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No error message if insufficient rights to update firmware #73

Closed
Serafean opened this issue May 12, 2023 · 3 comments
Closed

No error message if insufficient rights to update firmware #73

Serafean opened this issue May 12, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@Serafean
Copy link

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 :)

@Serafean
Copy link
Author

Found the logs in /tmp , missing access rights to the hidraw device.
nitropy.txt

Some kind of error message about this would be nice.

@Serafean Serafean changed the title Updating firmware fails No error message if insufficient rights to update firmware May 12, 2023
@daringer daringer added the bug Something isn't working label May 15, 2023
@daringer
Copy link
Collaborator

The underlying error is originating from pynitrokey there is an issue for that: Nitrokey/nitrokey-3-firmware#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

@daringer
Copy link
Collaborator

daringer commented Oct 2, 2024

this should be resolved by now - please open a new one if you see similar thing happen

@daringer daringer closed this as completed Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants