Command line client cannot access Ledger device on MacOS Sonoma

129 Views Asked by At

I'm going nuts trying to access my Ledger Nano X from Terminal in MacOS (Sonoma 14.2.1, M2 chip). On my older machine (Ventura 13.2.1, Intel chip) everything works fine. On both machines accessing Ledger Live works, as it should. But I need command line interface access (COSMOS SDK based blockchains). This is the error I get:

Error: failed to generate ledger key: failed to retrieve device: ledger nano S: hidapi: failed to open device

And on my multipass VM (Ubuntu 22.04.3 LTS) this is, what I get:

Error: failed to generate ledger key: failed to retrieve device: ledger nano S: LedgerHID device (idx 0) not found. Ledger LOCKED OR Other Program/Web Browser may have control of device.

I followed this path for quite some time now, read a lot about HID issues, granted full full disk access and input monitoring allowance to Terminal in the system preferences, like suggested by the official Ledger support on their website and by other people having problems with some HID devices on MacOS. I even brew installed hidapi.

hidtest tool (which came with the brew package) tells me, that my Ledger is detected:

  Report Descriptor: (34 bytes)
0x06, 0x00, 0xff, 0x09, 0x0b, 0xa1, 0x01, 0x06, 0x00, 0xff, 
0x09, 0x0b, 0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x96, 
0x04, 0x00, 0x85, 0xe0, 0x81, 0x22, 0x76, 0x00, 0x40, 0x95, 
0x02, 0xb1, 0x01, 0xc0, 
Device Found
  type: 2c97 4011
  path: DevSrvsID:4294971231
  serial_number: 0001
  Manufacturer: Ledger
  Product:      Nano X
  Release:      201
  Interface:    0
  Usage (page): 0x1 (0xffa0)
  Bus type: 1 (USB)

After all ... nothing helped. So maybe someone here also had this specific problem and solved it? Grateful for every hint!

Regards, Kurt

1

There are 1 best solutions below

0
On

We've seen this issue happen and we fixed it by building a binary ourselves and replacing the cosmos-ledger-go dependency with an older version.

Try including this in the go.mod file wherever you're building the binary:

replace github.com/cosmos/ledger-cosmos-go => github.com/cosmos/ledger-cosmos-go v0.12.4