Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with using v0.4 package #43

Closed
3 tasks done
szszszsz opened this issue Sep 18, 2020 · 7 comments
Closed
3 tasks done

Problem with using v0.4 package #43

szszszsz opened this issue Sep 18, 2020 · 7 comments
Assignees

Comments

@szszszsz
Copy link
Member

szszszsz commented Sep 18, 2020

After installing the latest pynitrokey v0.4, it cannot be called successfully:

$ nitropy
AttributeError: module 'pynitrokey' has no attribute 'fido2' 
  • correct
  • add CI check
  • check dependencies
@daringer daringer self-assigned this Sep 21, 2020
@daringer
Copy link
Collaborator

daringer commented Sep 21, 2020

cannot reproduce ;(

# to not rely on pip for removal
$ sudo rm -rf /usr/lib/python3.8/pynitrokey* /usr/bin/nitropy

# install
$ sudo pip install pynitrokey

# run
$ nitropy
*** Nitrokey tool for Nitrokey FIDO2 & Nitrokey Start
Usage: nitropy [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  fido2    Interact with Nitrokey FIDO2 keys, see subcommands.
  ls       List Nitrokey keys (in firmware or bootloader mode)
  start    Interact with 'Nitrokey Start' keys, see subcommands.
  version  Version of pynitrokey library and tool.

dang, "works on my computer" ... will check CI, or better do a pip-based CI
ok, but CircleCI also seems to work: https://app.circleci.com/pipelines/github/Nitrokey/pynitrokey/13/workflows/b96038f1-36e9-41e9-8bc5-fb5e5a35129e , but will add a release install and run CI now to be sure

@daringer
Copy link
Collaborator

please check:
https://app.circleci.com/pipelines/github/Nitrokey/pynitrokey/16/workflows/66511b0e-ee25-43ab-aeb6-db2950ed3834/jobs/29

any chance you forgot to use -U or something with pip?
You could also crosscheck the Makefile and tell me the difference between your install process and the one CI-ed....

@szszszsz
Copy link
Member Author

szszszsz commented Sep 21, 2020

The reproduction scenario is a simple call of pip install without the -U, on a used system, with previously installed fido2 0.7.x library (so potential upgrade path from 0.3.2).

I believe the problem lies in the requirements file, where fido2 dependency lowest version is not set:

requires = [
"click >= 7.0",
"cryptography",
"ecdsa",
"fido2",
"intelhex",
"pyserial",
"pyusb",
"requests",
"pygments",
"cffi",
"cbor",

Could you update the dep version here as well by the way?

@daringer
Copy link
Collaborator

ah ok, good finding, will be fixed in a moment

@daringer
Copy link
Collaborator

@szszszsz
Copy link
Member Author

While at the topic, I would go into more general way of update process check: install the previous version first, then update to latest to see, if all dependencies were set up correctly. That would require locking versions at the time at release though (either pip freeze or pipenv lock.

@szszszsz
Copy link
Member Author

szszszsz commented Sep 24, 2020

Hi!
Could you make a release with that? It breaks CI unless the proper package is pinned.
Edit: https://travis-ci.org/github/Nitrokey/nitrokey-fido2-firmware/builds/729911220#L1107

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants