This is a bug report for updating nitrokey3 firmware using nitropy on opensuse leap 15.6.
I installed nitropy as follows:
117 python3 -m pip install --user pipx
118 python3 -m pipx ensurepath
120 pipx install pynitrokey
122 nitropy nk3
123 nitropy nk3 update
Then attempted updating nitrokey, the error is related to fetching version 1.7.2 from github.com:
nitropy nk3 update
Command line tool to interact with Nitrokey devices 0.4.23
Critical error:
Failed to find latest firmware update
Exception encountered: ValueError('Failed to find update file for firmware release v1.7.2',)
--------------------------------------------------------------------------------
Critical error occurred, exiting now
Unexpected? Is this a bug? Would you like to get support/help?
- You can report issues at: https://support.nitrokey.com/
- Writing an e-mail to support@nitrokey.com is also possible
- Please attach the log: '/tmp/nitropy.log.ulwhn8u9' with any support/help request!
- Please check if you have udev rules installed: https://docs.nitrokey.com/nitrokey3/linux/firmware-update.html#troubleshooting
debug log:
373 INFO libusbsio Loading SIO library: /home/josua/.local/pipx/venvs/pynitrokey/lib64/python3.6/site-packages/libusbsio/bin/linux_x86_64/libusbsio.so
377 INFO libusbsio HID enumeration[94605834201520]: initialized
377 DEBUG libusbsio HID enumeration[94605834201520]: device #0: USB Receiver
377 DEBUG libusbsio HID enumeration[94605834201520]: device #1: USB Receiver
377 DEBUG libusbsio HID enumeration[94605834201520]: device #2: ASUSTeK Computer Inc.
377 DEBUG libusbsio HID enumeration[94605834201520]: device #3: ASUSTeK Computer Inc.
377 DEBUG libusbsio HID enumeration[94605834201520]: device #4: ITE Device(8910)
378 DEBUG libusbsio HID enumeration[94605834201520]: device #5: Nitrokey 3
378 INFO libusbsio HID enumeration[94605834201520]: finished, total 6 devices
437 DEBUG fido2.hid.linux Found CTAP device: /dev/hidraw5
439 DEBUG fido2.hid.linux Skip device: [Errno 13] Permission denied: '/dev/hidraw4'
439 DEBUG fido2.hid.linux Skip device: [Errno 13] Permission denied: '/dev/hidraw3'
439 DEBUG fido2.hid.linux Skip device: [Errno 13] Permission denied: '/dev/hidraw1'
439 DEBUG fido2.hid.linux Skip device: [Errno 13] Permission denied: '/dev/hidraw2'
440 DEBUG fido2.hid.linux Skip device: [Errno 13] Permission denied: '/dev/hidraw0'
440 DEBUG fido2.hid.linux Skip device: [Errno 13] Permission denied: '/dev/hidraw6'
497 DEBUG fido2.hid SEND: ffffffff8600080a4c0bda1d07a454
505 DEBUG fido2.hid RECV: ffffffff8600110a4c0bda1d07a45400000001020000000500000000000000000000000000000000000000000000000000000000000000000000000000000000
511 DEBUG urllib3.connectionpool Starting new HTTPS connection (1): api.github.com:443
1038 DEBUG urllib3.connectionpool https://api.github.com:443 "GET /repos/Nitrokey/nitrokey-3-firmware/releases/latest HTTP/1.1" 200 None
1043 DEBUG root print: Critical error:
1044 DEBUG root print: Failed to find latest firmware update
1044 ERROR root Failed to find update file for firmware release v1.7.2
Traceback (most recent call last):
File "/home/josua/.local/pipx/venvs/pynitrokey/lib64/python3.6/site-packages/pynitrokey/cli/nk3/__init__.py", line 400, in _download_latest_update
update = get_repo().get_latest_update()
File "/home/josua/.local/pipx/venvs/pynitrokey/lib64/python3.6/site-packages/pynitrokey/updates.py", line 123, in get_latest_update
return FirmwareUpdate._from_release(release, self.update_pattern)
File "/home/josua/.local/pipx/venvs/pynitrokey/lib64/python3.6/site-packages/pynitrokey/updates.py", line 95, in _from_release
return cls._from_assets(release["assets"], release["tag_name"], url_pattern)
File "/home/josua/.local/pipx/venvs/pynitrokey/lib64/python3.6/site-packages/pynitrokey/updates.py", line 110, in _from_assets
raise ValueError(f"Failed to find update file for firmware release {tag}")
ValueError: Failed to find update file for firmware release v1.7.2
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/josua/.local/pipx/venvs/pynitrokey/lib64/python3.6/site-packages/pynitrokey/cli/__init__.py", line 111, in main
nitropy()
File "/home/josua/.local/pipx/venvs/pynitrokey/lib64/python3.6/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/josua/.local/pipx/venvs/pynitrokey/lib64/python3.6/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/josua/.local/pipx/venvs/pynitrokey/lib64/python3.6/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/josua/.local/pipx/venvs/pynitrokey/lib64/python3.6/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/josua/.local/pipx/venvs/pynitrokey/lib64/python3.6/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/josua/.local/pipx/venvs/pynitrokey/lib64/python3.6/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/josua/.local/pipx/venvs/pynitrokey/lib64/python3.6/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context().obj, *args, **kwargs)
File "/home/josua/.local/pipx/venvs/pynitrokey/lib64/python3.6/site-packages/pynitrokey/cli/nk3/__init__.py", line 336, in update
release_version, data = _download_latest_update(device)
File "/home/josua/.local/pipx/venvs/pynitrokey/lib64/python3.6/site-packages/pynitrokey/cli/nk3/__init__.py", line 403, in _download_latest_update
raise CliException("Failed to find latest firmware update", e)
pynitrokey.cli.exceptions.CliException: Failed to find latest firmware update
Failed to find update file for firmware release v1.7.2
1047 DEBUG root listing all connected devices:
1105 DEBUG fido2.hid.linux Found CTAP device: /dev/hidraw5
1106 DEBUG fido2.hid.linux Skip device: [Errno 13] Permission denied: '/dev/hidraw4'
1106 DEBUG fido2.hid.linux Skip device: [Errno 13] Permission denied: '/dev/hidraw3'
1106 DEBUG fido2.hid.linux Skip device: [Errno 13] Permission denied: '/dev/hidraw1'
1106 DEBUG fido2.hid.linux Skip device: [Errno 13] Permission denied: '/dev/hidraw2'
1106 DEBUG fido2.hid.linux Skip device: [Errno 13] Permission denied: '/dev/hidraw0'
1106 DEBUG fido2.hid.linux Skip device: [Errno 13] Permission denied: '/dev/hidraw6'
1165 DEBUG fido2.hid SEND: ffffffff860008e43ad294b33a2bf7
1173 DEBUG fido2.hid RECV: ffffffff860011e43ad294b33a2bf700000002020000000500000000000000000000000000000000000000000000000000000000000000000000000000000000
1173 DEBUG root :: 'Nitrokey FIDO2' keys
1173 DEBUG root :: 'Nitrokey Start' keys:
1189 DEBUG root :: 'Nitrokey 3' keys
1191 INFO libusbsio HID enumeration[94605833382160]: initialized
1191 DEBUG libusbsio HID enumeration[94605833382160]: device #0: USB Receiver
1191 DEBUG libusbsio HID enumeration[94605833382160]: device #1: USB Receiver
1191 DEBUG libusbsio HID enumeration[94605833382160]: device #2: ASUSTeK Computer Inc.
1191 DEBUG libusbsio HID enumeration[94605833382160]: device #3: ASUSTeK Computer Inc.
1191 DEBUG libusbsio HID enumeration[94605833382160]: device #4: ITE Device(8910)
1191 DEBUG libusbsio HID enumeration[94605833382160]: device #5: Nitrokey 3
1192 INFO libusbsio HID enumeration[94605833382160]: finished, total 6 devices
1192 DEBUG fido2.hid.linux Found CTAP device: /dev/hidraw5
1192 DEBUG fido2.hid.linux Skip device: [Errno 13] Permission denied: '/dev/hidraw4'
1192 DEBUG fido2.hid.linux Skip device: [Errno 13] Permission denied: '/dev/hidraw3'
1192 DEBUG fido2.hid.linux Skip device: [Errno 13] Permission denied: '/dev/hidraw1'
1192 DEBUG fido2.hid.linux Skip device: [Errno 13] Permission denied: '/dev/hidraw2'
1192 DEBUG fido2.hid.linux Skip device: [Errno 13] Permission denied: '/dev/hidraw0'
1192 DEBUG fido2.hid.linux Skip device: [Errno 13] Permission denied: '/dev/hidraw6'
1192 DEBUG fido2.hid SEND: ffffffff860008a0c2c30bfb03c1a5
1196 DEBUG fido2.hid RECV: ffffffff860011a0c2c30bfb03c1a500000003020000000500000000000000000000000000000000000000000000000000000000000000000000000000000000
1197 DEBUG fido2.hid SEND: 00000003e20000
1205 DEBUG fido2.hid RECV: 00000003e20010767e462dc585605b99ae8f3c6958d0470000000000000000000000000000000000000000000000000000000000000000000000000000000000
1205 DEBUG fido2.hid SEND: 00000003e20000
1213 DEBUG fido2.hid RECV: 00000003e20010767e462dc585605b99ae8f3c6958d0470000000000000000000000000000000000000000000000000000000000000000000000000000000000
1213 DEBUG root /dev/hidraw5: Nitrokey 3 767E462DC585605B99AE8F3C6958D047
1213 DEBUG root print: --------------------------------------------------------------------------------
1214 DEBUG root print: Critical error occurred, exiting now
1214 DEBUG root print: Unexpected? Is this a bug? Would you like to get support/help?
1214 DEBUG root print: - You can report issues at: https://support.nitrokey.com/
1214 DEBUG root print: - Writing an e-mail to support@nitrokey.com is also possible
1214 DEBUG root print: - Please attach the log: '/tmp/nitropy.log.ulwhn8u9' with any support/help request!
1214 DEBUG root print: - Please check if you have udev rules installed: https://docs.nitrokey.com/nitrokey3/linux/firmware-update.html#troubleshooting
The hint about udev / permissions seems unrelated in this instance.
The nitrokey is /dev/hidraw5, and the debug log has no error message for it.
[ 1255.952585] usb 3-2: new full-speed USB device number 6 using xhci_hcd
[ 1261.245395] usb 3-2: New USB device found, idVendor=20a0, idProduct=42b2, bcdDevice= 1.04
[ 1261.245410] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1261.245414] usb 3-2: Product: Nitrokey 3
[ 1261.245417] usb 3-2: Manufacturer: Nitrokey
[ 1261.359956] hid-generic 0003:20A0:42B2.000B: hiddev98,hidraw5: USB HID v1.11 Device [Nitrokey Nitrokey 3] on usb-0000:04:00.4-2/input1