trezor / trezord-go

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

"Please remove TREZOR" when installing trezor-bridge-2.0.25-win32-install #151

Closed btmask closed 5 years ago

btmask commented 5 years ago

"Please remove TREZOR" when installing trezor-bridge-2.0.25-win32-install tried re-downloading the executable twice, restarting several times, reinitiating the install without opening the browser, and obviously with and without the device connected.

image

prusnak commented 5 years ago

Contact our support: https://trezor.io/troubleshooter/

karelbilek commented 5 years ago

For someone looking for it - It happens here (NSIS is a really terrible language so it takes a while getting used to ("lovely coding experience with elements of PHP and assembly" from the NSIS documentation))

https://github.com/trezor/trezord-go/blob/73e8e8fcdb73eeeeb2fa29c5e2113fd0a563b37b/release/windows/trezord.nsis#L125-L129

and the function in our devcon.exe clone is here (and forward)

https://github.com/trezor/trezord-go/blob/73e8e8fcdb73eeeeb2fa29c5e2113fd0a563b37b/release/windows/devcon/cmds.cpp#L378

And here is the logic https://github.com/trezor/trezord-go/blob/abf713c5bafbec731fd27bd2e5a2817f0b9d7803/release/windows/devcon/devcon.cpp#L830

https://github.com/trezor/trezord-go/blob/abf713c5bafbec731fd27bd2e5a2817f0b9d7803/release/windows/devcon/devcon.cpp#L1004

It's necessary to disconnect devices, so we can later remove the badly installed drivers (We cannot use for example libusb here, since that operates on higher abstraction layer and won't display badly installed devices without drivers.)...,

https://github.com/trezor/trezord-go/blob/73e8e8fcdb73eeeeb2fa29c5e2113fd0a563b37b/release/windows/trezord.nsis#L157

...and so we can install them correctly with libwdi.

https://github.com/trezor/trezord-go/blob/73e8e8fcdb73eeeeb2fa29c5e2113fd0a563b37b/release/windows/trezord.nsis#L169

I don't know why it detects that Trezor is still connected, it shouldn't. Unfortunately there are no bridge logs when Bridge is not yet installed :(

DZFLUX commented 4 years ago

It's a really bad first experience to have the bridge install fail to install with "Please disconnect Trezor" and fail to install when there isn't a trezor connected to the computer.

minderfolden commented 3 years ago

I'm having this issue and not understanding where the solution is explained in the discussion here. What can/should I do about it?