LedgerHQ / ledger-live

Mono-repository for packages related to Ledger Live and its JavaScript ecosystem.
MIT License
423 stars 319 forks source link

[Bug]: silent TransportWebHID failure for Ledger Stax and Flex #7611

Open DanielSinclair opened 1 month ago

DanielSinclair commented 1 month ago

Impacted Library name

@ledgerhq/hw-transport-webhid

Impacted Library version

6.29.2

Describe the bug

When attempting to connect a Stax or Flex device using the SDK, the transport will quietly fail at the transport creation step. User receives the HID request, but the SDK hangs after it is accepted.

Example usage:

let transport = await TransportWebHID.create();
const appEth = new AppEth(transport);
const result = await appEth.getAddress(
  getHDPathForVendorAndType(0, 'Ledger'),
  false,
  false,
);

Console includes the following log when the Chrome HID request appears:

Chooser dialog is not displaying a FIDO HID device: vendorId=11415, productId=28693, name='Ledger Flex', serial='0001'

Expected behavior

Successfully pair with Ledger device, or throw an error that the transport pairing has failed.

Additional context

A reference implementation for Rainbow Wallet is available here: https://github.com/rainbow-me/browser-extension/blob/cf5a7051818905bffa56f5c8ab5bef7040f76f53/src/entries/popup/handlers/wallet.ts#L443

Screenshot of the HID and accompanying logs:

Screenshot 2024-08-16 at 1 55 35 AM
DanielSinclair commented 1 month ago

cc @KVNLS in case you happen to be the codeowner for transport issues

github-actions[bot] commented 5 days ago

This issue is stale because it has been open 30 days with no activity. Remove stale label, comment, or consider closing it.