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

TypeError: make_credential() takes 2 positional arguments but 4 were given #52

Closed
patvdleer opened this issue Jan 14, 2020 · 16 comments
Closed

Comments

@patvdleer
Copy link

$ solo key verify
Please press the button on your Solo key
Traceback (most recent call last):
  File "/usr/local/bin/solo", line 8, in <module>
    sys.exit(solo_cli())
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/solo/cli/key.py", line 322, in verify
    cert = solo.client.find(serial, udp=udp).make_credential(pin=pin)
  File "/usr/local/lib/python3.7/dist-packages/solo/client.py", line 233, in make_credential
    rp, user, challenge, exclude_list=[], pin=pin
TypeError: make_credential() takes 2 positional arguments but 4 were given
@patvdleer
Copy link
Author

$ solo key make-credential
Touch your authenticator to generate a credential...
Traceback (most recent call last):
  File "/usr/local/bin/solo", line 8, in <module>
    sys.exit(solo_cli())
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/solo/cli/key.py", line 135, in make_credential
    host=host, user_id=user, serial=serial, output=True, prompt=prompt, udp=udp
  File "/usr/local/lib/python3.7/dist-packages/solo/hmac_secret.py", line 44, in make_credential
    rp, user, challenge, extensions=hmac_ext.create_dict(), pin=pin
TypeError: make_credential() takes 2 positional arguments but 4 were given

@nickray
Copy link
Member

nickray commented Jan 14, 2020

I'll fix this.

@nickray
Copy link
Member

nickray commented Jan 14, 2020

I can't reproduce. What versions of solo-python and Yubico/python-fido2 do you have installed @patvdleer?

@s00500
Copy link

s00500 commented Jan 15, 2020

Having the same issue, solo version output: 0.0.21

@patvdleer
Copy link
Author

Im on latest master

@nickray
Copy link
Member

nickray commented Jan 15, 2020

I'm asking about the fido2 dependency, can you tell?

@mporrato
Copy link

Same issue here with a freshly created venv:

$ python3 --version
Python 3.7.6
$ pip list
Package      Version   
------------ ----------
certifi      2019.11.28
cffi         1.13.2    
chardet      3.0.4     
Click        7.0       
cryptography 2.8       
ecdsa        0.15      
fido2        0.8.1     
idna         2.8       
intelhex     2.2.1     
pip          19.3.1    
pycparser    2.19      
pyserial     3.4       
pyusb        1.0.2     
requests     2.22.0    
setuptools   41.2.0    
six          1.13.0    
solo-python  0.0.21    
urllib3      1.25.7    

@s00500
Copy link

s00500 commented Jan 15, 2020

 ~ pip3 list | grep fido2
fido2                                   0.8.1    

@nickray
Copy link
Member

nickray commented Jan 15, 2020

I see now. Can you try v0.0.22 please?

@mporrato
Copy link

@nickray 0.0.22 works for me. Thanks!

@nickray
Copy link
Member

nickray commented Jan 15, 2020

Thank heavens...

@s00500
Copy link

s00500 commented Jan 15, 2020

Confirming, thanks for the super fast fix

@mporrato
Copy link

@nickray not sure if this is related, but some commands that used to work before are now raising an AttributeError:

$ solo key version
Traceback (most recent call last):
  File "/home/guru/rumenta/solo-python/venv/bin/solo", line 4, in <module>
    solo_cli()
  File "/home/guru/rumenta/solo-python/venv/lib64/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/guru/rumenta/solo-python/venv/lib64/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/guru/rumenta/solo-python/venv/lib64/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/guru/rumenta/solo-python/venv/lib64/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/guru/rumenta/solo-python/venv/lib64/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/guru/rumenta/solo-python/venv/lib64/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/guru/rumenta/solo-python/venv/lib64/python3.7/site-packages/solo/cli/key.py", line 409, in version
    res = solo.client.find(serial, udp=udp).solo_version()
  File "/home/guru/rumenta/solo-python/venv/lib64/python3.7/site-packages/solo/client.py", line 193, in solo_version
    return self.send_data_hid(0x61, b"")
  File "/home/guru/rumenta/solo-python/venv/lib64/python3.7/site-packages/solo/client.py", line 142, in send_data_hid
    return self.dev.call(cmd, data, event)
  File "/home/guru/rumenta/solo-python/venv/lib64/python3.7/site-packages/fido2/hid.py", line 88, in call
    while not event.is_set():
AttributeError: 'float' object has no attribute 'is_set'

@nickray
Copy link
Member

nickray commented Jan 15, 2020

Oh jeez, this is utterly annoying. Pulling in the fido2 breaking changes in 0.8 did in fact break things :/

New round, new luck, v0.0.23 is out.

@mporrato
Copy link

Tried a few operations with v0.0.23: looks fine now.

@nickray
Copy link
Member

nickray commented Jan 17, 2020

@patvdleer can you check and close if appropriate? Thanks.

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

4 participants