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 connecting to Sparrow #949

Closed
santochibtc opened this issue Jul 10, 2022 · 10 comments
Closed

Problem connecting to Sparrow #949

santochibtc opened this issue Jul 10, 2022 · 10 comments

Comments

@santochibtc
Copy link

Hi,
I can't connect the device with Sparrow Desktop on Windows 10. Nothing happens when I press the Scan button in the "connect hardware wallet" window. The device always shows "See the BitBoxApp". If I open the BitBox app, unlock the device with the PIN and close the app, then Sparrow shows "Error parsing JSON" after pressing the Scan button.

@benma
Copy link
Collaborator

benma commented Jul 10, 2022

Hi

Which version of the BitBox02 firmware and of Sparrow are you running?

We tried to reproduce the problem but it seems to work as expected.

@santochibtc
Copy link
Author

Sparrow 1.6.5 and BitBox02 firmware 9.12.0

@benma
Copy link
Collaborator

benma commented Jul 10, 2022

I am not so familiar with Sparrow. Maybe you can find some log files and see if they reveal anything.

Maybe you can ask the Sparrow developers, "Error parsing JSON" seems like it might be a bug in Sparrow.

@santochibtc
Copy link
Author

I found this issue with Trezor
sparrowwallet/sparrow#542
that led me to this one in the HWI library, but I am not sure if it is the same problem
bitcoin-core/HWI#613

@santochibtc
Copy link
Author

santochibtc commented Jul 10, 2022

I am trying to debug the enumerate function in the HWI library and it crashes in bitbox02.py while doing:
from bitbox02 import util
error:
Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:

  1. Downgrade the protobuf package to 3.20.x or lower.
  2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

But I think this is a problem with my Python setup and it is not related with the problem in Sparrow

@benma
Copy link
Collaborator

benma commented Jul 11, 2022

Thanks a lot for debugging. Upgrading protoc is actually on our radar. CC @Beerosagos

In the meantime you can downgrade your local installation of protobuf I think.

@santochibtc
Copy link
Author

I have downgraded protobuf to 3.20. Now the enumerate method returns a correct string with the device
[{"type": "bitbox02", "path":..."fingerprint": "XXXX"}]
I have removed jade from the list of devices, the method never ends otherwise.
I will see if I can now embed this HWI library in Sparrow

@zerotobtc
Copy link

I have a similar issue on Arch Linux. I get the same error when I try to create a new wallet in Sparrow from the bitbox02. The error log looks like this:
JSON: com.sparrowwallet.sparrow.io.ImportException: Error scanning, check devices are ready at com.sparrowwallet.sparrow@1.6.5/com.sparrowwallet.sparrow.io.Hwi.enumerate(Unknown Source) at com.sparrowwallet.sparrow@1.6.5/com.sparrowwallet.sparrow.io.Hwi$EnumerateService$1.call(Unknown Source) at com.sparrowwallet.sparrow@1.6.5/com.sparrowwallet.sparrow.io.Hwi$EnumerateService$1.call(Unknown Source) at javafx.graphics@18/javafx.concurrent.Task$TaskCallable.call(Unknown Source) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at javafx.graphics@18/javafx.concurrent.Service.lambda$executeTask$6(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at javafx.graphics@18/javafx.concurrent.Service.lambda$executeTask$7(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(UnknownSource)`

I was able to do that back in 2021, but I remember having trouble there too. Any suggestions?
Sparrow: 1.6.5

@benma
Copy link
Collaborator

benma commented Jul 22, 2022

@zerotobtc have you tried downgrading protobuf as described above?

pip3 install protobuf==3.20.

We are preparing a PR to HWI that fixes the protobuf incompatibility, but it may take a while until it trickles down to Sparrow.

Can you try hwi.py enumerate with HWI, which Sparrow uses? That will be easier to debug (assuming the issue is there and not in Sparrow itself).

@benma
Copy link
Collaborator

benma commented May 29, 2023

Closing due to inactivity. Please comment if the issue persists. Thanks.

@benma benma closed this as completed May 29, 2023
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