Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

CLI --unlock does not work #1798

Closed
sammy007 opened this issue Aug 2, 2016 · 11 comments
Closed

CLI --unlock does not work #1798

sammy007 opened this issue Aug 2, 2016 · 11 comments
Assignees
Labels
F2-bug 🐞 The client fails to follow expected behavior.
Milestone

Comments

@sammy007
Copy link

sammy007 commented Aug 2, 2016

parity --unlock "0x123..." --password /path/to/pass.txt

I execute eth_sendTransaction via JSON RPC:

Your account is locked. Unlock the account via CLI, personal_unlockAccount or use Trusted Signer

And of course I use correct address as rpc param.

If I replace it with personal_signAndSendTransaction it works for me, but this op is pretty expensive I guess if you send a lot of continuous payments.

paritymaster.

On 1.2.3 I can't even launch it due to various errors:

ERROR: No password given to unlock account 123...456. Pass the password using `--password`.
ERROR: ~/pass.txt Unable to read password file. Ensure it exists and permissions are correct.

Depends on how I specify path. OSX.

@keorn keorn added the F2-bug 🐞 The client fails to follow expected behavior. label Aug 2, 2016
@tomusdrw tomusdrw self-assigned this Aug 2, 2016
@tomusdrw
Copy link
Collaborator

tomusdrw commented Aug 2, 2016

Thanks for reporting!
Latest master will be fixed with #1802.

But I believe 1.2.3 should work fine, the error you get might indicate that no valid password for this account has been found in file you provided. Can you double check if the password is correct (make sure it uses one password per line and that there is a trailing new line after last password).

Second error will be displayed if you pass file in quotes --password "~/pass.txt" - your console will not resolve ~ into home directory.

@sammy007
Copy link
Author

sammy007 commented Aug 2, 2016

Password is correct, this is plain text file with just a password followed by newline.

@tomusdrw
Copy link
Collaborator

tomusdrw commented Aug 2, 2016

Ok, I will double check 1.2.3 then.

@sammy007
Copy link
Author

sammy007 commented Aug 2, 2016

@tomusdrw I think some better error message on launch would be cool, like "invalid password" followed by process exit.

@tomusdrw
Copy link
Collaborator

tomusdrw commented Aug 2, 2016

Yes, I tried to make message more descriptive:
No password found to unlock account {}. Make sure valid password is present in files passed using--password`

I've checked 1.2.3 and couldn't reproduce the issue. This works fine for me:
$ echo "pass" > ./pass && parity --unlock 0x123...456 --password ./pass

@debris: any ideas? Can it be OSX-specific?

@ltfschoen
Copy link
Contributor

I got the same error using Parity v1.8.4-beta Unable to read password file. Ensure it exists and permissions are correct. when using a custom config.toml file with the following:

[account]    
...
password = ["$HOME/Library/Application Support/io.parity.ethereum/testnet/passwords/node.pwds"]

I fixed it by replacing $HOME with my home directory i.e. /Users/Ls

@5chdn 5chdn added this to the 1.9 milestone Jan 5, 2018
@chevdor
Copy link

chevdor commented Feb 12, 2018

Having the same issue with the current version (master). No matter what I provide as password file, I get ui Unable to read password file. Ensure it exists and permissions are correct.

This seems to be an issue parsing what the file should be.

If you call:
target/release/parity --unlock 0x123... --password /your/path/password.txt --chain kovan ui
the message becomes:
--chain Unable to read password file. Ensure it exists and permissions are correct.

=> it considers
/your/path/password.txt --chain
instead of
/your/path/password.txt

@chevdor
Copy link

chevdor commented Feb 12, 2018

workaround:
$ target/release/parity --chain kovan --unlock 0x13... --force-ui --password /your/path/password.txt but make sure you do NOT provide --force_uiafter --password. --password ... should be the last arg.

@5chdn
Copy link
Contributor

5chdn commented Feb 12, 2018

This is fixed already, please upgrade your client.

@chevdor
Copy link

chevdor commented Feb 12, 2018 via email

@5chdn
Copy link
Contributor

5chdn commented Feb 13, 2018

Fixed in #7626 a while ago. See #7428

What's your version string?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F2-bug 🐞 The client fails to follow expected behavior.
Projects
None yet
Development

No branches or pull requests

6 participants