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

Listening for any event ("*") with WebSocketProvider generates mysterious error #785

Closed
bbarton opened this issue Apr 16, 2020 · 3 comments
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published.

Comments

@bbarton
Copy link

bbarton commented Apr 16, 2020

Hi @ricmoo ,

When listening for any event ("*") using the WebSocketProvider, the server seems to hang on startup (not when an event comes in). Any idea why this may be the case?

I'm now on 5.0.0-beta.181.

var wsProvider = new ethers.providers.WebSocketProvider("wss://rinkeby.infura.io/ws/v3/my_id_here");
let contract = new ethers.Contract(rinkebyAddress, CONTRACT_ABI, wsProvider);

contract.on("*", (from, to, value, event) => {
  console.log("from: ", from);
});

console.log("hi"); // This is never called when server is started

@ricmoo ricmoo added investigate Under investigation and may be a bug. bug Verified to be an issue. on-deck This Enhancement or Bug is currently being worked on. and removed investigate Under investigation and may be a bug. labels Apr 16, 2020
@ricmoo
Copy link
Member

ricmoo commented Apr 16, 2020

I've reproduced it. Working on it now... :)

@ricmoo ricmoo added fixed/complete This Bug is fixed or Enhancement is complete and published. and removed on-deck This Enhancement or Bug is currently being worked on. labels Apr 17, 2020
@ricmoo
Copy link
Member

ricmoo commented Apr 17, 2020

Heya! Try out 5.0.0-beta.182 and let me know if that works better.

Thanks for finding all these bugs... Keep 'em, coming. ;)

@bbarton
Copy link
Author

bbarton commented Apr 17, 2020

Thanks @ricmoo ! The wildcard is working now. Appreciate your fast fix.

@bbarton bbarton closed this as completed Apr 17, 2020
michaeltout pushed a commit to michaeltout/ethers.js that referenced this issue Aug 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published.
Projects
None yet
Development

No branches or pull requests

2 participants