We're using Microsoft Azure, and NodeJS on the server. When we address Microsoft Azure via NodeJS, sometimes we get the 'Password or Unlock' error. But when we use Truffle and address the same setter, everything works fine. What could be the possible problem and what does this error mean as I've unlocked my account.

This is my code:

        .then(coinbase => {
            console.log("Setter method started!");
            return this.contract.methods
                    from: coinbase,
                    gas: 4600000,
                    gasPrice: '22000'
        .catch(err => {

3 Answers 3


When sending a transaction, you don't "unlock personal", you unlock the account that sends the transaction.

In this case, you could do:

return web3.personal.unlockAccount(ADDRESS, PASSWORD, TIME (if needed) );
.then(do whatever you want after that)
  • Sorry, but i know about it. I does it, and my problem it is not problem "unlock accounted" , when i ask my setter function sometimes i have error "authentication needed: password or unlock". But my account is unlocked. That error only on my nodejs project, but my setter function on truffle call correctly. Why? Commented Nov 23, 2017 at 3:03
  • Abvouisly, if your node says that your account is not unlocked, it is not. I don't know why. Commented Nov 23, 2017 at 3:06

i recommend this solution

personal.unlockAccount(Address, Password, 0)

0 is unlock no time limit

  • invalid argument 1: json: cannot unmarshal hex string without 0x prefix into Go value of type hexutil.Bytes
    – porton
    Commented Apr 5, 2018 at 0:00
  • Address is 0x~~~ you should make account first Commented Apr 10, 2018 at 4:17

I found solution.If someone needs it in the future: First i created multi-member(Ethereum Leader and Ethereum Member) in Azure and it did not work. Then I removed all groups multi-member and create one group "Blockchain". And is correctly worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.