trezor / trezord-go

:smiling_imp: Trezor Communication Daemon (written in Go)
GNU Lesser General Public License v3.0
245 stars 146 forks source link

Trezor One Qubes 4.0 Error: device not found #163

Closed Kixunil closed 4 years ago

Kixunil commented 5 years ago

Problems:

Trezor: One, firmware initialized, wallet not initialized

Environment: Qubes 4.0 Debian 9 - based dispvm with Firefox 60.6.ESR, the Trezor-QubesOS tutorial intentionally not used to protect my privacy (hence dispvm).

I also didn't bother to install the Bridge to the base vm, because I wanted to try it out first. As far as my understand it shouldn't matter at all, but I mention it to be sure.

Replication steps

Output from JS console:

[CoinInfo] Wait for coin info...
app.19660e8c68ddf7e115c8.js:8:24201
[app] User agent :  Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0
app.19660e8c68ddf7e115c8.js:46:335816
[app] build:  stable
app.19660e8c68ddf7e115c8.js:46:335816
[CoinInfo] Done reading coin; BTC
app.19660e8c68ddf7e115c8.js:46:335816
[CoinInfo] Current backend URL : https://btc1.trezor.io
app.19660e8c68ddf7e115c8.js:46:335816
[trezor.js] [device list] Initializing transports
app.19660e8c68ddf7e115c8.js:46:335816
[trezor.js] [device list] Configuring transports
app.19660e8c68ddf7e115c8.js:46:335816
[trezor.js] [device list] Configuring transports done
app.19660e8c68ddf7e115c8.js:46:335816
[trezor.js] [device list] Creating Device 
Object { path: "4", session: null, debugSession: null, product: 1, vendor: 21324, debug: false }
 undefined
app.19660e8c68ddf7e115c8.js:46:335816
[deviceList] Catched error, printing stack
app.19660e8c68ddf7e115c8.js:46:335816
Error: device not found
Stack trace:
e/<@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:66:210594
w@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:66:35481
b/o._invoke</<@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:66:35271
S/</e[t]@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:66:35657
r@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:66:210795
r/<@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:66:210893
a@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:46:410066
D/<@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:46:410211
c@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:32:37251
app.19660e8c68ddf7e115c8.js:46:335816
e/<@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:66:210594
w@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:66:35481
b/o._invoke</<@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:66:35271
S/</e[t]@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:66:35657
r@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:66:210795
r/<@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:66:210893
a@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:46:410066
D/<@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:46:410211
c@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:32:37251
app.19660e8c68ddf7e115c8.js:46:335816
[trezor.js] [device list] Cannot create device 
Error: device not found
Stack trace:
e/<@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:66:210594
w@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:66:35481
b/o._invoke</<@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:66:35271
S/</e[t]@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:66:35657
r@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:66:210795
r/<@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:66:210893
a@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:46:410066
D/<@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:46:410211
c@https://wallet.trezor.io/app.19660e8c68ddf7e115c8.js:32:37251

Trezord output:

2019/05/06 18:04:52 trezord is starting.
POST /
127.0.0.1 - - [06/May/2019:18:04:58 +0200] "POST / HTTP/1.1" 200 21
POST /enumerate
127.0.0.1 - - [06/May/2019:18:04:58 +0200] "POST /enumerate HTTP/1.1" 200 3
POST /listen
127.0.0.1 - - [06/May/2019:18:04:59 +0200] "POST /listen HTTP/1.1" 200 91
POST /listen
POST /acquire/1/null
127.0.0.1 - - [06/May/2019:18:05:06 +0200] "POST /acquire/1/null HTTP/1.1" 400 29
127.0.0.1 - - [06/May/2019:18:05:06 +0200] "POST /listen HTTP/1.1" 200 3
POST /listen

dmesg output

[ 7803.453088] vhci_hcd: vhci_device speed not set
[ 7803.655077] vhci_hcd: vhci_device speed not set
[ 7803.863051] vhci_hcd: vhci_device speed not set
[ 7804.071073] vhci_hcd: vhci_device speed not set
[ 7804.279057] vhci_hcd: vhci_device speed not set
[ 7804.279092] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[ 7804.279123] usb usb1-port1: unable to enumerate USB device

However, USB cable is certainly OK as I used the same Trezor with same cable recently on another computer. I also tried completely different USB cable.

Other things I tried: reconnecting, reattaching the device several times using different combinations, restarting trezord, making sure the system is upgraded and has libusb installed, closing thunar, which obviously attempted to mess with USB device, running trezord as root (using sudo).

prusnak commented 5 years ago

Please follow the guide here: https://wiki.trezor.io/Qubes_OS

Kixunil commented 5 years ago

Thanks, I tried to see if the problem is in the hardware and it works. However, I'd like to protect my privacy from sys-usb which I consider less secure. Is there any way to bypass it?

prusnak commented 5 years ago

What exactly is the privacy problem with sys-usb here?

Kixunil commented 5 years ago

If it's compromised, it can spy on the communication.

prusnak commented 4 years ago

Not sure what we can do here.