Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eth_newFilter: Invalid JSON RPC response: "" #88

Closed
wjmelements opened this issue Mar 1, 2018 · 9 comments
Closed

eth_newFilter: Invalid JSON RPC response: "" #88

wjmelements opened this issue Mar 1, 2018 · 9 comments

Comments

@wjmelements
Copy link

wjmelements commented Mar 1, 2018

ethereum_web3.js?hash=786f863a7bcd0e81c6ebe46b67c9a95b6c898f3f:4396 POST https://mainnet.infura.io/x6jRpmEj17uLQR1TuV1E 405 ()
HttpProvider.sendAsync @ ethereum_web3.js?hash=786f863a7bcd0e81c6ebe46b67c9a95b6c898f3f:4396
RequestManager.sendAsync @ ethereum_web3.js?hash=786f863a7bcd0e81c6ebe46b67c9a95b6c898f3f:6379
send @ ethereum_web3.js?hash=786f863a7bcd0e81c6ebe46b67c9a95b6c898f3f:5090
Filter @ ethereum_web3.js?hash=786f863a7bcd0e81c6ebe46b67c9a95b6c898f3f:3578
Eth.filter @ ethereum_web3.js?hash=786f863a7bcd0e81c6ebe46b67c9a95b6c898f3f:5522
rewatch @ accounts.js:8
(anonymous) @ accounts.js:44
getAddress @ accounts.js:93
(anonymous) @ accounts.js:42
onWeb3 @ web3.js:5
(anonymous) @ web3.js:62
(anonymous) @ ethereum_web3.js?hash=786f863a7bcd0e81c6ebe46b67c9a95b6c898f3f:6272
(anonymous) @ ethereum_web3.js?hash=786f863a7bcd0e81c6ebe46b67c9a95b6c898f3f:6388
request.onreadystatechange @ ethereum_web3.js?hash=786f863a7bcd0e81c6ebe46b67c9a95b6c898f3f:4387
XMLHttpRequest.send (async)
HttpProvider.sendAsync @ ethereum_web3.js?hash=786f863a7bcd0e81c6ebe46b67c9a95b6c898f3f:4396
RequestManager.sendAsync @ ethereum_web3.js?hash=786f863a7bcd0e81c6ebe46b67c9a95b6c898f3f:6379
get @ ethereum_web3.js?hash=786f863a7bcd0e81c6ebe46b67c9a95b6c898f3f:6269
Net.refresh @ web3.js:32
web3.js @ web3.js:65
fileEvaluate @ modules-runtime.js?hash=5e485d3e2a49d2506f7ca0df72fcd6a3216a83a5:353
require @ modules-runtime.js?hash=5e485d3e2a49d2506f7ca0df72fcd6a3216a83a5:248
(anonymous) @ app.js?hash=497a23ec461c1a94a55b5f3881c917fe43d824b9:4219
accounts.js:16 Error: Invalid JSON RPC response: ""
    at Object.InvalidResponse (ethereum_web3.js?hash=786f863a7bcd0e81c6ebe46b67c9a95b6c898f3f:3155)
    at XMLHttpRequest.request.onreadystatechange (ethereum_web3.js?hash=786f863a7bcd0e81c6ebe46b67c9a95b6c898f3f:4384)

web3.version is 0.20.2

http provider is https://mainnet.infura.io/x6jRpmEj17uLQR1TuV1E

@wjmelements
Copy link
Author

also happens on 0.20.5

@ryanschneider
Copy link

I believe this was related to a service interruption we were experiencing, can you confirm if you're still seeing the issue?

If you are, we need the RPC payload that was sent (the POST body) to debug the issue.

Thanks.

@wjmelements
Copy link
Author

This is still occurring. How can I obtain the payload?

@wjmelements
Copy link
Author

{"jsonrpc":"2.0","id":12,"method":"eth_newFilter","params":[{"topics":["0xd721fc4b71111225bba131141f013ef3e3956654b0eade3c9e9f611f0d93b551"],"to":"pending","address":"0x000000002bb43c83ece652d161ad0fa862129a2c","fromBlock":"0x4ee93f"}]}

@wjmelements
Copy link
Author

Also fails with fromBlock:0x0

{"jsonrpc":"2.0","id":2,"method":"eth_newFilter","params":[{"topics":["0xd721fc4b71111225bba131141f013ef3e3956654b0eade3c9e9f611f0d93b551"],"to":"pending","address":"0x000000002bb43c83ece652d161ad0fa862129a2c","fromBlock":"0x0"}]}

@wjmelements wjmelements changed the title eth_getLogs: Invalid JSON RPC response: "" eth_newFilter: Invalid JSON RPC response: "" Mar 1, 2018
@ryanschneider
Copy link

Ah, I see. We don't support eth_newFilter on our endpoints, see the supported RPC methods here:

https://github.com/INFURA/infura/blob/master/docs/source/index.html.md#supported-json-rpc-methods

We do have experimental support for filters in our websocket endpoints, see #29

Specifically the websocket endpoints are at:

wss://mainnet.infura.io/ws
wss://ropsten.infura.io/ws
wss://rinkeby.infura.io/ws

@wjmelements
Copy link
Author

Okay. It's supported by Metamask. Do they use the websocket endpoints?

@wjmelements
Copy link
Author

I'm not on web3.js 1.0 so I can't use websockets. I'm curious what metamask does since I thought they used infura.

@wjmelements
Copy link
Author

I can workaround by requerying the logs with xmlHttp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants