Posts

Showing posts from August, 2017

TypeError: abi.filter is not a function

This error is caused by passing invalid abi when creating a new contract with "web3.eth.contract(abi)". The fault with the abi is usually that it's not properly parsed. To parse it, we can simply use the JSON.parse(__compiledcode__["contracts"][__contractname__]["interface"]).

Error: Invalid JSON RPC response: undefined

This error is usually caused by connecting web3 to the wrong port. For instance, my testrpc was : Listening on localhost:8545 But, I was trying to connect to it with the wrong port : var web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8454"));

Truffle 800A1391 runtime error on Windows

I ran into this issue when trying to compile the code, using 'truffle compile'. The error arises from the fact that there's a file in the project folder called 'truffle.js' and that's the one that Windows cmd tries to run when executing the command.  The simplest way to fix the issue is to use git bash to run 'truffle compile' - no runtime errors!