Skip to content

Flakiness connecting to Ledger on Mac OS due to multiple HID devices #111

@ian-eulith

Description

@ian-eulith

We have observed a lot of flakiness with connecting to the Ledger on Mac OS, specifically in this code from the ledgereth library which bottoms out here in ledgerblue.

We found that when the Ethereum app is opened on the Ledger device, another HID entry shows up on the Mac. It is identical to the original HID entry except that usage_page is 61904 instead of 65440. The order of hid.enumerate() is not deterministic, so sometimes you get the original, good device, and sometimes you get the second, bad device. Hence the flakiness.

I'm not knowledgeable about the HID spec but I was wondering if changing the or condition in this line to an and condition would be appropriate. It would fix our problem at least because it would enforce that the device has a usage page of 65440, which would exclude the second, bad device.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions