Update firmware of nitrokey3A mini on Linux

After installing nitropy (“pipx install pynitrokey”) I checked the firmware version of my nitrokey 3A mini

$ nitropy nk3 version
Command line tool to interact with Nitrokey devices 0.4.23
v1.4.0

And since there seems to be a v1.5.0 available, I downloaded it from firmware-nk3-v1.5.0.zip
unzipped it and tried to install it.

$ nitropy nk3 update firmware-nk3xn-lpc55-v1.5.0.sb2
Command line tool to interact with Nitrokey devices 0.4.23
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 ...

Critical error:
No Nitrokey 3 bootloader device found

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

Unfortunately it doesn’t seem to work. Even putting the key into bootloader mode (“nitropy nk3 reboot --bootloader”) before doesn’t help. It doesn’t seem to find the device after rebooting into bootloader mode.
Here is the content of the debug log.

5149      DEBUG       root print: Please press the touch button to reboot the device into bootloader mode ...
9168      DEBUG pynitrokey.nk3.device./dev/hidraw0 ignoring OSError after reboot
Traceback (most recent call last):
  File "/home/raphael/.local/pipx/venvs/pynitrokey/lib/python3.8/site-packages/pynitrokey/nk3/device.py", line 83, in reboot
    self._call(Command.UPDATE)
  File "/home/raphael/.local/pipx/venvs/pynitrokey/lib/python3.8/site-packages/pynitrokey/nk3/device.py", line 116, in _call
    response = self.device.call(command.value)
  File "/home/raphael/.local/pipx/venvs/pynitrokey/lib/python3.8/site-packages/fido2/hid/__init__.py", line 191, in call
    recv = self._connection.read_packet()
  File "/home/raphael/.local/pipx/venvs/pynitrokey/lib/python3.8/site-packages/fido2/hid/base.py", line 80, in read_packet
    return os.read(self.handle, self.descriptor.report_size_in)
OSError: [Errno 5] Input/output error
9170      DEBUG pynitrokey.cli.nk3 Trying to connect to bootloader (try 1 of 3)
9170      DEBUG pynitrokey.cli.nk3 Searching Nitrokey 3 bootloader device (try 1 of 10)
9171       INFO  libusbsio HID enumeration[27170064]: initialized
9171       INFO  libusbsio HID enumeration[27170064]: finished, total 0 devices
9172      DEBUG pynitrokey.cli.nk3 No Nitrokey 3 bootloader device found, continuing
9673      DEBUG pynitrokey.cli.nk3 Searching Nitrokey 3 bootloader device (try 2 of 10)
[...]
13696     DEBUG pynitrokey.cli.nk3 Searching Nitrokey 3 bootloader device (try 10 of 10)
13697      INFO  libusbsio HID enumeration[20916512]: initialized
13697      INFO  libusbsio HID enumeration[20916512]: finished, total 0 devices
13698     DEBUG pynitrokey.cli.nk3 No Nitrokey 3 bootloader device found, continuing
13698     DEBUG       root print: Critical error:
13699     DEBUG       root print: No Nitrokey 3 bootloader device found
13699     DEBUG       root listing all connected devices:
13700     DEBUG       root :: 'Nitrokey FIDO2' keys
13700     DEBUG       root :: 'Nitrokey Start' keys:
13715     DEBUG       root :: 'Nitrokey 3' keys
13715      INFO  libusbsio HID enumeration[28410624]: initialized
13716      INFO  libusbsio HID enumeration[28410624]: finished, total 0 devices

I tried again with Ubuntu 22.04 instead of Ubuntu 20.04 and it worked.
I had to run

$ nitropy nk3 update ./firmware-nk3-v1.5.0.zip

instead of

$ nitropy nk3 update firmware-nk3xn-lpc55-v1.5.0.sb2

though.

But now I ran into a similar problem with updating fido2:

$ nitropy fido2 update -y
Command line tool to interact with Nitrokey devices 0.4.40
Nitrokey FIDO2 firmware update tool
Platform: Linux-6.2.0-32-generic-x86_64-with-glibc2.35
System: Linux, is_linux: True
Python: 3.10.12
Saving run log to: /tmp/nitropy.log.scjcssj7

Starting update procedure for Nitrokey FIDO2...
Found latest firmware: nitrokey-fido2-firmware-2.4.0.json
		(published at 2021-05-12T12:24:14Z, under tag 2.4.1.nitrokey)
	Current Firmware version: 0.64.1
Downloading latest firmware: 2.4.1.nitrokey (published at 2021-05-12T12:24:14Z)
	Firmware saved to /tmp/fido2_firmware.json
	Downloaded firmware version: 2.4.1.nitrokey
Entering bootloader mode, please confirm with button on key! (long 10 second press)
Critical error:
problem switching to bootloader mode:
	Exception encountered: OSError(5, 'Input/output error')

and the debug log

3104      DEBUG       root print: Firmware saved to /tmp/fido2_firmware.json
3105      DEBUG       root print: Downloaded firmware version: 2.4.1.nitrokey
15528     DEBUG       root print: Entering bootloader mode, please confirm with button on key! (long 10 second press)
16529     DEBUG       root print: Critical error:
16529     DEBUG       root print: problem switching to bootloader mode:
16529     ERROR       root [Errno 5] Input/output error
Traceback (most recent call last):
  File "/home/raphael/.local/pipx/venvs/pynitrokey/lib/python3.10/site-packages/pynitrokey/cli/update.py", line 184, in update
    client.enter_bootloader_or_die()
  File "/home/raphael/.local/pipx/venvs/pynitrokey/lib/python3.10/site-packages/pynitrokey/fido2/client.py", line 389, in enter_bootloader_or_die
    self.enter_bootloader()
  File "/home/raphael/.local/pipx/venvs/pynitrokey/lib/python3.10/site-packages/pynitrokey/fido2/client.py", line 385, in enter_bootloader
    self.send_data_hid(SoloBootloader.HIDCommandEnterBoot, b"")
  File "/home/raphael/.local/pipx/venvs/pynitrokey/lib/python3.10/site-packages/pynitrokey/fido2/client.py", line 152, in send_data_hid
    return self.dev.call(cmd, data, event=event)
  File "/home/raphael/.local/pipx/venvs/pynitrokey/lib/python3.10/site-packages/fido2/hid/__init__.py", line 191, in call
    recv = self._connection.read_packet()
  File "/home/raphael/.local/pipx/venvs/pynitrokey/lib/python3.10/site-packages/fido2/hid/base.py", line 80, in read_packet
    return os.read(self.handle, self.descriptor.report_size_in)
OSError: [Errno 5] Input/output error
16530     DEBUG       root listing all connected devices:
16589     DEBUG       root :: 'Nitrokey FIDO2' keys
16589     DEBUG       root :: 'Nitrokey Start' keys:
16611     DEBUG       root :: 'Nitrokey 3' keys