unit-e icon indicating copy to clipboard operation
unit-e copied to clipboard

Signing transactions on a Ledger Nano fails on a Mac sometimes

Open cmihai opened this issue 6 years ago • 0 comments

Describe the bug While testing the feature on Mac OS, it seems that the USB device communication randomly fails about 50% of the time. The response packets we receive are malformed: instead of 00 01 00 01 05 00 00... we get 00 01 00 01 05 00 bf 00 01 04.

To Reproduce Steps to reproduce the behavior:

  1. Comment out the lines in usbdevice::ListDevices which return a mock device on regtest.
  2. Build Unit-e on a Mac, passing --enable-usbdevice in the configuration.
  3. Connect the Ledger Nano S, unlock it and launch the Unit-e app on it.
  4. Run test/functional/wallet_hwsign.py and watch it fail.

Expected behavior The user should be prompted to sign two transactions on the device.

Environment

  • OS: Mac OS
  • UnitE version: compiled from the ledger branch.

Additional context It looks like, when we're enumerating interfaces for the device, they're returned in a random order, so we sometimes query the wrong one and get wrong results in return.

cmihai avatar Feb 07 '19 10:02 cmihai