raineorshine / solidity-repl

Ethereum Solidity REPL
ISC License
396 stars 33 forks source link

Error: invalid argument 0: json: cannot unmarshal hex string without 0x prefix into Go struct field #13

Open stephenkfrey opened 6 years ago

stephenkfrey commented 6 years ago

Thanks for making this tool!

The REPL throws the following error after starting:

$ solr
Welcome to the Solidity REPL!
> uint a = 1;
> uint b = 2;
> a + b
Error: invalid argument 0: json: cannot unmarshal hex string without 0x prefix into Go struct field SendTxArgs.data of type hexutil.Bytes
    at Object.InvalidResponse (/usr/local/lib/node_modules/solidity-repl/node_modules/web3/lib/web3/errors.js:35:16)
    at /usr/local/lib/node_modules/solidity-repl/node_modules/web3/lib/web3/requestmanager.js:86:36
    at request.onreadystatechange (/usr/local/lib/node_modules/solidity-repl/node_modules/web3/lib/web3/httpprovider.js:110:13)
    at dispatchEvent (/usr/local/lib/node_modules/solidity-repl/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:591:25)
    at setState (/usr/local/lib/node_modules/solidity-repl/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:610:14)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/solidity-repl/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:447:13)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9) 

I made sure to globally install and update testrpc:

$ npm install -g ethereumjs-testrpc
$ npm install -g solidity-repl
raineorshine commented 6 years ago

Thank you! I will take a look as soon as I have time. Or maybe someone else with some free time can take a stab at it. On Thu, Sep 14, 2017 at 2:04 PM Stephen notifications@github.com wrote:

Thanks for making this tool!

The REPL throws the following error after starting:

uint a = 1; uint b = 2; a + b Error: invalid argument 0: json: cannot unmarshal hex string without 0x prefix into Go struct field SendTxArgs.data of type hexutil.Bytes at Object.InvalidResponse (/usr/local/lib/node_modules/solidity-repl/node_modules/web3/lib/web3/errors.js:35:16) at /usr/local/lib/node_modules/solidity-repl/node_modules/web3/lib/web3/requestmanager.js:86:36 at request.onreadystatechange (/usr/local/lib/node_modules/solidity-repl/node_modules/web3/lib/web3/httpprovider.js:110:13) at dispatchEvent (/usr/local/lib/node_modules/solidity-repl/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:591:25) at setState (/usr/local/lib/node_modules/solidity-repl/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:610:14) at IncomingMessage. (/usr/local/lib/node_modules/solidity-repl/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:447:13) at emitNone (events.js:91:20) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9)```

I made sure to globally install and update testrpc.


$ npm install -g solidity-repl```

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/raineorshine/solidity-repl/issues/13>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AAtyxAWrjjOH50gWiPn4OQPbs3iuJaQoks5siYaugaJpZM4PYG_h>
.
raineorshine commented 6 years ago

I tried, and unfortunately I cannot reproduce the problem. It works fine for me.