Web3js web3.js错误:无法';无法从ABI:0x解码uint8

Web3js web3.js错误:无法';无法从ABI:0x解码uint8,web3js,Web3js,环境:mac节点web3 我正在尝试为node.js中部署的契约使用智能契约实例。我得到下面的错误,不知道如何解决它 代码: app.js 输出: new account: 0x7051ebDe6A252858A3E5b06Dc7608677B18EC093 ------ Error: Couldn't decode uint8 from ABI: 0x at SolidityTypeUInt.formatOutputUInt [as _outputFormatter] (/Volume

环境:mac节点web3

我正在尝试为node.js中部署的契约使用智能契约实例。我得到下面的错误,不知道如何解决它

代码: app.js

输出:

new account: 0x7051ebDe6A252858A3E5b06Dc7608677B18EC093
------ Error: Couldn't decode uint8 from ABI: 0x
    at SolidityTypeUInt.formatOutputUInt [as _outputFormatter] (/Volumes/Seagate/cqyh/ABC/node_modules/_web3-eth-abi@1.0.0-beta.34@web3-eth-abi/src/formatters.js:174:15)
    at SolidityTypeUInt.SolidityType.decode (/Volumes/Seagate/cqyh/ABC/node_modules/_web3-eth-abi@1.0.0-beta.34@web3-eth-abi/src/type.js:252:17)
    at /Volumes/Seagate/cqyh/ABC/node_modules/_web3-eth-abi@1.0.0-beta.34@web3-eth-abi/src/index.js:327:49
    at Array.forEach (<anonymous>)
    at ABICoder.decodeParameters (/Volumes/Seagate/cqyh/ABC/node_modules/_web3-eth-abi@1.0.0-beta.34@web3-eth-abi/src/index.js:326:13)
    at Contract._decodeMethodReturn (/Volumes/Seagate/cqyh/ABC/node_modules/_web3-eth-contract@1.0.0-beta.34@web3-eth-contract/src/index.js:459:22)
    at Method.outputFormatter (/Volumes/Seagate/cqyh/ABC/node_modules/_web3-eth-contract@1.0.0-beta.34@web3-eth-contract/src/index.js:812:46)
    at Method.formatOutput (/Volumes/Seagate/cqyh/ABC/node_modules/_web3-core-method@1.0.0-beta.34@web3-core-method/src/index.js:163:54)
    at sendTxCallback (/Volumes/Seagate/cqyh/ABC/node_modules/_web3-core-method@1.0.0-beta.34@web3-core-method/src/index.js:475:33)
    at /Volumes/Seagate/cqyh/ABC/node_modules/_web3-core-requestmanager@1.0.0-beta.34@web3-core-requestmanager/src/index.js:147:9
    at XMLHttpRequest.request.onreadystatechange (/Volumes/Seagate/cqyh/ABC/node_modules/_web3-providers-http@1.0.0-beta.34@web3-providers-http/src/index.js:77:13)
    at XMLHttpRequestEventTarget.dispatchEvent (/Volumes/Seagate/cqyh/ABC/node_modules/_xhr2@0.1.4@xhr2/lib/xhr2.js:64:18)
    at XMLHttpRequest._setReadyState (/Volumes/Seagate/cqyh/ABC/node_modules/_xhr2@0.1.4@xhr2/lib/xhr2.js:354:12)
    at XMLHttpRequest._onHttpResponseEnd (/Volumes/Seagate/cqyh/ABC/node_modules/_xhr2@0.1.4@xhr2/lib/xhr2.js:509:12)
    at IncomingMessage.<anonymous> (/Volumes/Seagate/cqyh/ABC/node_modules/_xhr2@0.1.4@xhr2/lib/xhr2.js:469:24)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9) undefined
