-
-
Notifications
You must be signed in to change notification settings - Fork 629
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
PIN/Passphrase input for trezorctl doesn't work in some environments #1737
Comments
This seems to be an issue either with the click library, or with Python itself. possibly related: #1682 please try manually upgrading click: |
The issue is actually a bug in Python's (Weirdly enough, Git Bash is using MinTTY which is not actually a real terminal. It can be fixed by enabling I suppose we could explicitly detect the condition and fall back to reading non-hidden input. I'm also wondering if we should do something more advanced, e.g., like HWI does, for separating PIN entry and subsequent actions, for usage in scripts. |
@vietnamese-chowder please have a look at the new |
Describe the bug
I'm trying to run
trezorctl
to sign a Qtum transaction built in Java alongside a Trezor device, by creating a process through ProcessBuilder that runs the commandtrezorctl sign-tx <name_of_file>.json
. After running it, I'm feeding it the PIN (corresponding to the layout) that I acquire from the user on the frontend.I am inputting the PIN to the process using a
BufferedWriter(OutputStreamWriter(proc.getOutputStream()))
by callingwrite(pin)
, thennewLine()
, thenflush()
. Everything works on Linux and on Mac when running the program through Intellij, but when I build the jar file and run that, it doesn't.trezorctl
doesn't receive the input and my program hangs at the nextstdInput.next()
. On Windows this behaviour also occurs on Intellij, and on Git Bash.When I run
trezorctl
on the command line on Windows, it works on cmd, but not on Git Bash, exhibiting the same behaviour. I've also tried running my program with sudo, so I don't think it's a permission issue. I'm pretty sure this is an issue with trezorctl's IO and not my application, because I tested the exact same method on a dummy Python script I wrote and it worked, even on Windows.Firmware version and revision
1.10.2
Desktop/smartphone setup (please complete the following information):
To Reproduce
Steps to reproduce the behavior:
trezorctl get-address -n "m/49'/0'/0'/0/0"
Expected behavior
The mask doesn't work, so you'll see what you're typing, and pressing enter does nothing.
Screenshots
The text was updated successfully, but these errors were encountered: