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

goal wallet list hangs when Ledger Nano S is plugged in #2665

Closed
nullun opened this issue Jul 30, 2021 · 5 comments
Closed

goal wallet list hangs when Ledger Nano S is plugged in #2665

nullun opened this issue Jul 30, 2021 · 5 comments

Comments

@nullun
Copy link
Contributor

nullun commented Jul 30, 2021

goal wallet list hangs when Ledger Nano S is plugged in

I went to sign a transaction with my Ledger Nano S for the first time in about 3 months (participation key renewal), and the command goal wallet list would hang indefinitely when the ledger was plugged in and on the Algorand app. However as soon as I quit the Algorand app on the Ledger the process would resume and the ledger wallet would be listed.

Since my earlier use, the device had been updated to 2.0.0, and I had followed the guide to update the udev rules for Linux users. I had also confirmed that I could use my ledger with Ledger Live and MyAlgo without issue. It appears that I'm only unable to use goal to see the ledger device.

Through various tests and debugging I discovered that goal was hanging during a particular function within the code. ListKeys in the file daemon/kmd/wallet/driver/ledger.go. So I ended up commenting out (pictured below) the call within the scanWalletsLocked() function in an attempt to at least see the device when listing wallets. This build allowed me to run goal wallet list where I would then see 2 ledger devices (I swear I only have one). Next I ran goal account list -w ... with each ledger wallet listed before. One would return my account on the devices, and the other device would result in the program hanging again.

image

Ultimately I was able to sign the transaction, so the ledger is connected and works, but for whatever reason goal appears to see two devices, one of which isn't returns the keys?

Here's a brief output of what I see now I've commented out the code.

$ goal wallet list
##################################################
Wallet: Ledger-Nano-S-0001-dccc77e86921c6ce449d88f06e26f38f
ID: dccc77e86921c6ce449d88f06e26f38f
##################################################
Wallet: Ledger-Nano-S-0001-e69eff07ca2fa542def1d0824de68018
ID: e69eff07ca2fa542def1d0824de68018
##################################################

$ goal account list -w Ledger-Nano-S-0001-dccc77e86921c6ce449d88f06e26f38f
[online]    MY_ADDRESS_HERE MY_ADDRESS_HERE 1234567890 microAlgos

$ goal account list -w Ledger-Nano-S-0001-e69eff07ca2fa542def1d0824de68018
# Note: It hangs here until I quit the Algorand app in the ledger, at which point the below error is returned.
Error processing command: hidapi: unknown failure

Your environment

8590574496
2.8.115616.dev [master] (commit #916154b5+)
go-algorand is licensed with AGPLv3.0
source code available at https://github.com/algorand/go-algorand

Last committed block: 15316695
Time since last block: 1.6s
Sync Time: 0.0s
Last consensus protocol: https://github.com/algorandfoundation/specs/tree/65b4ab3266c52c56a0fa7d591754887d68faad0a
Next consensus protocol: https://github.com/algorandfoundation/specs/tree/65b4ab3266c52c56a0fa7d591754887d68faad0a
Round for next consensus protocol: 15316696
Next consensus protocol supported: true
Last Catchpoint:
Genesis ID: mainnet-v1.0
Genesis hash: wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=

Linux Mint 20.2 Uma

Steps to reproduce

  1. Plug in Ledger Nano S, enter pin, open Algorand app.
  2. Type goal wallet list
  3. goal hangs until the ledger is unplugged or you quit the Algorand app.

Expected behaviour

goal should output a list of local wallets and the ledger wallet.

Actual behaviour

goal hangs. However commenting out a certain part of the code allows me to list the device then find the wallet.

@cccassidy
Copy link

cccassidy commented Aug 13, 2021

I have the same issue here with the following environment:

  • Ubuntu 20.04
  • Ledger Nano S w/ app version 1.2.15
  • goal 2.9.1.stable

Further update/details:

  • Mine will eventually timeout after a minute or 2 with the following error:
    Couldn't list wallets: Get "http://127.0.0.1:7833/v1/wallets": EOF
  • However if I unplug or exit the app while it's waiting it will return right away.
  • Also confirmed it works fine with Ledger Live

Update 2:

  • When I commented out the lines you mentioned I also get the double listing for the Nano S

@bylun
Copy link

bylun commented Sep 4, 2021

how to modify kmd default configuration for IP and port?

@nullun
Copy link
Contributor Author

nullun commented Sep 4, 2021

how to modify kmd default configuration for IP and port?

I couldn't find a way of changing these from a quick look at the developer portal. It may be worth starting a new post for this.

As an update, my original issue has been fixed as of PR #2822, although it's not yet released so will keep the issue open until then. @cccassidy would you mind seeing if it works for you too?

@cccassidy
Copy link

@nullun Did a fresh build here and working now as well!

@onetechnical
Copy link
Contributor

This should be fixed in the next release.

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

No branches or pull requests

6 participants