I’m having trouble connecting my Ledger Nano S with the Algorand SDK on Linux, after issuing goal wallet list, the terminal just waits for a long time and times out with the message Couldn't list wallets: Get "http://127.0.0.1:7833/v1/wallets": EOF (if I issue the command without the ledger connected on the USB, I immediately get a feedback No wallets found. You can create a wallet with goal wallet new so I guess that’s not an issue with the SDK).
I’m using the latest app version on my Ledger and my node is updated (and fully synced). I’m not sure if this is an issue with the Algorand’s app on Ledger or my computer. Will try to install a fresh Ubuntu on another machine tomorrow and try again.
Is anyone else having this same issue? Is there another way I can sign a transaction to turn my wallet online outside of the SDK?
Still no luck… I’ve also tried on a fresh Ubuntu install like I planed to, but the issue persists. If I type goal wallet list without the ledger connected I immediately get the newly created wallet, but if I try with the Ledger connected, the Couldn't list wallets: Get "http://127.0.0.1:7833/v1/wallets": EOF error is back and no wallets are listed (not even my new non-ledger account)…
I’ve tried both running as algorand and changing the ownership of /var/lib/algorand to erich and neither did the trick. I’m not sure if the user algorand has access to libusb, how can I check that? Shouldn’t it have this access by default?
Edit: I’ve tried sudo goal wallet list and the issue persists the same. (I know it’s not recommended to use sudo, but since this was just a display command I don’t think any files were manipulated to mess up its permissions).
I would try to do it from a fresh data folder.
It looks like something got messed up at some point, as you should have a kmd-v0.5 subfolder.
Just create ~/node/data and copy genesis.json.
Then set ALGORAND_DATA=$HOME/node/data. And use that.
If you can’t connect to the Ledger, you should see a log $ALGORAND_DATA/kmd-v0.5/kmd.log.
Can you also check your algod version? goal version -v?
Ok, I had some progress. Changing to a new directory allowed the creation of the /kmd-v0.5 directory. Still cant connect to the ledger tho. The content of $ALGORAND_DATA/kmd-v0.5/kmd.log is as follows:
As you can see I’ve cleaned the logs before each run to clean it up
And here’s the output of goal version -v:
Thank you for your help
Edit: The second log is the most consistent one, regarding the timeout. The first one I think was caused because my ledger was openend for a while. It wasn’t locked, but sometimes even if the app is open I get the output No wallets found. You can create a wallet with goal wallet new, closing the app and opening it back puts me in the timeout issue again
Tried all the steps except the last one (since I’m not on arch linux I don think that one applies). Still no luck but some progress: if I issue the command goal wallet list the terminal keeps hanging like it used to do until it times out, but if I remove the ledger from the USB port before the timeout, the wallet gets listed in the output:
So I guess for some reason the node can see that there’s a wallet but can’t access it in some way? ~/node/data/kmd-v0.5/kmd.log is empty without any errors…
Managed to nail down the issue to this specific log:
time="2021-06-05T14:16:55.275880 -0300" level=warning msg="enumerated but failed to open ledger 0003:0031:00 1011: hidapi: failed to open device" file=ledger.go function="github.com/algorand/go-algorand/daemon/kmd/wallet/driver.(*LedgerWalletDriver).scanWalletsLocked" line=131
Well… I give up trying to make this work for now, something seems to be broken and I can’t figure out what. The device works fine on ledger live, metamask and other websites that connect with the Nano S. Guess I’ll just wait for a few updates and try again later on.
First link wasn’t very helpful since I can’t even list the device using goal wallet list.
Regarding MyAlgo, I’m already familiar with the tool, but can it sign a transaction created outside of it?
Not now, but the next major version will be able to do it.
Quoting Alex99y from Discord: Next major version we will allow to sign Algorand encoded transactions.