Skip to content

Getting error method net_version does not exist/is not available calling NetworkID via geth #29770

Closed
@nidhi-singh02

Description

@nidhi-singh02

System information

Geth version: geth version - 1.14.3
CL client & version: e.g. lighthouse/nimbus/prysm@v1.0.0
OS & Version: Windows/Linux/OSX
Commit hash : (if develop)

Expected behaviour

The method should return me the Network ID.

Actual behaviour

I am getting error method net_version does not exist/is not available
I have checked the nodes, http-api net,eth is enabled. If I try to run the curl command on the RPC endpoint of the node, it works fine.

config toml of my node has
HTTPModules = ["admin", "engine", "net", "web3", "eth", "debug", "txpool"]

Steps to reproduce the behaviour

Through code, try to invoke NetworkID referred here -

func (ec *Client) NetworkID(ctx context.Context) (*big.Int, error) {

Backtrace

[backtrace]

When submitting logs: please submit them as text and not screenshots.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions