Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read error connecting to Ledger Nano X #2438

Open
dkaparis opened this issue May 6, 2022 · 2 comments
Open

Read error connecting to Ledger Nano X #2438

dkaparis opened this issue May 6, 2022 · 2 comments

Comments

@dkaparis
Copy link

dkaparis commented May 6, 2022

Using current release 4.2.7 on Arch Linux.

Attempting to connect to Ledger Nano X device when opening a hardware wallet file gives a popup error message: read error.

The following traceback is output on terminal:

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/electroncash_plugins/hw_wallet/qt.py", line 225, in run
    result = task.task()
  File "/usr/lib/python3.10/site-packages/electroncash_plugins/ledger/ledger.py", line 633, in get_client
    client = devmgr.client_for_keystore(self, handler, keystore, force_pair)
  File "/usr/lib/python3.10/site-packages/electroncash/plugins.py", line 868, in client_for_keystore
    client = self.force_pair_xpub(plugin, handler, info, xpub, derivation, devices)
  File "/usr/lib/python3.10/site-packages/electroncash/plugins.py", line 898, in force_pair_xpub
    client_xpub = client.get_xpub(derivation, xtype)
  File "/usr/lib/python3.10/site-packages/electroncash_plugins/ledger/ledger.py", line 47, in catch_exception
    return func(self, *args, **kwargs)
  File "/usr/lib/python3.10/site-packages/electroncash_plugins/ledger/ledger.py", line 100, in get_xpub
    self.checkDevice()
  File "/usr/lib/python3.10/site-packages/electroncash_plugins/ledger/ledger.py", line 218, in checkDevice
    self.perform_hw1_preflight()
  File "/usr/lib/python3.10/site-packages/electroncash_plugins/ledger/ledger.py", line 167, in perform_hw1_preflight
    firmwareInfo = self.dongleObject.getFirmwareVersion()
  File "/usr/lib/python3.10/site-packages/btchip/btchip.py", line 563, in getFirmwareVersion
    response = self.dongle.exchange(bytearray(apdu))
  File "/usr/lib/python3.10/site-packages/btchip/btchipComm.py", line 90, in exchange
    result = self.waitImpl.waitFirstResponse(timeout)
  File "/usr/lib/python3.10/site-packages/btchip/btchipComm.py", line 134, in waitFirstResponse
    data = self.device.read(65)
  File "hidraw.pyx", line 219, in hid.device.read
OSError: read error

System is up-to-date, with python-btchip 0.1.32-2 and ledger-udev 1-7 installed.

Ledger Nano X firmware version is 2.0.2.

The issue could be related to a recent Ledger firmware update, since this same device and system were working properly previously.

@cculianu
Copy link
Collaborator

cculianu commented May 7, 2022

Yes, there is a known issue with the Ledger Nano X with the latest firmware. Electrum-ABC is also experiencing this. The bug is in the python-btchip library, sadly, so we need them to fix it. LedgerHQ/btchip-python#52

Is a firmware downgrade possible?

@cculianu cculianu pinned this issue May 7, 2022
@dkaparis
Copy link
Author

dkaparis commented Jun 1, 2022

There seems to be some development on Ledger apps addressing this: LedgerHQ/app-bitcoin-new#36.

After updating the Bitcoin and Bitcoin Cash apps on ledger to newly released version 2.0.5, the wallet can now connect to ledger and sign transactions without error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants