Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uncaught Error: Returned values aren't valid, did it run Out of Gas?

I'm listening to events of my deployed contract. Whenever a transaction gets completed and event is fired receiving the response causes following error:

Uncaught Error: Returned values aren't valid, did it run Out of Gas? at ABICoder.push../node_modules/web3-eth-abi/src/index.js.ABICoder.decodeParameters (index.js:227) at ABICoder.push../node_modules/web3-eth-abi/src/index.js.ABICoder.decodeLog (index.js:277)

Web3 version: 1.0.0-beta36

Metamask version: 4.16.0

How to fix it?

like image 952
ferit Avatar asked Oct 23 '18 19:10

ferit


Video Answer


1 Answers

Before even checking your ABI or redeploying, check to make sure Metamask is connected to whichever network your contract is actually deployed too. I stepped away and while i was afk Metamask logged out, I guess I wasn't watching closely and I was connected to Ropsten when I working on localhost. Simple mistake, wasted an hour or so trying to figure it out. Hope this helps someone else out!

like image 55
7FigureSwagger Avatar answered Oct 23 '22 03:10

7FigureSwagger