[Ethereum] code -32000 message: account is locked

accountsgo-ethereumtransactionswallets

I am trying to withdraw some coins from my wallet (as I have done several times prior) but this time I am prompted with the error:

 {0x0000000000000000000000000000000000000000", value: web3.toWei(1, "ether")})
{
  code: -32000,
  message: "account is locked"
}

I've tried unlocking the account using the --unlock command

geth --unlock "0x0000000000000000000000000000000000000000"

but unfortunately it did not fix the issue.

Best Answer

You have to send the index of the account address on eth.accounts to unlock it and the path to the password file:

Like:

geth --unlock=0 --password="./password-file-path"

This will unlock the first address on eth.accounts and use the content on the file as password.

Related Topic