UnhandledPromiseRejectionWarning: Error: Returned values aren't valid, did it run Out of Gas
Zaryab-Programmer opened this issue · comments
I am facing this issue. Anyone can help me to resolve, I am trying to run the arbitrage.js project -> https://github.com/jklepatch/eattheblocks/tree/master/profitable-flashloans/30-make-arbitrage-script-run-247
UnhandledPromiseRejectionWarning: 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.decodeParameters (/home/zaryab/Project/make-arbitrage-script-run/node_modules/web3-eth-abi/src/index.js:332:15)
at Contract._decodeMethodReturn (/home/zaryab/Project/make-arbitrage-script-run/node_modules/web3-eth-contract/src/index.js:572:22)
at Method.outputFormatter (/home/zaryab/Project/make-arbitrage-script-run/node_modules/web3-eth-contract/src/index.js:932:42)
at Method.formatOutput (/home/zaryab/Project/make-arbitrage-script-run/node_modules/web3-core-method/src/index.js:169:54)
at sendTxCallback (/home/zaryab/Project/make-arbitrage-script-run/node_modules/web3-core-method/src/index.js:640:33)
at Object.callback (/home/zaryab/Project/make-arbitrage-script-run/node_modules/web3-core-requestmanager/src/index.js:177:9)
at /home/zaryab/Project/make-arbitrage-script-run/node_modules/web3-providers-ws/src/index.js:133:41
at Array.forEach ()
at WebsocketProvider._onMessage (/home/zaryab/Project/make-arbitrage-script-run/node_modules/web3-providers-ws/src/index.js:118:69)
at W3CWebSocket._dispatchEvent [as dispatchEvent] (/home/zaryab/Project/make-arbitrage-script-run/node_modules/yaeti/lib/EventTarget.js:115:12)
at W3CWebSocket.onMessage (/home/zaryab/Project/make-arbitrage-script-run/node_modules/websocket/lib/W3CWebSocket.js:234:14)
at WebSocketConnection. (/home/zaryab/Project/make-arbitrage-script-run/node_modules/websocket/lib/W3CWebSocket.js:205:19)
at WebSocketConnection.emit (events.js:198:13)
at WebSocketConnection.processFrame (/home/zaryab/Project/make-arbitrage-script-run/node_modules/websocket/lib/WebSocketConnection.js:554:26)
at /home/zaryab/Project/make-arbitrage-script-run/node_modules/websocket/lib/WebSocketConnection.js:323:40
at process._tickCallback (internal/process/next_tick.js:61:11)
(node:29896) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:29896) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.