the method eth_blockNumber does not exist/is not available
the method eth_blockNumber does not exist/is not available
Loading saved threads...
forexmp45 · External communityPost link
External question — Ethereum Stack Exchange
Author: forexmp45
Original post: https://ethereum.stackexchange.com/questions/143796
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
Hello hope are good ?
I have my own full node with a ssh tunnel
My code is :
async function test (){
const url = 'ws://localhost:8546';
const web3 = new Web3(new Web3.providers.WebsocketProvider(url));
const a = await web3.eth.getBlockNumber();
console.log(a);
}
test();
Return :
the method eth_blockNumber does not exist/is not available
All is synced and working is there a pb ?
Quote
Report
VX3 · External communityPost link
External answer — Ethereum Stack Exchange
Author: VX3
Original post: https://ethereum.stackexchange.com/a/143797
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
This could be because the Ethereum node you are connecting to is not running the JSON-RPC interface on the same port, or that the Ethereum node is not fully synced yet. Make sure that you are connecting to the correct port and that the node is fully synced. Also check if the geth version you are using support the eth_blockNumber method.
Quote
Report
Post Reply
Checking account access…