Ethereum Error: authentication needed: password or unlock

+1 vote

I am using azure ethereum consortium network with Geth and MetaMask. and the following error is happening randomly:

0|server | (node:99208) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 53): Error: authentication needed: password or unlock

Sometimes the api call pass through successfully, and sometimes nodejs app logs show this. I unlocked the account multiple times using multiple ways giving me "true" boulean as follows:

personal.unlockAccount(eth.coinbase, "cDxxxxxxxxKaYZ", 300)

geth --exec "personal.unlockAccount(eth.accounts[0], 'cDb xxxxxxxKaYZ', 1000)" attach

Jul 20, 2018 in Blockchain by sabby
• 4,350 points
518 views

1 answer to this question.

0 votes
Best answer

First, make sure you have an account.

web3.personal.listAccounts

If you get [] ...

web3.personal.newAccount()

Next run

web3.personal.unlockAccount(web3.personal.listAccounts[0],"<password>", 15000)

this will unlock the first account with this password for 15,000 seconds. 

This should solve your error

answered Aug 8, 2018 by Omkar
• 67,460 points

selected Aug 8, 2018 by Omkar

Related Questions In Blockchain

0 votes
1 answer

'ppa:ethereum' error while installing ethereum on ubuntu

First try: sudo apt-get install --reinstall ca-certificates If ...READ MORE

answered Jul 12, 2018 in Blockchain by slayer
• 29,050 points
166 views
0 votes
1 answer

Error in sending value to an Ethereum Smart Contract.

It is stated in Solidity 4.0 documentation ...READ MORE

answered Jul 23, 2018 in Blockchain by Perry
• 17,020 points
58 views
0 votes
1 answer

How to solve “ltdl.h: No such file or directory” error?

It seems like you are missing header ...READ MORE

answered Jul 26, 2018 in Blockchain by slayer
• 29,050 points
295 views
0 votes
1 answer
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
140 views
+3 votes
2 answers

How to run ethereumjs using Node.JS

You need to install testrpc globally on ...READ MORE

answered Mar 27, 2018 in Blockchain by ned_crew
• 1,620 points
136 views
0 votes
1 answer
0 votes
1 answer

Solidity geth: Error encountered during contract execution [Bad instruction]

recipes is a dynamic storage array. You need ...READ MORE

answered Oct 15, 2018 in Blockchain by Omkar
• 67,460 points
77 views
0 votes
1 answer

"Migrations" -- Returned error: authentication needed: password or unlock.

By default, the accounts are locked and ...READ MORE

answered Jan 17 in Blockchain by Omkar
• 67,460 points
697 views