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,370 points
5,266 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.

Get your Blockchain certification today to learn more about this technology.

Thanks.

answered Aug 8, 2018 by Omkar
• 69,220 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,370 points
3,007 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,100 points
1,418 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,370 points
3,177 views
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
1,927 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,610 points
1,418 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,455 views
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
• 69,220 points
1,468 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, 2019 in Blockchain by Omkar
• 69,220 points
4,275 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP