I'm using following code for generating the new account. (Integrated into the metamask)

 web3.personal.newAccount('!@superpassword', function(error, res) {
            if (error) {
              console.log('error 111 =====>',error)
            } else {
              console.log('res 111=====>',res)

But getting following error in browser console -

Error: Invalid JSON RPC response: {"id":2,"jsonrpc":"2.0","error":{"code":-32603}}

Can you please let me know why I'm getting this error?

  • you should expose personal api also, ex: --rpcapi="db,eth,net,personal,web3" – kherwa May 25 '18 at 8:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.