-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Couldn't decode uint256 from ABI: 0x #1629
Comments
I have the same issue. I'm using MetaMask if that helps. I noticed that it seemed to be occurring for a transaction whose recipient 'to' was 0x0000... |
@asselstine you got an error reading a transaction? |
I’m sure it was a transaction. I identified a transaction that had a blank
“to” and would throw the “can’t decode 0x” error.
I’m still digging in.
…On Mon, May 14, 2018 at 5:48 PM quantumproducer ***@***.***> wrote:
@asselstine <https://github.com/asselstine> you got an error reading a
transaction?
Do you get the same error when reading from a smart contract?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1629 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEDQTP7kNDS5ww2QR3J_YZ9YoiDj3KK1ks5tyiX5gaJpZM4T9DRN>
.
|
@asselstine , according to https://ethereum.stackexchange.com/questions/48431/error-couldnt-decode-uint256-from-abi-0x/48518#48518 "Your code works in Infura" .. I tried out in Metamask too, per https://www.reddit.com/r/ethdev/comments/8jgyes/why_is_web3_returning_0x_for_my_contract_calls/ (needs 0.2 API calls for Web3) |
I reset my local Ganache instance and it seemed to resolve the issue. At least for now ;) |
@asselstine is your geth synced? I'm reading elsewhere that your geth node needs to be synced. Unable to sync: ethereum/mist#3097 |
@quantumproducer I've isolated the problem down to one thing: An eth_call message is being sent to the node with a zero I.e.: eth_call: It really doesn't like that. The error may be in my code...I'm investigating. Regardless it would be handy for web3 to complain if 'to' is null. |
I can confirm: one of my Truffle artifacts was not deployed to the network I was on. Sending eth_call to the zero addresses results in the '0x' encoding issue. |
I got problem same as when I testing Example
|
same problem |
A VM exception in a constant function call will cause Web3 to throw
|
I'm getting this error with mainnet infura, but not in ropsten infura. Using web3@1.0.0.beta.33:
|
Same problem here using Geth 1.8 and web3@1.0.0.beta.33 when trying to invoca a call |
I am having same issue what is status of ticket? I am using web3@1.0.0.0.beta.34 Code
Error
|
Try syncing... I ended up using parity because geth doesn't work on harddisks |
I'm connecting to infura so parity and geth are irrelevant in my case. |
The different Ether network (Main Ethereum Network、 Ropsten Test Network、private Network、 private Network) have different contractAddress. so change contractAddress |
indeed turns out this was happening because i was mistakenly connected to a different testnet than the one i thought i was! i believe ideally a more friendly error could be yielded, such as 'not found' or 'not existent' something a little bit less cryptic |
For posterity (in case anyone else happens upon this with a similar challenge) I was also struggling with this problem just now and it turned out to be self-sabotage; I tested the Destructible pattern on my Rinkeby test ERC20 token before I deployed an update to mainnet by calling the "destroy()" method and then forgot I did that. So my Rinkeby token contract address was correct - as was my ABI. But the token had been invalidated. |
This got fixed with the PR #2608 and will be released asap. |
Hi, am also having the same issue and I got this error from my browser web3.min.js:1 Uncaught (in promise) Error: Couldn't decode from ABI: 0x Am using these versions By using this web3 version I got another error from the browser. index.js:338 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. so I changed my web3 version to this cdn. https://cdn.jsdelivr.net/gh/ethereum/web3.js@1.0.0-beta.34/dist/web3.min.js Please help me to solve this issue and am very new to this tech. So, I hope, I will get a detailed explanation about this issue. Thanks in Advance. |
I created this Contract:
https://etherscan.io/address/0xfc7e86dbd205d02f97316995d8ace5d0afb9fe62#readContract
You can see in the Read Contract section that ownersNum is a uint with a current value of 1.
I copied the address
0xFc7e86dBD205D02F97316995d8AcE5D0AFB9fe62 and validated with https://tokenmarket.net/
ethereum-address-validator
In my node server, I created abi.js and copied the abi from etherscan
Now I try to read the ownersNum value in memory:
And this happens
This used to work fine while I was testing on Kovan. Now I switch to MainNet, upgrade web3, getting this error. I was on beta27, upgraded today to 34, same error, slightly different printout but same result.
The text was updated successfully, but these errors were encountered: