Open TARS-bot opened 7 months ago
see steps to reproduce in https://github.com/spesmilo/electrum/commit/e7ebf5d950dcff8dd08b7ec5b1b66b68012609d7
Other similar trace when client still exists but the device was already disconnected:
Traceback (most recent call last):
File "/home/user/wspace/electrum/electrum/gui/qt/wizard/wizard.py", line 203, in on_next_button_clicked
page.apply()
File "/home/user/wspace/electrum/electrum/gui/qt/wizard/wallet.py", line 1258, in apply
self.wizard_data['password'] = client.get_password_for_storage_encryption()
File "/home/user/wspace/electrum/electrum/plugin.py", line 406, in wrapper
return run_in_hwd_thread(partial(func, *args, **kwargs))
File "/home/user/wspace/electrum/electrum/plugin.py", line 399, in run_in_hwd_thread
return fut.result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 458, in result
return self.__get_result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
raise self._exception
File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/user/wspace/electrum/electrum/plugins/hw_wallet/plugin.py", line 260, in get_password_for_storage_encryption
xpub = self.get_xpub(derivation, "standard")
File "/home/user/wspace/electrum/electrum/plugin.py", line 406, in wrapper
return run_in_hwd_thread(partial(func, *args, **kwargs))
File "/home/user/wspace/electrum/electrum/plugin.py", line 396, in run_in_hwd_thread
return func()
File "/home/user/wspace/electrum/electrum/plugins/trezor/clientbase.py", line 142, in get_xpub
node = trezorlib.btc.get_public_node(self.client, address_n).node
File "/home/user/.local/lib/python3.10/site-packages/trezorlib/tools.py", line 267, in wrapped_f
ret = f(*args, **kwargs)
File "/home/user/.local/lib/python3.10/site-packages/trezorlib/btc.py", line 127, in get_public_node
return client.call(
File "/home/user/.local/lib/python3.10/site-packages/trezorlib/tools.py", line 288, in wrapped_f
client.open()
File "/home/user/.local/lib/python3.10/site-packages/trezorlib/client.py", line 130, in open
self.transport.begin_session()
File "/home/user/.local/lib/python3.10/site-packages/trezorlib/transport/bridge.py", line 159, in begin_session
data = self._call("acquire/" + self.device["path"])
File "/home/user/.local/lib/python3.10/site-packages/trezorlib/transport/bridge.py", line 143, in _call
return call_bridge(uri, data=data)
File "/home/user/.local/lib/python3.10/site-packages/trezorlib/transport/bridge.py", line 52, in call_bridge
raise BridgeException(path, r.status_code, r.json()["error"])
trezorlib.transport.bridge.BridgeException: trezord: acquire/1/null failed with code 400: device not found
@accumulator I am not quite sure how to do error-handling in apply()
. I guess one approach would be to have another wizard component that we enter if the user clicks "Next" with the encrypt_cb
checked...
My first thought is to (let) raise in apply()
, and try-except around page.apply()
in on_next_button_clicked()
(and probably a few other places), where we can set the error on the current wizard page, which shows the error text and should only allow prev
to be pressed.
Crash Report
This crash report was reported through the automatic crash reporting system 🤖
Traceback
Reporter
This issue was reported by 2 user(s):
Additional Information
The reporting user(s) did not provide additional information.