新账户:0x7051ebDe6A252858A3E5b06Dc7608677B18EC093
------错误:无法从ABI:0x解码uint8
在SolidityTypeUInt.formatOutputUInt[作为输出格式化程序](/Volumes/segate/cqyh/ABC/node\u modules/\u web3-eth-abi@1.0.0-贝塔。34@web3-eth-abi/src/formatters.js:174:15)
在SolidityTypeUInt.SolidityType.decode(/Volumes/segate/cqyh/ABC/node\u modules/\u web3-eth-abi@1.0.0-贝塔。34@web3-eth-abi/src/type.js:252:17)
at/Volumes/Seagate/cqyh/ABC/node\u modules/\u web3-eth-abi@1.0.0-贝塔。34@web3-eth-abi/src/index.js:327:49
在Array.forEach()处
在ABICoder.decodepartameters(/Volumes/segate/cqyh/ABC/node\u modules/\u web3-eth-abi@1.0.0-贝塔。34@web3-eth-abi/src/index.js:326:13)
在合同中返回(/Volumes/segate/cqyh/ABC/node\u modules/\u web3-eth-contract@1.0.0-贝塔。34@web3-eth合同/src/index.js:459:22)
在Method.outputFormatter(/Volumes/segate/cqyh/ABC/node\u modules/\u web3-eth-contract@1.0.0-贝塔。34@web3-eth合同/src/index.js:812:46)
在Method.formatOutput(/Volumes/segate/cqyh/ABC/node_modules/_web3-core-method@1.0.0-贝塔。34@web3-core-method/src/index.js:163:54)
在sendTxCallback(/Volumes/segate/cqyh/ABC/node_modules/_web3-core-method@1.0.0-贝塔。34@web3-核心方法/src/index.js:475:33)
at/Volumes/Seagate/cqyh/ABC/node\u modules/\u web3-core-requestmanager@1.0.0-贝塔。34@web3-CoreRequestManager/src/index.js:147:9
在XMLHttpRequest.request.onreadystatechange(/Volumes/segate/cqyh/ABC/node_modules/_web3-providers-http@1.0.0-贝塔。34@web3-提供者(http/src/index.js:77:13)
在XMLHttpRequestEventTarget.dispatchEvent(/Volumes/Seagate/cqyh/ABC/node_模块/_xhr2@0.1.4@xhr2/lib/xhr2.js:64:18)
在XMLHttpRequest.\u setReadyState(/Volumes/segate/cqyh/ABC/node\u模块/_xhr2@0.1.4@xhr2/lib/xhr2.js:354:12)
在XMLHttpRequest.\u on HttpResponseed(/Volumes/segate/cqyh/ABC/node\u模块/_xhr2@0.1.4@xhr2/lib/xhr2.js:509:12)
在收到消息时。(/Volumes/Seagate/cqyh/ABC/node_模块/_xhr2@0.1.4@xhr2/lib/xhr2.js:469:24)
在emitNone(events.js:111:20)
在IncomingMessage.emit(events.js:208:7)
在endReadableNT(_stream_readable.js:1064:12)
at _combinedTickCallback(内部/流程/下一步_tick.js:138:11)
在进程中。_tickCallback(internal/process/next_tick.js:180:9)未定义

它在抱怨ABI,所以您可能应该将其与合同一起发布。我使用本地remix ide部署了合同,我手动测试了合同,没有问题。合同ABI没有问题。谢谢,这是关于ABI的,我已经解决了这个问题。您能告诉我问题出在哪里吗?我在这里也面临同样的问题@Jack Liu
new account: 0x7051ebDe6A252858A3E5b06Dc7608677B18EC093
------ Error: Couldn't decode uint8 from ABI: 0x
    at SolidityTypeUInt.formatOutputUInt [as _outputFormatter] (/Volumes/Seagate/cqyh/ABC/node_modules/_web3-eth-abi@1.0.0-beta.34@web3-eth-abi/src/formatters.js:174:15)
    at SolidityTypeUInt.SolidityType.decode (/Volumes/Seagate/cqyh/ABC/node_modules/_web3-eth-abi@1.0.0-beta.34@web3-eth-abi/src/type.js:252:17)
    at /Volumes/Seagate/cqyh/ABC/node_modules/_web3-eth-abi@1.0.0-beta.34@web3-eth-abi/src/index.js:327:49
    at Array.forEach (<anonymous>)
    at ABICoder.decodeParameters (/Volumes/Seagate/cqyh/ABC/node_modules/_web3-eth-abi@1.0.0-beta.34@web3-eth-abi/src/index.js:326:13)
    at Contract._decodeMethodReturn (/Volumes/Seagate/cqyh/ABC/node_modules/_web3-eth-contract@1.0.0-beta.34@web3-eth-contract/src/index.js:459:22)
    at Method.outputFormatter (/Volumes/Seagate/cqyh/ABC/node_modules/_web3-eth-contract@1.0.0-beta.34@web3-eth-contract/src/index.js:812:46)
    at Method.formatOutput (/Volumes/Seagate/cqyh/ABC/node_modules/_web3-core-method@1.0.0-beta.34@web3-core-method/src/index.js:163:54)
    at sendTxCallback (/Volumes/Seagate/cqyh/ABC/node_modules/_web3-core-method@1.0.0-beta.34@web3-core-method/src/index.js:475:33)
    at /Volumes/Seagate/cqyh/ABC/node_modules/_web3-core-requestmanager@1.0.0-beta.34@web3-core-requestmanager/src/index.js:147:9
    at XMLHttpRequest.request.onreadystatechange (/Volumes/Seagate/cqyh/ABC/node_modules/_web3-providers-http@1.0.0-beta.34@web3-providers-http/src/index.js:77:13)
    at XMLHttpRequestEventTarget.dispatchEvent (/Volumes/Seagate/cqyh/ABC/node_modules/_xhr2@0.1.4@xhr2/lib/xhr2.js:64:18)
    at XMLHttpRequest._setReadyState (/Volumes/Seagate/cqyh/ABC/node_modules/_xhr2@0.1.4@xhr2/lib/xhr2.js:354:12)
    at XMLHttpRequest._onHttpResponseEnd (/Volumes/Seagate/cqyh/ABC/node_modules/_xhr2@0.1.4@xhr2/lib/xhr2.js:509:12)
    at IncomingMessage.<anonymous> (/Volumes/Seagate/cqyh/ABC/node_modules/_xhr2@0.1.4@xhr2/lib/xhr2.js:469:24)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9) undefined