question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The method shh_newFilter does not exist/is not available

See original GitHub issue
  • Version: 3.1.6
  • Python: 3.5
  • Parity: 1.8.0
  • Geth: 1.7.2
  • OS: linux

What was wrong?

Exceptions thrown when trying your filter example for Shh.

In all three cases, I am using this code:

from web3 import Web3, HTTPProvider
web3 = Web3(HTTPProvider('http://localhost:8545'))

def filter_callback(new_message):
    print("New Shh Message: {0}".format(new_message))

topic="topic_to_subscribe"
topicHex = web3.toHex(topic)
print (topic, topicHex)

shh_filter = web3.shh.filter({"topics":[topicHex]})

(already fixed the lack of flushing, see https://github.com/pipermerriam/web3.py/issues/378)

parity

started with

parity --whisper

I get this:

topic_to_subscribe 0x746f7069635f746f5f737562736372696265
Traceback (most recent call last):
  File ".../workdir/web3/filtertest_Shh.py", line 19, in <module>
    shh_filter = web3.shh.filter({"topics":[topicHex]})
  File ".../env/epe-py3/lib/python3.5/site-packages/web3/shh.py", line 37, in filter
    filter_id = self.web3.manager.request_blocking("shh_newFilter", [filter_params])
  File ".../env/epe-py3/lib/python3.5/site-packages/web3/manager.py", line 96, in request_blocking
    raise ValueError(response["error"])
ValueError: {'code': -32601, 'message': 'Method not found'}

geth

started with

geth --rpc --shh

I get this

topic_to_subscribe 0x746f7069635f746f5f737562736372696265
Traceback (most recent call last):
  File ".../workdir/web3/filtertest_Shh.py", line 19, in <module>
    shh_filter = web3.shh.filter({"topics":[topicHex]})
  File ".../env/epe-py3/lib/python3.5/site-packages/web3/shh.py", line 37, in filter
    filter_id = self.web3.manager.request_blocking("shh_newFilter", [filter_params])
  File ".../env/epe-py3/lib/python3.5/site-packages/web3/manager.py", line 96, in request_blocking
    raise ValueError(response["error"])
ValueError: {'code': -32601, 'message': 'The method shh_newFilter does not exist/is not available'}

How can it be fixed?

When someone who knows … updates the web3.py filter example for Shh.

Thanks

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
avatar-lavventuracommented, Jun 25, 2018
1reaction
rphmeiercommented, Nov 8, 2017

Seems like whisper is still pretty immature.

Absolutely! That’s why I’m pushing for the whisper RPCs to be excluded from the web3.js 1.0 stable release (they are 100% unstable).

Right now the Geth and Parity Whisper maintainers are still settling on a mutual wire protocol and there are definite improvements to be made w.r.t. routing and scalability. I don’t see how we can expect to have stable RPCs before a stable wire protocol.

Read more comments on GitHub >

github_iconTop Results From Across the Web

web3.js: Error: The method shh_newSymKey does not exist/is ...
The newSymKey(); function returns a promise, which needs to be resolved, to get the returned value. This is why the error in version ......
Read more >
Ethereum - does not exist/is not available error with web3
I'm trying to get a simple whisper example running with web3 on geth console: var f = web3.shh.filter({topics: ["qwerty"]}) f.get() web3.shh ...
Read more >
Index (core 4.8.2-SNAPSHOT API) - Web3j
Handler for working with block filter requests. BlockFilter(Web3j, Callback<String>) - Constructor for class org.web3j.protocol.core.filters.BlockFilter ...
Read more >
Index (core 4.8.7 API) - javadoc.io
Handler hashes for working with block filter requests ... Since the pending transaction filter does not support historic filters, the filterId is ignored ......
Read more >
Download core JAR 4.8.7-android With all dependencies!
Organization not specified. URL https://web3j.io ... There are maybe transitive dependencies! There is a newer version: 5.0.0.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found