Nitropy: Error Message with command "Update"

Hi,
I tried to update the firmware of my Nitrokey 3C NFC with Nitropy on macOS.

I get an error message.

How can I solve the problem please?

Thanks for your help : )

MacBookPro:~ taku$ nitropy fido2 update
/Users/taku/.local/pipx/venvs/pynitrokey/lib/python3.9/site-packages/urllib3/__init__.py:34: NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(
Command line tool to interact with Nitrokey devices 0.6.0
Nitrokey FIDO2 firmware update tool
Platform: macOS-15.0.1-arm64-arm-64bit
System: Darwin, is_linux: False
Python: 3.9.6
Saving run log to: /var/folders/rl/wvtz5zrs4kz5_tqf88q1kcjh0000gn/T/nitropy.log.58s6a2zh

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 /var/folders/rl/wvtz5zrs4kz5_tqf88q1kcjh0000gn/T/fido2_firmware.json
	Downloaded firmware version: 2.4.1.nitrokey

This will update your Nitrokey FIDO2
Do you want to continue? [yes/no]: yes
Entering bootloader mode, please confirm with button on key! (long 10 second press)
Critical error:
problem switching to bootloader mode:
	Exception encountered: OSError('Failed reading a response')
Warning: no backend was found to use for communication. Please refer to documentation how to install additional libraries.

--------------------------------------------------------------------------------
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: '/var/folders/rl/wvtz5zrs4kz5_tqf88q1kcjh0000gn/T/nitropy.log.58s6a2zh' with any support/help request!
--------------------------------------------------------------------------------

Try:
nitropy nk3 update

You seem to have a Nitrokey FIDO2, correct? Then the command should be indeed nitropy fido2 update. The error seems to indicate that you didn’t press the button for 10 seconds. Are you sure you did that?

If you keep receiving the same error, please sent us the referenced log file from the output.

So nk3 should work.

That worked fine. Thanks : )

May be it is useful to update the informations in the manual for nitropy to avoid that other users run into that error I described?

After the update of the firmware I have the firmware version 1.7.2
Is that the latest version?

My version of Nitropy is 0.6.0.
Is that the latest version?

“nitropy nk3” does not offer a command to set or reset a pin.
Please why are there those 2 “commands” for nitropy: “fido2” and “nk3”?

For me as user, who is not used to work with command line tools, it is quite complicated to configure and manage a Stick with that command line tools.
I hope you can understand my point of view.

It is hard enough, that there’s no “one-click-installation-method” and no simple way to update the software nitropy.

And I am writing this so specifically because I am basically open to the use of command line tools.

But in my opinion, they are only reasonable for normal users if the 3 conditions mentioned are met:

1 one click installation method for nitropy
2 one click update method for nitropy
3 full set of commands in the main level of nitropy (not a subset “fido2” and “nk3”)

Have a nice day!

1 Like

On Github you will get more information. (software revisions …)
https://github.com/Nitrokey

You will love NitrokeyApp 2, perhaps.

May be it is useful to update the informations in the manual for nitropy to avoid that other users run into that error I described?

The firmware update for Nitrokey 3 on macOS is documented here.

After the update of the firmware I have the firmware version 1.7.2
Is that the latest version?

Yes, the version 1.7.2 is the last stable version of the firmware. You can see all release here.

My version of Nitropy is 0.6.0.
Is that the latest version?

Yes, the version 0.6.0 is the last version of nitropy. You can see all releases here.

“nitropy nk3” does not offer a command to set or reset a pin.
Please why are there those 2 “commands” for nitropy: “fido2” and “nk3”?

How to set the different PINs is documented here. I can understand your confusion about the nitropy fido2 command to use FIDO2 features on Nitrokey 3. This is due historic reasons. FIDO2 was introduced with the Nitrokey Fido2 product. We’re going to improve the nitropy tool soon, as we’re already preparing the changes in the background.

But in my opinion, they are only reasonable for normal users if the 3 conditions mentioned are met:
1 one click installation method for nitropy
2 one click update method for nitropy
3 full set of commands in the main level of nitropy (not a subset “fido2” and “nk3”)

Understood. Thanks for your feedback! I will forward it to the team.

2 Likes

There’s no GUI App for macOS which contains all commands you need to manage your Nitrokey.

And neither there’s an app compatible to macOS:

Currently there is no official support for macOS, you might want to try installing through pypi using pip and/or pipx.

I tested to reset my Nitrokey “3C NFC” with nitropy.

I get error messages. I tried 2 methods.

FW, as mentioned: 1.7.2

How can I solve that please?

I have 4 Sticks “3C NFC”. With all the 3 others, reset works fine.

I reupdated the “stick with the error” with the firmware 1.7.2, although “nitropy nk3 version” shows 1.7.2 yet.
No change in the result.

I can reset 3 sticks. I cannot reset 1 stick.

Test 1

Result:

MacBookPro:~ taku$ nitropy nk3 factory-reset
/Users/taku/.local/pipx/venvs/pynitrokey/lib/python3.9/site-packages/urllib3/__init__.py:34: NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(
Command line tool to interact with Nitrokey devices 0.6.0
Please touch the device to confirm the operation
Critical error:
An unhandled exception occurred
	Exception encountered: OSError('Failed reading a response')
Warning: no backend was found to use for communication. Please refer to documentation how to install additional libraries.

--------------------------------------------------------------------------------
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: '/var/folders/rl/wvtz5zrs4kz5_tqf88q1kcjh0000gn/T/nitropy.log.skm8p4so' with any support/help request!
--------------------------------------------------------------------------------

Test 2

MacBookPro:~ taku$ nitropy fido2 reset
/Users/taku/.local/pipx/venvs/pynitrokey/lib/python3.9/site-packages/urllib3/__init__.py:34: NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(
Command line tool to interact with Nitrokey devices 0.6.0
Reset is only possible 10secs after plugging in the device.
Please (re-)plug in your Nitrokey FIDO2 now!
Warning: Your credentials will be lost!!! continue? [(y)es/(n)o]: y
choosing: yes
Press key to confirm -- again, your credentials will be lost!!!
Critical error:
Reset failed (CTAP error: 0x30 - NOT_ALLOWED)
Did you confirm with a key-press 10secs after plugging in?
Please re-try...
Warning: no backend was found to use for communication. Please refer to documentation how to install additional libraries.

--------------------------------------------------------------------------------
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: '/var/folders/rl/wvtz5zrs4kz5_tqf88q1kcjh0000gn/T/nitropy.log.5vmofd3o' with any support/help request!
--------------------------------------------------------------------------------

Sorry, I have no clue of macos,
(execution requires Administrator rights)
So here in win10 I am used to do it in terminal with admin rights and keep care of timing.