-
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
issue with websocket connection to infura #1646
Comments
Can you determine when exactly this is happening? It's a bit hard to reproduce it this way. |
I got the same issue, my code works with provider: "wss://ropsten.infura.io/ws" (testnet), but it doesn't work with "wss://mainnet.infura.io/ws". |
I also had the same issue with "wss://rinkeby.infura.io/ws". |
added some other details for same issue found here at INFURA/infura#140 |
I'm having the same issue (using Kovan WS endpoint). It's extremely sporatic... About 25% of the time it works fine, and the other 75% it throws the I'll run my program once and it will fail, and then again with no changes and it will fail. Hard to see if this is an issue with Infura, or somewhere lower in the stack like the WS driver. |
I also get this almost exclusive failing with the latest version of web3 |
I have also found that adding this config fixed it - taken direct from #1217
|
@jamesmorgan I've refactored the web3 providers and especially the WebsocketProvider (PR #2000). I will release this PR within the next days and probably this issue got fixed with it. I can't see anything that Web3.js is doing which could have an impact on establishing a connection. |
No further issue mentions for over a year, will close for now. Feel free to reopen. |
I use websocket (ws) coneection to Infura node
web3 = new Web3(new Web3.providers.WebsocketProvider("wss://ropsten.infura.io/ws"));
sometimes it's works fine or sometimes it give error on console :
Error: CONNECTION ERROR: Couldn't connect to node on WS.
Uncaught (in promise) Error: CONNECTION ERROR: Couldn't connect to node on WS.
I am not getting why its happening.
The text was updated successfully, but these errors were encountered: