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.

Error: The method net_version does not exist/is not available

See original GitHub issue
  • I’ve asked for help in the Truffle Gitter before filing this issue.

Issue

When i execute “truffle migrate” command i face the below issue.

Error: The method net_version does not exist/is not available
 at Object.InvalidResponse (C:\Users\vivek_vallamkonda\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:41483:16)
    at C:\Users\vivek_vallamkonda\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:330353:36
    at C:\Users\vivek_vallamkonda\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:326008:9
    at XMLHttpRequest.request.onreadystatechange (C:\Users\vivek_vallamkonda\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:329052:7)
    at XMLHttpRequestEventTarget.dispatchEvent (C:\Users\vivek_vallamkonda\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:176427:18)
    at XMLHttpRequest._setReadyState (C:\Users\vivek_vallamkonda\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:176717:12)
    at XMLHttpRequest._onHttpResponseEnd (C:\Users\vivek_vallamkonda\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:176872:12)
    at IncomingMessage.<anonymous> (C:\Users\vivek_vallamkonda\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:176832:24)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)

Steps to Reproduce

execute “truffle migrate” command and the error should comeup

Expected Behavior

It should successfully migrate the code.

Actual Results

What actually happened. Please give examples and support it with screenshots, copied output or error messages.

Environment

  • Operating System: Windows
  • Truffle version: 4.0.5
  • Ethereum client:
  • node version:8.9.1
  • npm version: 5.5.1

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
ebundalacommented, Feb 13, 2018

if your are using geth enable net on RPC api like `geth --rpc --rpcapi web3,eth,personal,miner,net,txpool i had the same issue enabling the api resolved it

0reactions
baxterjfinchcommented, Dec 22, 2020

I’m getting this using the new --http.api flag. Parameters are “eth,net,web3,admin,personal,miner”.

Using ethereum/client-go:latest in a docker container and running truffle console or truffle migrations throws the following:

Error: Returned error: the method net_version does not exist/is not available
    at Object.ErrorResponse (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/web3-core-helpers/src/errors.js:29:1)
    at /usr/local/lib/node_modules/truffle/build/webpack:/node_modules/web3/node_modules/web3-core-requestmanager/src/index.js:170:1
    at /usr/local/lib/node_modules/truffle/build/webpack:/packages/provider/wrapper.js:107:1
    at XMLHttpRequest.request.onreadystatechange (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/web3/node_modules/web3-providers-http/src/index.js:111:1)
    at XMLHttpRequestEventTarget.dispatchEvent (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:34:1)
    at XMLHttpRequest._setReadyState (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/xhr2-cookies/dist/xml-http-request.js:208:1)
    at XMLHttpRequest._onHttpResponseEnd (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/xhr2-cookies/dist/xml-http-request.js:318:1)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/xhr2-cookies/dist/xml-http-request.js:289:47)
    at IncomingMessage.emit (events.js:203:15)
    at IncomingMessage.EventEmitter.emit (domain.js:448:20)
    at endReadableNT (_stream_readable.js:1145:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Truffle v5.1.58 (core: 5.1.58)
Node v10.19.0

Geth client error is:

WARN [12-22|01:51:38.090] Served net_version                       conn=172.27.0.1:34994 reqid=2 t="10.36µs" err="the method net_version does not exist/is not available"
Read more comments on GitHub >

github_iconTop Results From Across the Web

JSON RPC error, method net_version does not exist when ...
When trying to fork the Fantom mainnent using hardhat and the archive node https endpoint via the speedynodes section, I get this error...
Read more >
Weird error 'The method eth_accounts does not exist/is not ...
and I face the following error. The method eth_accounts does not exist/is not available. I tried to enter geth and inspect using
Read more >
ethereum/go-ethereum - Gitter
Hi all, I'm having trouble connecting my graph-node to my local geth node. I'm using this command to connect: cargo run -p graph-node...
Read more >
Issues Connecting graph-node to Local geth node - Reddit
which gives this error: ... result Err(Rpc(Error { code: MethodNotFound, message: "the method net_version does not exist/is not available", data: None })).
Read more >
JSON-RPC Server - Ethermint Documentation
Method Namespace Implemented web3_clientVersion Web3 ✓ web3_sha3 Web3 ✓ net_version Net ✓
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