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

getPastEvents Connection error #1906

Closed
wowprojector opened this issue Aug 29, 2018 · 7 comments
Closed

getPastEvents Connection error #1906

wowprojector opened this issue Aug 29, 2018 · 7 comments
Labels
In Progress Currently being worked on

Comments

@wowprojector
Copy link

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?

@fritzmatias
Copy link

Which version do you have installed ? Days ago a new release came out. Problematic for me, so I maintain the @beta.35.

@wowprojector
Copy link
Author

It was @beta.34 and I updated it to @beta.35.
Still not working.

@wowprojector
Copy link
Author

It is okay now without modifying anything. Is this reliable for real service?

@glemmaPaul
Copy link

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?

@wowprojector
Copy link
Author

I have never tried @beta.36 yet. Now it is just fine with @beta.35.
I am using infura rinkeby. However when problem occured, I tried with every provider but none of them worked properly.

@nivida
Copy link
Contributor

nivida commented Nov 28, 2018

I think this PR #1966 will solve your issue. Web3 has some problems with the socket connection.

@nivida nivida added the In Progress Currently being worked on label Nov 28, 2018
@nivida
Copy link
Contributor

nivida commented Apr 2, 2019

This got fixed with the new WebsocketProvider.

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

No branches or pull requests

4 participants