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

Bitbox fails to sign PSBT #706

Closed
dr-orlovsky opened this issue Sep 7, 2023 · 6 comments
Closed

Bitbox fails to sign PSBT #706

dr-orlovsky opened this issue Sep 7, 2023 · 6 comments

Comments

@dr-orlovsky
Copy link

Using new miniscript-supporting firmware https://github.com/digitalbitbox/bitbox-wallet-app/releases/tag/v4.39.0 bitbox fails to sign psbt (using command hwi signtx) and fails with following message:

Traceback (most recent call last):
  File "/home/orlovsky/repos/HWI/venv/bin/hwi", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/orlovsky/repos/HWI/venv/lib/python3.11/site-packages/hwilib/_cli.py", line 304, in main
    result = process_commands(sys.argv[1:])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/orlovsky/repos/HWI/venv/lib/python3.11/site-packages/hwilib/_cli.py", line 280, in process_commands
    client = find_device(args.password, args.device_type, args.fingerprint, args.expert, args.chain)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/orlovsky/repos/HWI/venv/lib/python3.11/site-packages/hwilib/commands.py", line 148, in find_device
    devices = enumerate(password)
              ^^^^^^^^^^^^^^^^^^^
  File "/home/orlovsky/repos/HWI/venv/lib/python3.11/site-packages/hwilib/commands.py", line 117, in enumerate
    result.extend(imported_dev.enumerate(password, expert, chain))
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/orlovsky/repos/HWI/venv/lib/python3.11/site-packages/hwilib/devices/bitbox02.py", line 183, in enumerate
    client = Bitbox02Client(path)
             ^^^^^^^^^^^^^^^^^^^^
  File "/home/orlovsky/repos/HWI/venv/lib/python3.11/site-packages/hwilib/devices/bitbox02.py", line 272, in __init__
    hid_device.open_path(path.encode())
  File "hid.pyx", line 157, in hid.device.open_path
OSError: open failed
@benma
Copy link
Contributor

benma commented Sep 7, 2023

This error means that the device is likely occupied by another connection. Close BitBoxApp and other things that could connect first.

By the way, miniscript policies will not work with HWI out of the box, as one has to send the miniscript policy to the BitBox02, which is not part of the PSBT and not part of the HWI API currently.

@prusnak
Copy link
Collaborator

prusnak commented Sep 7, 2023

udev rules installed?

@dr-orlovsky
Copy link
Author

udev rules installed?

yes, the rest of BitBox API through HWI works as expected

By the way, miniscript policies will not work with HWI out of the box, as one has to send the miniscript policy to the BitBox02, which is not part of the PSBT and not part of the HWI API currently.

Ok, I think this is the case why it is not working

@dr-orlovsky
Copy link
Author

Ok, I think this is the case why it is not working

But again, it is just a multisig, not timelocked, and on the previous version of firmware it was signing such PSBTs

@benma
Copy link
Contributor

benma commented Sep 7, 2023

The PSBT has nothing to do with your issue. The error message you posted shows that the connection to the BitBox02 could not be made. That is before any signing would happen.

This error means that the device is likely occupied by another connection. Close BitBoxApp and other things that could connect first.

Did you try that?

@dr-orlovsky
Copy link
Author

You are right. The device still doesn't sign - but it is unrelated to HWI. Some other process was using it. Closing here and open issue in BitBox: BitBoxSwiss/bitbox02-firmware#1125

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

3 participants