nitrokey-3-firmware: nitropy nk3 update to 1.3.0-rc.1 updates but ends with "Critical error"
Ran nitropy nk3 update firmware-nk3xn-lpc55-v1.3.0-rc.1.sb2
and got this output:
Command line tool to interact with Nitrokey devices 0.4.25
Current firmware version: v1.2.2
Updated firmware version: v1.3.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 ...
Perform firmware update: 100%|█...█| 315k/315k [00:04<00:00, 72.2kB/s]
Critical error:
No Nitrokey 3 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/user/1000/nitropy.log' with any support/help request!
- Please check if you have udev rules installed: https://docs.nitrokey.com/nitrokey3/linux/firmware-update.html#troubleshooting
(Hopefully sanitised) /tmp/user/1000/nitropy.log attached.
A couple observations about the log:
- At the beginning, there are various permission errors as the software iterates through the HID devices trying to find the Nitrokey. I assume this is normal behaviour?
- At the end of the log (after about 3 megs of data dump) there are multiple attempts to reconnect to the Nitrokey, which all fail. Perhaps the Nitrokey didn’t reboot properly?
In a minor panic, I re-ran nitropy nk3 update firmware-nk3xn-lpc55-v1.3.0-rc.1.sb2
and got this output:
Command line tool to interact with Nitrokey devices 0.4.25
Current firmware version: v1.3.0
Updated firmware version: v1.3.0
The version of the firmware image is the same as on the device. Do you want to continue anyway? [y/N]: N
Aborted!
So it appears, thankfully, that nothing broke. Also ran nitropy nk3 test
and got 3/3.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 16 (7 by maintainers)
@bordenc Thank you for that offer! Can you try to install the suggested patch? Most interesting would be the behavior with Python 3.11, but Windows would also be useful.
Ideally, you could also test
nitropy-git-346 nk3 update
with a NK3AM (even if you just re-install the same version).Afterwards you can uninstall the patched version with:
You poor people. You’re one of a precious few open source projects that’s responsive, courteous and helpful to your users, and you still have to deal with this nonsense. No worries. I hope the experience report was helpful and, at least, deters others from making the same ones.
Nevertheless, your dedication and professionalism is appreciated and makes me feel far better about giving you my money 😃
Looks like you have reached to the solution. Closing as fixed. Please reopen otherwise.
@daringer signed up under username
borden
– can’t PM you as I’m still on probation, not that I’m complaining.hey @bordenc , would you like to join our beta-testers? We would be happy to have a Windows user in this group. If you would like to join, please create an account at https://support.nitrokey.com/ and send me a PM there (same nick).
Some day, I’ll find a problem that you aren’t already two steps ahead on. Revised command works perfectly on Linux. Windows 10 PowerShell output:
Using Python 3.9 because that’s what ships with Visual Studio. I can upgrade to 3.11 if that’s specifically what you need. I hope that’s useful.
@bordenc Thanks for testing! Sorry, I forgot to mention that. We also changed the update process so you no longer have to manually download the firmware. You can just run:
@robin-nitrokey Works for me under Linux Fedora 37 with:
@bordenc we are trying to fix this nonsense with: https://github.com/Nitrokey/pynitrokey/pull/346 … this should hopefully enable python 3.11 support
Ah, I see. So the reason is that one of our dependencies is unfortunately not available for Python 3.11: https://github.com/Nitrokey/pynitrokey/issues/330 We want to fork that dependency to fix this but this is not implemented yet. I will bring it up again so that we maybe increase the priority for this fix.
Thanks for the report. The first boot after the update took a bit longer than usual because of a change to the external flash, so the update command timed out while waiting for the booted device. We’ve increased the timeout in recent pynitrokey versions and will increase it even more in the next pynitrokey release to avoid this issue.
Your pynitrokey version 0.4.25 is pretty old. Please make sure to use the latest pynitrokey version when installing firmware updates to avoid compatibility problems.
Regarding the permission errors, this is common behavior and no cause for concern. pynitroey tries to open all hidraw devices to find Nitrokeys, and some of the devices are not available for a regular user.