trezor / python-trezor

:snake: Don't use this repo, use the new monorepo instead:
https://github.com/trezor/trezor-firmware
GNU Lesser General Public License v3.0
201 stars 194 forks source link

wipe-device hangs after confirming on device #376

Closed torkelrogstad closed 5 years ago

torkelrogstad commented 5 years ago

I built the Trezor emulator on commit 2883f03583350249ef42a139141a9ee962e82a6a, which is the newest commit on release/2019-05 of trezor/trezor-firmware.

trezorctl version:

$ pip show trezor
Name: trezor
Version: 0.11.2
Summary: Python library for communicating with TREZOR Hardware Wallet
Home-page: https://github.com/trezor/python-trezor
Author: TREZOR
Author-email: info@trezor.io
License: LGPLv3
Location: /home/torkel/.local/lib/python3.6/site-packages
Requires: pyblake2, construct, setuptools, typing-extensions, click, libusb1, requests, ecdsa, mnemonic
$ trezorctl version
0.11.2

After doing trezorctl wipe-device and confirming it on the device trezorctl never return, until I do CTRL+C.

$ trezorctl wipe-device 
Wiping user data!
Please confirm action on your Trezor device
^C <-- before this CTRL-C I confirm on device
Aborted!

The actual Trezor ends up being wiped.

prusnak commented 5 years ago

OS?

matejcik commented 5 years ago

can't reproduce on Linux, but I have a vague memory that i've seen this before.

can you post output of trezorctl -v wipe-device ?

torkelrogstad commented 5 years ago

I tried again this morning, it now worked. Nothing should have changed, so don't know what's going on. Anyways, answering your questions for completeness sake:

@prusnak I'm on Ubuntu 18.10

@matejcik

[2019-05-15 14:13:28,850] trezorlib.transport.hid INFO: HID transport is disabled: No module named 'hid'
[2019-05-15 14:13:28,890] trezorlib.transport INFO: Enumerating WebUsbTransport: found 0 devices
[2019-05-15 14:13:28,894] trezorlib.transport INFO: Enumerating BridgeTransport: found 0 devices
[2019-05-15 14:13:28,895] trezorlib.transport INFO: Enumerating UdpTransport: found 1 devices
[2019-05-15 14:13:28,895] trezorlib.client INFO: creating client instance for device: udp:127.0.0.1:21324
[2019-05-15 14:13:28,895] trezorlib.transport.protocol DEBUG: sending message: Initialize
Initialize (0 bytes) {
}
[2019-05-15 14:13:28,901] trezorlib.transport.protocol DEBUG: received message: Features (90 bytes)
Wiping user data!
[2019-05-15 14:13:28,901] trezorlib.transport INFO: Enumerating WebUsbTransport: found 0 devices
[2019-05-15 14:13:28,903] trezorlib.transport INFO: Enumerating BridgeTransport: found 0 devices
[2019-05-15 14:13:28,910] trezorlib.transport INFO: Enumerating UdpTransport: found 1 devices
[2019-05-15 14:13:28,910] trezorlib.client INFO: creating client instance for device: udp:127.0.0.1:21324
[2019-05-15 14:13:28,910] trezorlib.transport.protocol DEBUG: sending message: Initialize
Initialize (0 bytes) {
}
[2019-05-15 14:13:28,916] trezorlib.transport.protocol DEBUG: received message: Features (90 bytes)
[2019-05-15 14:13:28,917] trezorlib.transport.protocol DEBUG: sending message: WipeDevice
WipeDevice (0 bytes) {
}
[2019-05-15 14:13:29,209] trezorlib.transport.protocol DEBUG: received message: ButtonRequest
ButtonRequest (2 bytes) {
    code: 6,
}
[2019-05-15 14:13:29,210] trezorlib.transport.protocol DEBUG: sending message: ButtonAck
ButtonAck (0 bytes) {
}
Please confirm action on your Trezor device
[2019-05-15 14:13:33,809] trezorlib.transport.protocol DEBUG: received message: Success
Success (14 bytes) {
    message: 'Device wiped',
}
[2019-05-15 14:13:33,809] trezorlib.transport.protocol DEBUG: sending message: Initialize
Initialize (0 bytes) {
}
[2019-05-15 14:13:33,820] trezorlib.transport.protocol DEBUG: received message: Features (90 bytes)
Device wiped