Nitrokey Pro only detected with App v1.2

I have a new Nitrokey Pro and installed first the snap version(nitrokey-app 1.3snap3).

EDIT: I also tried it with --devmode which is described in the GitHub repo.

My Nitrokey will not be detected. So I deleted this version and added the ppa(v1.2). With this version my Key gets detected.

I have opensc(0.15.0-1) and libccid(1.4.22-1) installed.
Nitrokey’s Firmware is version 0.8.

Anyone else has this issue?
How I can use the newest nitrokey-app version? The old one has not a such nice GUI.

Hi,

I think it was just a coincidence that going back to 1.2 worked. As you installed opensc it is more likely that opensc blocked the device. GnuPG and OpenSC both blocks the device for exclusive use and thus making it impossible for each other to use it afterwards.

As the App is working with help of GnuPG’s scdaemon it probably couldn’t access the device because of OpenSC. It this might possible? Do you want to try to remove opensc and try the snap 1.3 again to have look?

If you tell me what system you are using I may can reproduce it here.

Kind regards
Alex

Hi!

My guess is snap is forbidding access to the device. Please remove the snap package completely and install it once again with --devmode. If this will still occur, could you paste the terminal history for used snap commands? You could use snap list command to make sure the App is in devmode.

Actually, App communicates directly with the device by hidapi/libusb and it is not using GnuPG or OpenSC at all. The only coincidence the GnuPG/scdaemon installation could help is for the scdaemon’s package udev rules, where Nitrokey devices are allowed for users to be used without root privileges.

I would leave the Nitrokey App v1.2 package installed (for the udev rules, which we supply as well) and install v1.3 from snap, if the snap install nitrokey-app --devmode would not help. These two can coexist, no need to worry. It should work without it though, as it does on my Ubuntu 18.04.

$ snap list
core               16-2.32.6  4571  stable     canonical  core
nitrokey-app       1.3snap3   19    candidate  nitrokey   devmode

I reinstalled the snap version, does not work

nitrokey-app 1.3snap3 19 stable nitrokey devmode

I also tried it in a Virtual Machine, installed the same OS.
@nitroalex I am using KDE Neon which is based on Ubuntu 16.04.

After I removed opensc and tried the snap package again, nothing happend, too.

Hi,

I could reproduce on 16.04. But doing the following (as szczepan suggested) did actually fix it for me:

sudo snap remove nitrokey-app
sudo snap install nitrokey-app --devmode

I also did the following (beforehand, to test if this is the real problem here):

sudo apt-get update && sudo apt-get install libccid
wget https://raw.githubusercontent.com/Nitrokey/libnitrokey/master/data/41-nitrokey.rules
sudo mv 41-nitrokey.rules /etc/udev/rules.d/
reboot

The last three commands are just to make sure, that the udev rules are there. But as szczepan said, having nitrokey-app (older version) installed would do the trick too.

Kind regards
Alex

Crazy, I removed all nitrokey-app installations and rebooted.

Installed snap package, doesn’t worked.
Installed next to the snap package the ppa version, doesn’t worked.

Removed ppa version and started snap version again. Whoa “Nitrokey Pro connected”!

I don’t know what was the issue, if it matters and I can do anything to help to reproduce the bug I will do that.

If others have the same problem, my “solution” will not really help. I’ll mark the previous answer as the solution.

1 Like

Interesting. I will surely check this while messing around with the next Nitrokey App release. I do not remember I had such issues before. So basically, you had a clean OS, installed the Snap in --devmode and it did not work. It might be some Snap/AppArmor issue (especially while reboot helped). Perhaps some info would be provided in proper dmesg logs, if you would like to explore this further. There is a --classic snap modifier as well, which I had not tested yet.

Sorry for trouble and thank you for testing!