Error: Returned error: Method personal_sign not supported.
See original GitHub issueExpected Behavior
When using web3.eth.personal.sign, the client should return a signature based off of the message and address.
When running in a web browser using the same version of Web3 as Truffle (v1.0.0-beta.37) I use Metamask to sign the message and am returned a valid signature.
Current Behavior
When trying to use web3.eth.personal.sign I receive the error message “Error: Returned error: Method personal_sign not supported.”
Ganache’s logs report:
[02:16:45] < "stack": "Error: Method personal_sign not supported.
at GethApiDouble.handleRequest (/tmp/.mount_Ganachsr17Gc/resources/app.asar/node_modules/ganache-core/lib/subproviders/geth_api_double.js:67:16)
at next (/tmp/.mount_Ganachsr17Gc/resources/app.asar/node_modules/ganache-core/node_modules/web3-provider-engine/index.js:116:18)
at GethDefaults.handleRequest (/tmp/.mount_Ganachsr17Gc/resources/app.asar/node_modules/ganache-core/lib/subproviders/gethdefaults.js:15:12)
at next (/tmp/.mount_Ganachsr17Gc/resources/app.asar/node_modules/ganache-core/node_modules/web3-provider-engine/index.js:116:18)
at SubscriptionSubprovider.FilterSubprovider.handleRequest (/tmp/.mount_Ganachsr17Gc/resources/app.asar/node_modules/ganache-core/node_modules/web3-provider-engine/subproviders/filters.js:89:7)
at SubscriptionSubprovider.handleRequest (/tmp/.mount_Ganachsr17Gc/resources/app.asar/node_modules/ganache-core/node_modules/web3-provider-engine/subproviders/subscriptions.js:136:49)
at next (/tmp/.mount_Ganachsr17Gc/resources/app.asar/node_modules/ganache-core/node_modules/web3-provider-engine/index.js:116:18)
at DelayedBlockFilter.handleRequest (/tmp/.mount_Ganachsr17Gc/resources/app.asar/node_modules/ganache-core/lib/subproviders/delayedblockfilter.js:31:3)
at next (/tmp/.mount_Ganachsr17Gc/resources/app.asar/node_modules/ganache-core/node_modules/web3-provider-engine/index.js:116:18)
at RequestFunnel.handleRequest (/tmp/.mount_Ganachsr17Gc/resources/app.asar/node_modules/ganache-core/lib/subproviders/requestfunnel.js:32:12)
at next (/tmp/.mount_Ganachsr17Gc/resources/app.asar/node_modules/ganache-core/node_modules/web3-provider-engine/index.js:116:18)
at Web3ProviderEngine._handleAsync (/tmp/.mount_Ganachsr17Gc/resources/app.asar/node_modules/ganache-core/node_modules/web3-provider-engine/index.js:103:3)
at Timeout._onTimeout (/tmp/.mount_Ganachsr17Gc/resources/app.asar/node_modules/ganache-core/node_modules/web3-provider-engine/index.js:87:12)
at ontimeout (timers.js:469:11)
at tryOnTimeout (timers.js:304:5)
at Timer.listOnTimeout (timers.js:264:5)",
Possible Solution
I guess personal_sign needs to be implemented? I’m assuming it is Ganache which needs to provide the RPC endpoint for personal_sign when web3 calls it?
Steps to Reproduce (for bugs)
- Launch a truffle console connected to Ganache:
> truffle console - From within truffle console, set up a message and attempt to sign it:
truffle(ganache)> var message = "Hello, World!"
truffle(ganache)> var accounts = await web3.eth.getAccounts()
truffle(ganache)> var sig = await web3.eth.personal.sign(message, accounts)
web3.eth.personal.sign will throw an error:
Thrown:
Error: Returned error: Method personal_sign not supported.
at XMLHttpRequest._onHttpResponseEnd (/home/myhome/.npm_modules/lib/node_modules/truffle/build/webpack:/~/xhr2-cookies/dist/xml-http-request.js:318:1)
at XMLHttpRequest._setReadyState (/home/myhome/.npm_modules/lib/node_modules/truffle/build/webpack:/~/xhr2-cookies/dist/xml-http-request.js:208:1)
at XMLHttpRequestEventTarget.dispatchEvent (/home/myhome/.npm_modules/lib/node_modules/truffle/build/webpack:/~/xhr2-cookies/dist/xml-http-request-event-target.js:34:1)
at XMLHttpRequest.request.onreadystatechange (/home/myhome/.npm_modules/lib/node_modules/truffle/build/webpack:/~/web3-providers-http/src/index.js:96:1)
at /home/myhome/.npm_modules/lib/node_modules/truffle/build/webpack:/packages/truffle-provider/wrapper.js:112:1
at /home/myhome/.npm_modules/lib/node_modules/truffle/build/webpack:/~/web3-core-requestmanager/src/index.js:140:1
at Object.ErrorResponse (/home/myhome/.npm_modules/lib/node_modules/truffle/build/webpack:/~/web3-core-requestmanager/~/web3-core-helpers/src/errors.js:29:1)
Context
Am unable to run unit/functional tests using truffle test against anything requiring web3.eth.personal.sign. Currently, all testing for anything requiring personal.sign needs to be run from a web browser.
Your Environment
Ubuntu Linux 18.04 Ganache 2.1.0
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (4 by maintainers)

Top Related StackOverflow Question
Thanks @haydenyoung for opening this issue! I apologize that we haven’t had a chance to triage this yet and a big thanks to @NicolasKritter for keeping this issue alive! I think I’ll have a chance to address this sometime within the next few days.
We’re now tracking this in https://github.com/trufflesuite/ganache/issues/995