trufflesuite / truffle-debugger

Core functionality for debugging Solidity files built with Truffle
67 stars 12 forks source link

Getting Error: The method debug_traceTransaction does not exist/is not available, on OSX #35

Closed mitsuaki-u closed 6 years ago

mitsuaki-u commented 6 years ago

OS: OSX High Sierra Truffle v4.1.0 (core: 4.1.0) Solidity v0.4.19 (solc-js) Network: Rinkeby Testnet

running command in truffle console: debug 0x.......

Full Error:

Error: The method debug_traceTransaction does not exist/is not available at /usr/local/lib/node_modules/truffle/build/webpack:/~/truffle-debugger/dist/debugger.js:5768:1 at /usr/local/lib/node_modules/truffle/build/webpack:/~/truffle-provider/wrapper.js:134:1 at XMLHttpRequest.request.onreadystatechange (/usr/local/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/httpprovider.js:128:1) at XMLHttpRequestEventTarget.dispatchEvent (/usr/local/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:64:1) at XMLHttpRequest._setReadyState (/usr/local/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:354:1) at XMLHttpRequest._onHttpResponseEnd (/usr/local/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:509:1) at IncomingMessage. (/usr/local/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:469:1) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1055:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickDomainCallback (internal/process/next_tick.js:218:9) truffle(rinkeby)> (node:9551) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'view' of undefined (node:9551) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

gnidan commented 6 years ago

Are you using INFURA?

mitsuaki-u commented 6 years ago

I do not think so. I am using geth to deploy on rinkeby testnet.

gnidan commented 6 years ago

Could you paste your truffle config file as well as the options you use to start geth? It should work; they're the ones who spec'd out that debug_traceTransaction method

mitsuaki-u commented 6 years ago

truffle config:

module.exports = { solc: { optimizer: { enabled: true, runs: 200 } }, networks: { rinkeby: { host: "localhost", port: 8545, network_id: "4", from: "0x......", //account from which to deploy gas: 6712390 } } };

geth command inside folder with rinkeby chaindata:

geth --datadir=./chaindata/ --rpc --rpcport 8545 --rpcaddr 127.0.0.1 --rpcapi web3,eth,personal,miner,net,txpool

gnidan commented 6 years ago

Ah @bitdom0 you need to pass debug in your list to --rpcapi

mitsuaki-u commented 6 years ago

That seems to have did it. Thank you!