This repository was archived by the owner on Mar 5, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
getPastEvents Connection error #1906
Labels
In Progress
Currently being worked on
Comments
Which version do you have installed ? Days ago a new release came out. Problematic for me, so I maintain the @beta.35. |
It was @beta.34 and I updated it to @beta.35. |
It is okay now without modifying anything. Is this reliable for real service? |
Hey @wowprojector have you tried using @beta.36 already? Can I also get your web3 provider info, is this a local geth node or something like infura service? |
I have never tried @beta.36 yet. Now it is just fine with @beta.35. |
I think this PR #1966 will solve your issue. Web3 has some problems with the socket connection. |
This got fixed with the new WebsocketProvider. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
https://web3js.readthedocs.io/en/1.0/web3-eth-contract.html#getpastevents
I wrote the code exactly the same one with example code.
And it works perfectly before few days ago.
But now I get the connection error most of the time when I try to call it.
contract.getPastEvents('Transfer', {
fromBlock: 0,
toBlock: "latest",
filter: {
isError: 0,
txreceipt_status: 1,
[type]: toAddress
}
}, function(error, events){
});
Very simple code, worked well just few days ago.
I still can get the returned value from time to time, chances like about 1 out of 10.
So I assume that it's not the code issue.
And it also takes few seconds to get it.
Except for getPastEvents, everything works well such as check balance, sending transaction.
So I assume that there is no problem with global settings.
Any assumption for this problem?
The text was updated successfully, but these errors were encountered: