I'm quite stuck with this issue. It seems like it must work, but it doesn't :D

Have a contract on rinkeby network which is working perfectly through remix(load by address) and truffle console. However method calls through web3 client refuse to work.


import Web3 from 'web3';

// @ts-ignore
const web3 = new Web3(window.web3.currentProvider);

***got address & abi***

export default new web3.eth.Contract(abi, address);

usage example:

const owner = await registryContract.methods.owner().call();

In console.log() i can see the actual contract address and methods. Metamask is active and web3.eth.defaultAccount shows me my correct account at rinkeby network => provider must be working.

calling the owner from remix working. with web3 i'm getting an empty array as response. Same for other methods calls.

What is possible going wrong? "web3": "^1.0.0-beta.37"

  • is there any solution you got ? Mar 2, 2021 at 17:03

6 Answers 6


The problem was with contract abi - don't know what exactly was wrong with it. I simply used abi from different source and it helped. Any tool for abi verification?

  • What do you mean exactly with "direct source"?
    – User
    Nov 15, 2020 at 15:03

I had exactly the same issue and managed to solve it by passing correct ABI object. Looks like earlier versions of solc returned ABI as a JSON string and current version returns actual JavaScript object (but I'm not sure). So you can't just print contract's ABI and paste it to web3 instance (as I did). I had to JSON.stringify returned object first and then JSON.parse copy/pasted string to the web3 instance.


You have some stray brackets after the method name.

Instead of



  • tried using it without () returns me methods.owner object Dec 31, 2018 at 12:06

Try this.

registryContract.owner(function (error, result) {
if (!error)
  • tried, doesn't throw any error Dec 31, 2018 at 12:08

Encountered exactly the same problem (all methods returning empty arrays) and was driving me mad.

The solution (the one I found anyway) was to stringify the abi resulting from the solc compiler (as mentioned earlier in this thread).

console.log(JSON.stringify(abi)); // AND NOT console.log(abi)

And to copy&paste the resulting string copy&pasted to specify the deployed contract's abi.

And pending question, any way to check that a the proxy obtained on a deployed contract using its address and associated abi is correct ?

That would have saved me a lot of time and would probably save time for many more to come.


The issue lies with the ABI you are feeding to web3.eth.Contract and you need a comprehensive one. Go to https://remix.ethereum.org/ and compile your contract there, then copy the ABI from there.

You can find the copy button at the bottom of this image.

You can find the copy button for the ABI at the bottom of this image.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.