No wallets found and KMD server dies

Hi,

I can no longer access the wallet on my Ledger Nano S when trying to sign the transaction for the node key registration. This used to work but after upgrading to Mac OS Sequoia 15.2 and upgrading to node version 3298987868160 the command fails:

No wallets found. You can create a wallet with ‘goal wallet new’

The KMD log below which confirms there is a problem of some sorts:

*… level=warning msg=“enumerated but failed to open ledger 5000: hidapi: failed to open device” file=ledger.go function="github.com/algorand/go-algorand/daemon/kmd/wallet/driver.(LedgerWalletDriver).scanWalletsLocked" line=142
*… level=info msg=“killing kmd after timeout” file=server.go function="github.com/algorand/go-algorand/daemon/kmd/server.(WalletServer).makeWatchdogCallback.func2" line=174
*… level=info msg=“kmd wallet HTTP server stopped with: http: Server closed” file=server.go function="github.com/algorand/go-algorand/daemon/kmd/server.(WalletServer).start.func2" line=278
… level=info msg=“kmd server died. exiting…” file=main.go function=main.runKmd line=122

I can access the wallet in Ledger Live and in Lute using the Nano S, it is only the node commands that fail.

The Nano S USB connection is visible to the Mac OS Terminal using:

ioreg -p IOUSB

Any idea what could be the problem?

Many thanks!

Edit: Tried all troubleshooting steps from the Ledger website, but not success. I found a further log statement from the kmd.log which indicates that it can find the USB Ledger device, but for some reason not able to get the wallet id:

level=warning msg="enumerated but failed to open ledger IOService:/AppleARMPE/arm-io@10F00000/AppleH16GFamilyIO/usb-drd2@12280000/AppleT8132USBXHCI@02000000/usb-drd2-port-hs@02100000/USB2 Hub@02100000/AppleUSB20InternalHub@02100000/AppleUSB20HubPort@02110000/Nano S Plus@02110000/Nano S Plus@0/AppleUserUSBHostHIDDevice 5011: hidapi: failed to open device" file=ledger.go function="github.com/algorand/go-algorand/daemon/kmd/wallet/driver.(*LedgerWalletDriver).scanWalletsLocked" line=142

1 Like

I had a similar issue under WSL2, with a Ledger Nano S.

time="2024-11-17T22:45:17.454462 +0100" level=warning msg="enumerated but failed to open ledger 0001:0002:00 4015: hidapi: failed to open device" file=ledger.go function="github.com/algorand/go-algorand/daemon/kmd/wallet/driver.(*LedgerWalletDriver).scanWalletsLocked" line=142

With the help of ChatGPT4, I modified the udev rules, and after that modification the Ledger Nano S worked.

Original udev rules can be fould here:

The problem was connected with the issue, that Kmd is not using the Vendor ID and Product ID to open the device, but using “0001:0002:00 4015”, where
0001 is the bus id,
0002 is the device id,
00 is the interface id,
4015 is the product id

In root mode, the Ledger device was seen. So chatgpt suggested to append the following line to the udev rules, to change the hidraw* device protection, like this:

KERNEL=="hidraw*", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="4015", MODE="0666"

It helped in my case. But as I see, you have a Mac (I envy you!), so maybe in your case this solution will not work. OK: edit: this solution will SURELY not work. But anyway, try to run original Ledger udev rules first, and let’s see that anything changes or not.

Thanks for the info. I will look into that.

It definitely seems like compatibility broke after the last stable node release and/or the Ledger firmware upgrade.

Given that Ledger Live can access the Nano without an issue and that the Mac OS Terminal can see the Nano connected to USB, it must be down to node and/or Ledger software.