报错Error: Returned values aren‘t valid, did it run Out of Gas?

Posted JackieDYH

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了报错Error: Returned values aren‘t valid, did it run Out of Gas?相关的知识,希望对你有一定的参考价值。

 

用web3部署一个简单的获取状态变量的值的合约。获取状态变量值报错

index.js:298 Uncaught (in promise) Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.
    at ABICoder.push../node_modules/web3-eth-abi/lib/index.js.ABICoder.decodeParametersWith (index.js:298)
    at ABICoder.push../node_modules/web3-eth-abi/lib/index.js.ABICoder.decodeParameters (index.js:285)
    at Contract.push../node_modules/web3-eth-contract/lib/index.js.Contract._decodeMethodReturn (index.js:470)
    at Method.outputFormatter (index.js:760)
    at Method.push../node_modules/web3-core-method/lib/index.js.Method.formatOutput (index.js:147)
    at sendTxCallback (index.js:523)
    at cb (util.js:689)
    at Item.push../node_modules/process/browser.js.Item.run (browser.js:153)
    at drainQueue (browser.js:123)

主网没部署合约,所以调用合约出错了,相当于查找不到这个合约,注意自己合约部署网络

以上是关于报错Error: Returned values aren‘t valid, did it run Out of Gas?的主要内容,如果未能解决你的问题,请参考以下文章

升级 MySQL 至 5.5,报错 [ERROR] Plugin 'InnoDB' init function returned error

centos6系统yum安装报错The requested URL returned error: 404 Not Found

关于Git上传项目报错error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413

git推送到github报错:error: The requested URL returned error: 403 Forbidden while accessing https://github

解决:The requested URL returned error: 403

ubuntu下报错Sub-process /usr/bin/dpkg returned an error code 的解决方法