-
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
[web3@1.0.0-beta.41] getPastEvents not working - {"code":-32603,"message":"request failed or timed out"} #2311
Comments
same for me. |
@ironbyte are you using an Infura node? |
@Sm00g15 Yep, I use an Infura WSS endpoint (wss://mainnet.infura.io/ws/v3/YOUR-PROJECT-ID) |
@ironbyte same here. I also tried switching to an HTTP provider and no dice |
The same error did just appear. This error does only appear if the infura node does take to long until it got all the past event logs or when it can't find past logs. I would recommend to configure the timeout time of the provider with the option properties you can pass to the provider. |
@ironbyte any luck on your end? |
#2000 ; looks like this will fix it @nivida . Any idea when these changes will go live? After updating the provider options I'm now hitting this error:
|
The error indeed indicates that the node timed out when processing the request. However, the issue lies in the fact that with the recent library refactoring the contract address does not get added to the request parameters anymore! Thus, the events of all contracts on the chain will be queried, which is not hard to imagine to hit a timeout quickly 😃 Please reopen this issue. |
@Sm00g15 Hey, I've already downgraded back to web3@1.0.0.beta-37. Everything works on this version on my end. I will try a different provider on beta 41 later today. Will report if anything interesting happens. |
@ironbyte @mistersandman @nivida - based on @mistersandman 's comment above I've opened up a new issue here: #2337 |
@mistersandman can we fix this by manually adding the contract address to the parameters? My site has been down for days from this issue EDIT: This issue was resolved by upgrading my Infura node to the latest V3 REST API |
Expected behavior
Fetch all past events starting with a given block number
Actual behavior
It always return the following error:
Error: Node error: {"code":-32603,"message":"request failed or timed out"}
Downgrading back to web3@1.0.0-beta.37 fixes the issue.
Steps to reproduce the behavior
Error Logs
Versions
[NPM, Node, Web3.js, OS, device...]
web3@1.0.0-beta.41
node@v8.14.0
npm@6.5.0
OS: Linux/Ubuntu 18.04
The text was updated successfully, but these errors were encountered: