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)
execute "truffle migrate" command and the error should comeup
It should successfully migrate the code.
What actually happened. Please give examples and support it with screenshots, copied output or error messages.
@vivek4c4 Which ethereum client are you using?
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
@ebundala Thank you - that's likely the problem here.
@vivek4c4 Closing since this seems like it's related to your client settings, but please feel free to re-open if there's something else going on.
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
thank u man ! i use "db,eth,net,web3,admin,personal,miner" and it worked !
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"
Most helpful comment
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