I am struggling to get a simple whisper (shh) example running. I am using the following versions: geth 1.9.24-stable-cc05b050 web3 6.14.5

I am running geth with the following command:

geth --shh --rpc

And I start coding with the following linex:

var Web3 = require('web3');
var web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
var shh = web3.shh;
(async function main() {
   var keyPair = await shh.newKeyPair();

Then I get the following error:

Error: Returned error: the method shh_newKeyPair does not exist/is not available

I guess that the shh command is not supported by the node (geth).

Can anyone instruct how to get a simple message passing example using Whisper running with the versions above? Thanks for the support.


1 Answer 1


v1.9.24 no longer has whisper, it has been trashed since v1.9.21. You should use a previous version. (like v1.9.17)

  • Why was whisper trashed? What is the alternative p2p?
    – KYSSE
    May 12, 2022 at 13:08

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.