# Failed to find latest firmware update

**URL:** <https://support.nitrokey.com/t/failed-to-find-latest-firmware-update/6391>\
**Category:** FIDO2 / Nitrokey 3\
**Created:** [July 29, 2024, 1:12am UTC](https://support.nitrokey.com/t/failed-to-find-latest-firmware-update/6391 "2024-07-29T01:12:41Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Catbot](https://support.nitrokey.com/user_avatar/support.nitrokey.com/catbot/32/1786_2.png) [@Catbot](https://support.nitrokey.com/u/Catbot)\
**Post date:** [July 29, 2024, 1:12am UTC](https://support.nitrokey.com/t/failed-to-find-latest-firmware-update/6391/1 "2024-07-29T01:12:42Z")

</div>

This is a bug report for updating nitrokey3 firmware using nitropy on opensuse leap 15.6.

I installed nitropy as follows:

```auto
  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](http://github.com):

```auto
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:

```auto
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.

```auto
[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

```

---

<div class="post-metadata">

**Author:** ![geoW](https://support.nitrokey.com/user_avatar/support.nitrokey.com/geow/32/1888_2.png) [@geoW](https://support.nitrokey.com/u/geoW)\
**Post date:** [July 29, 2024, 5:14am UTC](https://support.nitrokey.com/t/failed-to-find-latest-firmware-update/6391/2 "2024-07-29T05:14:08Z")

</div>

Try running as root, I suggest.

---

<div class="post-metadata">

**Author:** ![ion](https://support.nitrokey.com/letter_avatar_proxy/v4/letter/i/f1d935/32.png) [@ion](https://support.nitrokey.com/u/ion)\
**Post date:** [July 29, 2024, 7:53pm UTC](https://support.nitrokey.com/t/failed-to-find-latest-firmware-update/6391/3 "2024-07-29T19:53:22Z")

</div>

You can also download the firmware and try

```auto
nitropy nk3 validate-update downloaded-1.7.2.zip

```

If that works, specify the image with the `update` command.

---

<div class="post-metadata">

**Author:** ![Catbot](https://support.nitrokey.com/user_avatar/support.nitrokey.com/catbot/32/1786_2.png) [@Catbot](https://support.nitrokey.com/u/Catbot)\
**Post date:** [August 10, 2024, 7:21pm UTC](https://support.nitrokey.com/t/failed-to-find-latest-firmware-update/6391/4 "2024-08-10T19:21:48Z")

</div>

Thank you for the suggestion!

Still it produces an error ☹

```auto
nitropy nk3 validate-update downloaded-1.7.2.zip
Command line tool to interact with Nitrokey devices 0.4.23
Critical error:
An unhandled exception occurred
        Exception encountered: FileNotFoundError(2, 'No such file or directory')

--------------------------------------------------------------------------------
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.oux62669' with any support/help request!
- Please check if you have udev rules installed: https://docs.nitrokey.com/nitrokey3/linux/firmware-update.html#troubleshooting

```

---

<div class="post-metadata">

**Author:** ![Catbot](https://support.nitrokey.com/user_avatar/support.nitrokey.com/catbot/32/1786_2.png) [@Catbot](https://support.nitrokey.com/u/Catbot)\
**Post date:** [August 10, 2024, 7:24pm UTC](https://support.nitrokey.com/t/failed-to-find-latest-firmware-update/6391/5 "2024-08-10T19:24:52Z")

</div>

No joy, it is clearly not a permissions issue but an issue with getting the update from github in the first place …

```auto
sudo -E $(which nitropy) nk3 update
Command line tool to interact with Nitrokey devices 0.4.23
THIS COMMAND SHOULD NOT BE RUN AS ROOT!

Please install udev rules and run `nitropy` as regular user (without sudo).
We suggest using: https://raw.githubusercontent.com/Nitrokey/libnitrokey/master/data/41-nitrokey.rules
For more information, see: https://docs.nitrokey.com/fido2/linux/index.html#troubleshooting

Set ALLOW_ROOT=1 environment variable to disable this warning.

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.06vs201j' with any support/help request!
- Please check if you have udev rules installed: https://docs.nitrokey.com/nitrokey3/linux/firmware-update.html#troubleshooting

env ALLOW_ROOT=1 sudo -E $(which 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.b2r4wypq' with any support/help request!
- Please check if you have udev rules installed: https://docs.nitrokey.com/nitrokey3/linux/firmware-update.html#troubleshooting

```

I would attach the log-file but .txt, .log, and also for new users nothing is allowed to be attached.  
debug log:

```auto
377 INFO libusbsio Loading SIO library: /home/josua/.local/pipx/venvs/pynitrokey/lib64/python3.6/site-packages/libusbsio/bin/linux_x86_64/libusbsio.so
381 INFO libusbsio HID enumeration[93978663994704]: initialized
381 DEBUG libusbsio HID enumeration[93978663994704]: device #0: USB Receiver
381 DEBUG libusbsio HID enumeration[93978663994704]: device #1: USB Receiver
381 DEBUG libusbsio HID enumeration[93978663994704]: device #2: ASUSTeK Computer Inc.
381 DEBUG libusbsio HID enumeration[93978663994704]: device #3: ASUSTeK Computer Inc.
382 DEBUG libusbsio HID enumeration[93978663994704]: device #4: ITE Device(8910)
382 DEBUG libusbsio HID enumeration[93978663994704]: device #5: Nitrokey 3
382 INFO libusbsio HID enumeration[93978663994704]: finished, total 6 devices
441 DEBUG fido2.hid.linux Found CTAP device: /dev/hidraw5
561 DEBUG fido2.hid SEND: ffffffff86000868570af4f37257c0
567 DEBUG fido2.hid RECV: ffffffff86001168570af4f37257c000000004020000000500000000000000000000000000000000000000000000000000000000000000000000000000000000
574 DEBUG urllib3.connectionpool Starting new HTTPS connection (1): api.github.com:443
952 DEBUG urllib3.connectionpool https://api.github.com:443 "GET /repos/Nitrokey/nitrokey-3-firmware/releases/latest HTTP/1.1" 200 1977
957 DEBUG root print: Critical error:
957 DEBUG root print: Failed to find latest firmware update
958 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
960 DEBUG root listing all connected devices:
1021 DEBUG fido2.hid.linux Found CTAP device: /dev/hidraw5
1141 DEBUG fido2.hid SEND: ffffffff860008522ee9695afee1ee
1147 DEBUG fido2.hid RECV: ffffffff860011522ee9695afee1ee00000005020000000500000000000000000000000000000000000000000000000000000000000000000000000000000000
1147 DEBUG root :: 'Nitrokey FIDO2' keys
1148 DEBUG root :: 'Nitrokey Start' keys:
1169 DEBUG root :: 'Nitrokey 3' keys
1171 INFO libusbsio HID enumeration[93978662832656]: initialized
1171 DEBUG libusbsio HID enumeration[93978662832656]: device #0: USB Receiver
1171 DEBUG libusbsio HID enumeration[93978662832656]: device #1: USB Receiver
1171 DEBUG libusbsio HID enumeration[93978662832656]: device #2: ASUSTeK Computer Inc.
1171 DEBUG libusbsio HID enumeration[93978662832656]: device #3: ASUSTeK Computer Inc.
1171 DEBUG libusbsio HID enumeration[93978662832656]: device #4: ITE Device(8910)
1171 DEBUG libusbsio HID enumeration[93978662832656]: device #5: Nitrokey 3
1171 INFO libusbsio HID enumeration[93978662832656]: finished, total 6 devices
1172 DEBUG fido2.hid.linux Found CTAP device: /dev/hidraw5
1230 DEBUG fido2.hid SEND: ffffffff8600084dea2b98d3facbc1
1235 DEBUG fido2.hid RECV: ffffffff8600114dea2b98d3facbc100000006020000000500000000000000000000000000000000000000000000000000000000000000000000000000000000
1235 DEBUG fido2.hid SEND: 00000006e20000
1243 DEBUG fido2.hid RECV: 00000006e20010767e462dc585605b99ae8f3c6958d0470000000000000000000000000000000000000000000000000000000000000000000000000000000000
1243 DEBUG fido2.hid SEND: 00000006e20000
1251 DEBUG fido2.hid RECV: 00000006e20010767e462dc585605b99ae8f3c6958d0470000000000000000000000000000000000000000000000000000000000000000000000000000000000
1251 DEBUG root /dev/hidraw5: Nitrokey 3 767E462DC585605B99AE8F3C6958D047
1252 DEBUG root print: --------------------------------------------------------------------------------
1252 DEBUG root print: Critical error occurred, exiting now
1252 DEBUG root print: Unexpected? Is this a bug? Would you like to get support/help?
1252 DEBUG root print: - You can report issues at: https://support.nitrokey.com/
1252 DEBUG root print: - Writing an e-mail to support@nitrokey.com is also possible
1252 DEBUG root print: - Please attach the log: '/tmp/nitropy.log.b2r4wypq' with any support/help request!
1252 DEBUG root print: - Please check if you have udev rules installed: https://docs.nitrokey.com/nitrokey3/linux/firmware-update.html#troubleshooting

```

---

<div class="post-metadata">

**Author:** ![geoW](https://support.nitrokey.com/user_avatar/support.nitrokey.com/geow/32/1888_2.png) [@geoW](https://support.nitrokey.com/u/geoW)\
**Post date:** [August 10, 2024, 8:20pm UTC](https://support.nitrokey.com/t/failed-to-find-latest-firmware-update/6391/6 "2024-08-10T20:20:48Z")

</div>

> [@Catbot](#):
>
> `Command line tool to interact with Nitrokey devices 0.4.23`

Now -1 year later -  
Command line tool to interact with Nitrokey devices 0.4.50  
Maybe you could update.  
[https://github.com/Nitrokey/pynitrokey](https://github.com/Nitrokey/pynitrokey)

---

<div class="post-metadata">

**Author:** ![Catbot](https://support.nitrokey.com/user_avatar/support.nitrokey.com/catbot/32/1786_2.png) [@Catbot](https://support.nitrokey.com/u/Catbot)\
**Post date:** [August 11, 2024, 5:39am UTC](https://support.nitrokey.com/t/failed-to-find-latest-firmware-update/6391/7 "2024-08-11T05:39:33Z")

</div>

> [@geoW](#):
>
> Command line tool to interact with Nitrokey devices 0.4.50  
> Maybe you could update.  
> [GitHub - Nitrokey/pynitrokey: Python client for Nitrokey devices](https://github.com/Nitrokey/pynitrokey)

Wow… Now this is funny.  
I installed it genuinely first time on this laptop two weeks ago. I explicitly followed the readme with the “pipx install” - I wonder how I got old version. I will try to update:

```auto
pipx upgrade pynitrokey
pynitrokey is already at latest version 0.4.23 (location: /home/josua/.local/pipx/venvs/pynitrokey)

pip3 install -vvv --upgrade nitropy
...
Link requires a different Python (3.6.15 not in: '>=3.9'): https://files.pythonhosted.org/packages/23/20/cbdbaad81817f7af312d5bfb647dff1ef2c39cc0101517d4c4b906639deb/pynitrokey-0.4.50.tar.gz#sha256=048070218c6851c2bb13af5111cbbfaa6ae9365c98c2703b226de2452b169670 (from https://pypi.org/simple/pynitrokey/) (requires-python:>=3.9)

```

My system python is 3.6. So … … … here is why I get old version.

---

<div class="post-metadata">

**Author:** ![geoW](https://support.nitrokey.com/user_avatar/support.nitrokey.com/geow/32/1888_2.png) [@geoW](https://support.nitrokey.com/u/geoW)\
**Post date:** [August 11, 2024, 6:04am UTC](https://support.nitrokey.com/t/failed-to-find-latest-firmware-update/6391/8 "2024-08-11T06:04:21Z")

</div>

> [@Catbot](#):
>
> My system python is 3.6. So … … … here is why I get old version.

Oooh, it smells. 😃  
May I ask what os/version you use?

---

<div class="post-metadata">

**Author:** ![Catbot](https://support.nitrokey.com/user_avatar/support.nitrokey.com/catbot/32/1786_2.png) [@Catbot](https://support.nitrokey.com/u/Catbot)\
**Post date:** [August 11, 2024, 6:07am UTC](https://support.nitrokey.com/t/failed-to-find-latest-firmware-update/6391/9 "2024-08-11T06:07:17Z")

</div>

As mentioned in first post, opensuse leap 15.6.  
Package manager has newer options, e.g. python3.9, python311, python312 - then just need to figure out correct way with pip or pipx to use correct one.

---

<div class="post-metadata">

**Author:** ![Catbot](https://support.nitrokey.com/user_avatar/support.nitrokey.com/catbot/32/1786_2.png) [@Catbot](https://support.nitrokey.com/u/Catbot)\
**Post date:** [August 11, 2024, 6:18am UTC](https://support.nitrokey.com/t/failed-to-find-latest-firmware-update/6391/10 "2024-08-11T06:18:01Z")

</div>

This way works on opensuse leap:

```auto
sudo zypper install python311 python311-pipx
python3.11 -m pipx install pynitrokey
  installed package pynitrokey 0.4.50, installed using Python 3.11.9
  These apps are now globally available
    - nitropy
done! ✨ 🌟 ✨

```

---

<div class="post-metadata">

**Author:** ![Catbot](https://support.nitrokey.com/user_avatar/support.nitrokey.com/catbot/32/1786_2.png) [@Catbot](https://support.nitrokey.com/u/Catbot)\
**Post date:** [August 11, 2024, 6:24am UTC](https://support.nitrokey.com/t/failed-to-find-latest-firmware-update/6391/11 "2024-08-11T06:24:24Z")

</div>

It is better now, but update still fails:

```auto
nitropy nk3 update                              
Command line tool to interact with Nitrokey devices 0.4.50
Do you want to download the firmware version v1.7.2? [Y/n]: 
Download v1.7.2: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.02M/1.02M [00:00<00:00, 2.53MB/s]
Current firmware version: v1.4.0
Updated firmware version: v1.7.2

Please do not remove the Nitrokey 3 or insert any other Nitrokey 3 devices during the update. Doing so may damage the Nitrokey 3.
Do you want to perform the firmware update now? [y/N]: y

Please press the touch button to reboot the device into bootloader mode ...

Bootloader mode enabled. Please repeat this command to apply the update.
Critical error:
An unhandled exception occurred
        Exception encountered: SPSDKConnectionError()

--------------------------------------------------------------------------------
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.4p0fhcbf' with any support/help request!
- Please check if you have udev rules installed: https://docs.nitrokey.com/nitrokey3/linux/firmware-update.html#troubleshooting

```

> [@Catbot](#):
>
> debug log is too long for message body, and new users are not allowed attachments.

dmesg tail:

```auto
[2794.444619] usb 3-2: new full-speed USB device number 4 using xhci_hcd
[2799.861557] usb 3-2: New USB device found, idVendor=20a0, idProduct=42b2, bcdDevice= 1.04
[2799.861568] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[2799.861572] usb 3-2: Product: Nitrokey 3
[2799.861575] usb 3-2: Manufacturer: Nitrokey
[2799.994974] hid-generic 0003:20A0:42B2.000A: hiddev98,hidraw5: USB HID v1.11 Device [Nitrokey Nitrokey 3] on usb-0000:04:00.4-2/input1
[2800.605416] cdc_acm 3-2:1.2: ttyACM0: USB ACM device
[2800.605452] usbcore: registered new interface driver cdc_acm
[2800.605455] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[2829.893122] usb 3-2: USB disconnect, device number 4
[2830.240189] usb 3-2: new high-speed USB device number 5 using xhci_hcd
[2830.392252] usb 3-2: New USB device found, idVendor=20a0, idProduct=42dd, bcdDevice= 3.00
[2830.392264] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[2830.392269] usb 3-2: Product: USB COMPOSITE DEVICE
[2830.392272] usb 3-2: Manufacturer: NXP SEMICONDUCTOR INC.
[2830.396979] hid-generic 0003:20A0:42DD.000B: hiddev98,hidraw7: USB HID v1.00 Device [NXP SEMICONDUCTOR INC. USB COMPOSITE DEVICE] on usb-0000:04:00.4-2/input0

```

---

<div class="post-metadata">

**Author:** ![geoW](https://support.nitrokey.com/user_avatar/support.nitrokey.com/geow/32/1888_2.png) [@geoW](https://support.nitrokey.com/u/geoW)\
**Post date:** [August 11, 2024, 6:47am UTC](https://support.nitrokey.com/t/failed-to-find-latest-firmware-update/6391/12 "2024-08-11T06:47:59Z")

</div>

> [@Catbot](#):
>
> As mentioned in first post, opensuse leap 15.6.

Old brain, sorry, but remembers me to do the “smell-test” myself.

What about

> C:\Users\Admin\>nitropy nk3 [status | test]

Consider factory reset?

---

<div class="post-metadata">

**Author:** ![Catbot](https://support.nitrokey.com/user_avatar/support.nitrokey.com/catbot/32/1786_2.png) [@Catbot](https://support.nitrokey.com/u/Catbot)\
**Post date:** [August 11, 2024, 7:27am UTC](https://support.nitrokey.com/t/failed-to-find-latest-firmware-update/6391/13 "2024-08-11T07:27:53Z")

</div>

> [@geoW](#):
>
> C:\Users\Admin\>nitropy nk3 [status | test]

Looks okay to me, some test fails probably because firmware version.

```auto
➜ workspace nitropy nk3 status                       
Command line tool to interact with Nitrokey devices 0.4.50
UUID: 767E462DC585605B99AE8F3C6958D047
Firmware version: v1.4.0
Init status: ok
Free blocks (int): 41
Free blocks (ext): 474
Variant: LPC55
➜ workspace nitropy nk3 test  
Command line tool to interact with Nitrokey devices 0.4.50
Found 1 Nitrokey 3 device(s):
- Nitrokey 3 at /dev/hidraw8

Running tests for Nitrokey 3 at /dev/hidraw8

[1/5] uuid UUID query SUCCESS 767E462DC585605B99AE8F3C6958D047
[2/5] version Firmware version query SUCCESS v1.4.0
[3/5] status Device status SUCCESS Status(init_status=<InitStatus: 0>, ifs_blocks=41, efs_blocks=474, variant=<Variant.LPC55: 1>)
Running SE050 test: |                                                                                                                                                                                                                                                         
[4/5] se050 SE050 SKIPPED Testing SE050 functionality is not supported by the device
[5/5] fido2 FIDO2 FAILURE FIDO2 pin is set, but not provided (use the --pin argument)

5 tests, 3 successful, 1 skipped, 1 failed

Summary: 1 device(s) tested, 0 successful, 1 failed

Critical error:
Test failed for 1 device(s)

--------------------------------------------------------------------------------
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.aqdt_h0p' with any support/help request!
- Please check if you have udev rules installed: https://docs.nitrokey.com/nitrokey3/linux/firmware-update.html#troubleshooting

```

Factory reset would be okay, but because firmware version …

```auto
➜ workspace nitropy nk3 factory-reset
Command line tool to interact with Nitrokey devices 0.4.50
Please touch the device to confirm the operation
Critical error:
Factory reset is not supported by the firmware version on the device

```

However before the big exception in my previous post, it does say:

```auto
Please repeat this command to apply the update.

```

---

<div class="post-metadata">

**Author:** ![geoW](https://support.nitrokey.com/user_avatar/support.nitrokey.com/geow/32/1888_2.png) [@geoW](https://support.nitrokey.com/u/geoW)\
**Post date:** [August 11, 2024, 7:56am UTC](https://support.nitrokey.com/t/failed-to-find-latest-firmware-update/6391/14 "2024-08-11T07:56:43Z")

</div>

> [@Catbot](#):
>
> `[5/5] fido2 FIDO2 FAILURE FIDO2 pin is set, but not provided (use the --pin argument)`

Did you set / forget a pin?  
Maybe you can check:

> C:\Users\Admin\>nitropy fido2

---

<div class="post-metadata">

**Author:** ![Catbot](https://support.nitrokey.com/user_avatar/support.nitrokey.com/catbot/32/1786_2.png) [@Catbot](https://support.nitrokey.com/u/Catbot)\
**Post date:** [August 11, 2024, 8:07am UTC](https://support.nitrokey.com/t/failed-to-find-latest-firmware-update/6391/15 "2024-08-11T08:07:06Z")

</div>

> [@geoW](#):
>
> C:\Users\Admin\>nitropy fido2

I do not think this firmware I had installed supported fido2 in the first place.

```auto
➜ workspace nitropy nk3 status
Command line tool to interact with Nitrokey devices 0.4.50
UUID: 767E462DC585605B99AE8F3C6958D047
Firmware version: v1.4.0
Init status: ok
Free blocks (int): 41
Free blocks (ext): 474
Variant: LPC55
➜ workspace nitropy fido2 status
Command line tool to interact with Nitrokey devices 0.4.50
Critical error:
An unhandled exception occurred
        Exception encountered: CtapError('CTAP error: 0x01 - INVALID_COMMAND')

--------------------------------------------------------------------------------
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.5uvvjh97' with any support/help request!
- Please check if you have udev rules installed: https://docs.nitrokey.com/nitrokey3/linux/firmware-update.html#troubleshooting

```

---

<div class="post-metadata">

**Author:** ![geoW](https://support.nitrokey.com/user_avatar/support.nitrokey.com/geow/32/1888_2.png) [@geoW](https://support.nitrokey.com/u/geoW)\
**Post date:** [August 11, 2024, 10:10am UTC](https://support.nitrokey.com/t/failed-to-find-latest-firmware-update/6391/16 "2024-08-11T10:10:32Z")

</div>

> [@Catbot](#):
>
> I do not think this firmware I had installed supported fido2 in the first place.

Maybe stepwise updating is the way??  
1.5.0  
1.6.0  
1.7.2

---

<div class="post-metadata">

**Author:** ![Catbot](https://support.nitrokey.com/user_avatar/support.nitrokey.com/catbot/32/1786_2.png) [@Catbot](https://support.nitrokey.com/u/Catbot)\
**Post date:** [August 11, 2024, 6:19pm UTC](https://support.nitrokey.com/t/failed-to-find-latest-firmware-update/6391/17 "2024-08-11T18:19:06Z")

</div>

> [@geoW](#):
>
> Maybe stepwise updating is the way??  
> 1.5.0

No joy, 1.5.0 does not install.

```auto
➜ ~ nitropy nk3 update --version v1.5.0
Command line tool to interact with Nitrokey devices 0.4.50
Do you want to download the firmware version v1.5.0? [Y/n]: 
Download v1.5.0: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 906k/906k [00:00<00:00, 2.11MB/s]
Current firmware version: v1.4.0
Updated firmware version: v1.5.0

Please do not remove the Nitrokey 3 or insert any other Nitrokey 3 devices during the update. Doing so may damage the Nitrokey 3.
Do you want to perform the firmware update now? [y/N]: y

Please press the touch button to reboot the device into bootloader mode ...

Bootloader mode enabled. Please repeat this command to apply the update.
Critical error:
An unhandled exception occurred
        Exception encountered: SPSDKConnectionError()

--------------------------------------------------------------------------------
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.vh4kwtvi' with any support/help request!
- Please check if you have udev rules installed: https://docs.nitrokey.com/nitrokey3/linux/firmware-update.html#troubleshooting

```

run command again, now that device is in bootloader mode

```auto
➜ ~ nitropy nk3 update --version v1.5.0
Command line tool to interact with Nitrokey devices 0.4.50
Do you want to download the firmware version v1.5.0? [Y/n]: 
Download v1.5.0: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 906k/906k [00:00<00:00, 2.14MB/s]
Current firmware version: [unknown]
Updated firmware version: v1.5.0

Please do not remove the Nitrokey 3 or insert any other Nitrokey 3 devices during the update. Doing so may damage the Nitrokey 3.
Do you want to perform the firmware update now? [y/N]: y
Critical error:
An unhandled exception occurred
        Exception encountered: SPSDKConnectionError()

--------------------------------------------------------------------------------
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.chj97rr8' with any support/help request!
- Please check if you have udev rules installed: https://docs.nitrokey.com/nitrokey3/linux/firmware-update.html#troubleshooting

```

---

<div class="post-metadata">

**Author:** ![Catbot](https://support.nitrokey.com/user_avatar/support.nitrokey.com/catbot/32/1786_2.png) [@Catbot](https://support.nitrokey.com/u/Catbot)\
**Post date:** [August 11, 2024, 6:21pm UTC](https://support.nitrokey.com/t/failed-to-find-latest-firmware-update/6391/18 "2024-08-11T18:21:29Z")

</div>

BUT this time running as root did help!  
So first run once to swicth into bootloader mode, see strange exception.

Then run again as root, and it succeeds to install v1.5.0.

```auto
➜ ~ env ALLOW_ROOT=1 sudo -E $(which nitropy) nk3 update --version v1.5.0
Command line tool to interact with Nitrokey devices 0.4.50
Do you want to download the firmware version v1.5.0? [Y/n]: 
Download v1.5.0: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 906k/906k [00:00<00:00, 2.21MB/s]
Current firmware version: [unknown]
Updated firmware version: v1.5.0

Please do not remove the Nitrokey 3 or insert any other Nitrokey 3 devices during the update. Doing so may damage the Nitrokey 3.
Do you want to perform the firmware update now? [y/N]: y
Perform firmware update: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 457k/457k [00:08<00:00, 56.3kB/s]
Finalize upgrade: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 100/100 [00:00<00:00, 12712.32%/s]

```

Same procedure worked for v1.7.2 also.  
So in summary: Minimum python-3.9 to get latest version of pynitrokey, plus root for actual update installation.

---

<div class="post-metadata">

**Author:** ![sosthene-nitrokey](https://support.nitrokey.com/user_avatar/support.nitrokey.com/sosthene-nitrokey/32/1374_2.png) [@sosthene-nitrokey](https://support.nitrokey.com/u/sosthene-nitrokey)\
**Post date:** [August 12, 2024, 7:25am UTC](https://support.nitrokey.com/t/failed-to-find-latest-firmware-update/6391/19 "2024-08-12T07:25:27Z")

</div>

Hi,

It appears that you are missing the udev rules for the nitrokey 3.

[Here are the udev rules in the OpenSuse repository](https://software.opensuse.org/package/libnitrokey-udev).

Normally after installing this you won’t need root anymore.
