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

trezor v0.13.9 breaks the plugin #9116

Open
PiRK opened this issue Jul 2, 2024 · 3 comments
Open

trezor v0.13.9 breaks the plugin #9116

PiRK opened this issue Jul 2, 2024 · 3 comments

Comments

@PiRK
Copy link

PiRK commented Jul 2, 2024

Just a heads up that trezor v0.13.9 breaks the plugin for Electrum ABC, and I would guess Electrum is affected too.

Here is where I expect it to fail (import RecoveryDeviceType )
https://github.com/spesmilo/electrum/blob/master/electrum/plugins/trezor/trezor.py#L32

  File "/work/electrum/electrumabc_plugins/trezor/trezor.py", line 28, in <module>
[Step 1/1]     from trezorlib.messages import (
[Step 1/1] ImportError: cannot import name 'RecoveryDeviceType' from 'trezorlib.messages' (/usr/local/lib/python3.9/dist-packages/trezorlib/messages.py)
[Step 1/1] .....................................................................................................................s...................
[Step 1/1] ...s........................[trezor] Library version for 'trezor' is incompatible.
[08:14:38]
[Step 1/1] Installed: 0.13.9, Needed: 0.13.8 <= x < 0.14
[08:14:38]
[Step 1/1] ...................................................................................................................s.........sss.............................s.s...[dummy name] Library version for 'dummy name' is incompatible.
[Step 1/1] Installed: 0.13.9, Needed: 0.13.8 <= x < 0.14
[Step 1/1] ======================================================================
[Step 1/1] ERROR: test_electrum_tx_to_txtype (electrumabc_plugins.trezor.tests.test_trezor.TestTrezorPlugin)
[Step 1/1] ----------------------------------------------------------------------
[Step 1/1] Traceback (most recent call last):
[Step 1/1]   File "/work/electrum/electrumabc_plugins/trezor/tests/test_trezor.py", line 53, in test_electrum_tx_to_txtype
[Step 1/1]     self.assertEqual(plugin.electrum_tx_to_txtype(tx, xpub_path), expected_txtype)
[Step 1/1]   File "/work/electrum/electrumabc_plugins/trezor/trezor.py", line 597, in electrum_tx_to_txtype
[Step 1/1]     t = TransactionType()
[Step 1/1] NameError: name 'TransactionType' is not defined
[Step 1/1] ----------------------------------------------------------------------
[Step 1/1] Ran 330 tests in 110.698s
[Step 1/1] FAILED (errors=1, skipped=8)
@PiRK
Copy link
Author

PiRK commented Jul 2, 2024

The breaking change: trezor/trezor-firmware@792c719

The potential fix: https://reviews.bitcoinabc.org/D16406

Note that I only tested basic features such as signing a transaction with a Ledger device. I didn't try the recovery feature.

@accumulator
Copy link
Member

@PiRK thanks

@hMsats
Copy link

hMsats commented Jul 5, 2024

Can confirm for Electrum with the Trezor after upgrading to Ubuntu 23.10.
Couldn't get it to work and kept getting this message from Electrum (4.5.5) when it was trying to connect to my Trezor:

  6.10 | W | plugins.jade.jadepy.jade | No module named 'electrum.plugins.jade.jadepy.jade_ble'
  6.10 | W | plugins.jade.jadepy.jade | BLE scanning/connectivity will not be available
  6.18 | E | plugins.trezor.trezor | error importing trezor plugin deps
Traceback (most recent call last):
  File "/home/user/Electrum-4.5.5/electrum/plugins/trezor/trezor.py", line 29, in <module>
    from .clientbase import TrezorClientBase
  File "/home/user/Electrum-4.5.5/electrum/plugins/trezor/clientbase.py", line 15, in <module>
    from trezorlib.messages import WordRequestType, FailureType, RecoveryDeviceType, ButtonRequestType
ImportError: cannot import name 'RecoveryDeviceType' from 'trezorlib.messages' (/usr/local/lib/python3.11/dist-packages/trezorlib/messages.py)
  6.19 | W | plugins.trezor.qt.Plugin | Library version for 'trezor' is incompatible.
Installed: 0.13.9, Needed: 0.13.0 <= x < 0.14
  6.19 | W | gui.qt.wizard.wallet.WCChooseHWDevice | error getting device infos for trezor: Library version for 'trezor' is incompatible. // Installed: 0.13.9, Needed: 0.13.0 <= x < 0.14 // Make sure you install it with python3

I just tried Trezor version 0.13.0 and everything worked again:

pip3 install trezor==0.13.0 or in my case on Ubuntu 13.10 pip3 install trezor==0.13.0 --break-system-packages

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

No branches or pull requests

3 participants