Skip to content
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

Weird error under load #521

Closed
roderik opened this issue May 22, 2019 · 8 comments
Closed

Weird error under load #521

roderik opened this issue May 22, 2019 · 8 comments

Comments

@roderik
Copy link

roderik commented May 22, 2019

Error: invalid data for function output and the reason is undefined.

I think it might be a timeout or something, but I'm unsure how to even track this down.

{ error: { Error: invalid data for function output (arg="data", errorArg=undefined, errorValue=undefined, value="0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000336469643a64656d6f3a706861726d617061636b3a363638323830303330303203f15cd7d5046041ce9f2b7feda8d8717542d57500000000000000000000000000", reason=undefined, version=4.0.27)
22/05/2019 18:09:35       at Object.throwError (/srv/node_modules/ethers/errors.js:76:17)
22/05/2019 18:09:35       at _FunctionDescription.decode (/srv/node_modules/ethers/utils/interface.js:98:20)
22/05/2019 18:09:35       at /srv/node_modules/ethers/contract.js:174:45
22/05/2019 18:09:35       at processTicksAndRejections (internal/process/task_queues.js:86:5) reason: undefined, code: 'INVALID_ARGUMENT', arg: 'data', errorArg: undefined, errorValue: undefined, value: '0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000336469643a64656d6f3a706861726d617061636b3a363638323830303330303203f15cd7d5046041ce9f2b7feda8d8717542d57500000000000000000000000000' } }
22/```
@ricmoo
Copy link
Member

ricmoo commented May 22, 2019

Can you provide more context? And some code that causes this? :)

@roderik
Copy link
Author

roderik commented May 22, 2019

The code does not really help I'm afraid. The service throwing this (sporadically) is a microservice that mirrors all public methods of an ABI with no inputs to the database. It connects to two load balanced Parity nodes.

The code has been working fine for months, and currently, as well, it is just that "sometimes" (annoying, I know) and as far as I can tell not for the same contract each time, it throws this error.

I do know that the nodes are under some load, and doing truffle migrations every now and again I also get Error: Invalid JSON RPC response: "", known as, node is overextended.

Since everything is undefined, I'm guessing that for the same reason it gets back either a gateway error on request, with maybe even some HTML returned from an error page.

  • I wonder if it would be possible to get Ethers to log the RPC response?
  • And I'm unsure what the value in the error message is, is that the actual response? That would mean that the request succeeded and there is an issue decoding that data?

@ricmoo
Copy link
Member

ricmoo commented May 22, 2019

In v4 you can do provider.on(“debug", (info) => { }) which will log all requests. I think v5 logs both requests and responses to that event; if not I’ll make sure today that it does. :)

@roderik
Copy link
Author

roderik commented May 22, 2019

Ok, adding that in, let's see where it gets us! using v4, any reason to upgrade to v5 yet?

@ricmoo
Copy link
Member

ricmoo commented May 22, 2019

V5 is very unstable I’m fixing an issue where contract evens cause errors right now. Unless you consider instability a feature, I would stick with v4 unless you need a v5 feature. :)

@roderik
Copy link
Author

roderik commented May 22, 2019

hehe ok, will keep on v4 :)

@ricmoo
Copy link
Member

ricmoo commented Sep 8, 2019

Did you ever find out more about the cause of this?

@roderik
Copy link
Author

roderik commented Sep 9, 2019

Yes, but for the life of me I cannot remember. Searched the git log but no dice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants