-
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 "Returned values aren't valid, did it run Out of Gas" not fixed in v1.2.1 #3134
Comments
@barakman Hi. The JSON-RPC hex encoding section describes a set of valid and invalid If you:
The return values from the client are:
Those trigger the error because they don't meet the The message wording makes some sense as a design decision because the return value is "invalid". Additionally the ABI's return values description (e.g (There's no message from the node, unfortunately.) I was not able to reproduce a case where under-funding a call was handled by this error logic though, so I'm not sure the gas part makes sense. But maybe there is one.... @barakman What is your view of this? |
@cgewecke : Hi, thank you for your response. Here are my main points: First, with regards to There's no message from the node, unfortunately - actually, there is. Searching my local
Second, with regards to The message wording makes some sense as a design decision because the return value is "invalid" - I can't argue about design decisions because I did not design this system. But in terms of user-perspective, I believe that the message makes no sense at all and is even misleading, as this is NOT a gas issue. If anything, it is the previous message which makes sense because the error is clearly the result of a failure to decode the ABI. To prove this to you, I will refer once again to the Steps to reproduce the behavior part in my post: On mainnet, the contract at address 0x5894110995b8c8401bd38262ba0c8ee41d4e4658 does not implement This is clearly:
Which is why I believe that the error message on web3 1.0.0-beta.34 is correct and the error message on web3 1.2.1 is wrong. In addition to that, at least according to my own investigation, the Thanks :) Update: for all it matters, I am using Update #2: perhaps the
(I missed it earlier due to the extra backslash). So I suppose that it could be coming either from the provider or from the client. Thanks again, and apologies for the confusion. |
@barakman Have opened #3161 as possible middle-ground solution. Please feel free to advise there.
Yes I believe the error handling logic in the ganache pack is from an older version of Web3 being included there as a dev dependency, caught up in the bundle because they're using npm shrinkwrap. So it points back here... |
Addressed by #3161, closing. |
I'm getting this error when trying to retrieve a value from a mapping(byte32 => string) (using the default get function) from a CircleCI test. All tests work on local and in Remix. I've checked and the contract address and contract instance are correct, any clue as to why this might be happening? |
@manuel114 : What is the contract address, what is the function name and what network are you on? |
The contract address is 0x9d745FfDb0520242Edb2e5ccCB2b76641A6db145 The mapping key I've been using for the call is 0xdb25dfeb9fc9ced411d0f50165943d3d62d75cc9ba2dac14a2ef9ba950e40df5 |
@manuel114:
For all it matters, I am using web3.js v1.2.1. |
Hey @barakman, Thanks for having a look at it! The weirdest thing about it is that I only get the error when running the code in CircleCi. I've tried the same test on both local and remix and it always works fine, but using the same code in CircleCi seems to break it. |
@barakman hi! I'm wondering, why I'm getting this error when making call of getConvertibleTokens() on 0x85e27A5718382F32238497e78b4A40DD778ab847 contract? I'm using ABI from Web3 1.2.2 |
@DmitryPogodaev: |
Works fine for me:
I'm on web3.js v1.2.1, so maybe the problem is in web3.js v1.2.2. Any chance you're using |
@barakman, You are right. I've tried infura node and got results. Parity returning this "out of gas" error. |
@DmitryPogodaev: |
@barakman, I was trying to make less calls, but if this won't work, I will try to fetch it in series. |
@DmitryPogodaev: |
Description
This error is reported in details at issue #1916.
Users mention the fact that it dates back as far as v1.0.0-beta.35 or v1.0.0-beta.36.
I know for a fact that it doesn't occur at v1.0.0-beta.34.
It was supposedly fixed at PR #2608 for v2.0.0-alpha.1 and v1.0.0-beta.52.
Unfortunately, it doesn't seem to be fixed on v1.2.1.
Expected behavior
Calling a method which is viable in the ABI but not in the bytecode, should result with an error-message starting with
Couldn't decode
.For example:
Couldn't decode uint16 from ABI: 0x
.AFAIK, this error is routed all the way from the provider itself (rather than being generated by the web3 client code).
Actual behavior
Calling a method which is viable in the ABI but not in the bytecode, results with an error-message
Returned values aren't valid, did it run Out of Gas?
, which is implemented in functionABICoder.prototype.decodeParameters
(as part of the web3 client code).Steps to reproduce the behavior
Install either web3 1.0.0-beta.34 or web3 1.2.1, and run the following script via NodeJS:
With web3 1.0.0-beta.34, the error message is
Couldn't decode uint16 from ABI: 0x
.With web3 1.2.1, the error message is
Returned values aren't valid, did it run Out of Gas?
.Again, I think that the former is generated on the Web3 provider side (i.e., by the node), while the latter is generated by the Web3 client (i.e., in web3.js code).
Hence I believe that the former is desirable while the latter isn't.
Thanks
Versions
The text was updated successfully, but these errors were encountered: