web3.eth.personal.sign gives error Unhandled rejection Error: Returned error: Method not found
var Web3 = require('web3');
var web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8545'));
web3.version //prints 1.0.0-beta.26
web3.eth.personal.sign('Hello World',account,password).then((signature)=>{console.log(signature)});
Promise { _bitField: 0, _fulfillmentHandler0: undefined, _rejectionHandler0: undefined, _promise0: undefined, _receiver0: undefined }
Unhandled rejection Error: Returned error: Method not found at Object.ErrorResponse (node_modules/web3-core-helpers/src/errors.js:29:16) at node_modules/web3-core-requestmanager/src/index.js:137:36 at XMLHttpRequest.request.onreadystatechange (node_modules/web3-providers-http/src/index.js:64:13) at XMLHttpRequestEventTarget.dispatchEvent (node_modules/xhr2/lib/xhr2.js:64:18) at XMLHttpRequest._setReadyState (node_modules/xhr2/lib/xhr2.js:354:12) at XMLHttpRequest._onHttpResponseEnd (node_modules/xhr2/lib/xhr2.js:509:12) at IncomingMessage.
(node_modules/xhr2/lib/xhr2.js:469:24) at emitNone (events.js:91:20) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickDomainCallback (internal/process/next_tick.js:128:9)
> web3.eth.personal.sign
{ [Function: send]
method:
Method {
name: 'sign',
call: 'personal_sign',
params: 3,
inputFormatter:
[ [Function: inputSignFormatter],
[Function: inputAddressFormatter],
null ],
outputFormatter: undefined,
transformPayload: undefined,
extraFormatters: undefined,
requestManager: RequestManager { provider: [Object], providers: [Object],subscriptions: {} },
accounts: undefined,
defaultBlock: 'latest',
defaultAccount: null },
request: [Function: bound ],
call: 'personal_sign' }
I am having the same problem with slightly different instantiation of web3 and a slightly different error.
Instantiation: `var Web3 = require('web3'); var web3 = new Web3('http://localhost:8545');
web3.eth.personal.sign('hello world', '0xe87529a6123a74320e13a6dabf3606630683c029', 'password') .then((result) => { console.log(result); })`
Error:
Unhandled rejection Error: Returned error: Error: Method personal_sign not supported.
I've since implemented in the browser instead of running on Node in the Terminal and have had success. I'm guessing there is something that MetaMask is doing in the background that makes it work, and perhaps the latest version of web3 isn't supported by the latest version of testrpc?
I am using https://github.com/dstarcev/parity-poa-playground where I have set he usd_per_tx to 0.
Having same problem in node with [email protected] and latest beta parity.
Is this error still present in the latest version? @hrishikeshio @aas312 @captnseagraves
Having the same error with [email protected].
Having the same error with [email protected].
Why is this closed? I'm having the same problem with 1.0.0-beta.36. I'm running a node remotely using: --rpcapi db,eth,net,web3,personal,web3
Ideas?
It will work if the personal API is activated and if you use the latest version of Web3.
@nivida it doesn't work...