-
Notifications
You must be signed in to change notification settings - Fork 4
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
Can't open a websocket connection to my ethereum node #2
Comments
It's possible that |
I do see same issue working for HttpProvider and not working for Websocket provider with ethers, where as with web3 no issues for websocket connection. With ethers if we use Web3Provider instead of WebSocketProvider is working fine something like
|
I don't think this is actually working, I mean the code is not breaking anywhere but if you do something like
then you will see that the provider is not working as intended |
yes both variables are correctly set up |
I tried with poll instead of pending which is working.
|
+1 to this issue, websocket and http connections are working with web3, but websocket is failing with ethers |
Hi @heyitaki, @cavernec, @uireactdev, sorry about the delay catching up here. Let me investigate that for you. Amazon Managed Blockchain definitely supports pending transaction at the RPC level. Some questions:
Let me debug that and come up with a working code. |
hi @evertonfraga, thanks for looking into this ! I am indeed running the code from Node.js, not sure about others people though |
Working around this for now by using web3 wrapper instead of ethers |
I have the same error with nodejs and ethers. |
Running all my code in node.js locally. I'd like to suggest the ethers example be removed from the docs until this is resolved as it is missing basic functionality. Unfortunately, this wasted a couple hours for me. I usually check the issues on open source projects but since this came from Amazon I guess my expectations were a little higher. I can't use ethers + WS to monitor pending transactions or monitor anything from contracts. One Example: set up an event listener for '*' on a Uniswap pool contract (here's a fairly active one 0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640) You'll get nothing from the listener. |
do this instead let provider = new ethers.providers.WebSocketProvider(baseProvider.connection); |
Hi,
The following piece of code is failing
const { ethers } = require("ethers"); const AWSWebsocketProvider = require('@aws/web3-ws-provider'); const endpoint = process.env.AMB_WS_ENDPOINT; const baseProvider = new AWSWebsocketProvider(endpoint); const provider = new ethers.providers.WebSocketProvider(baseProvider)
with error
I have the right credentials exported in my ~.bashrc file because the following piece of code is working fine 👍
const { ethers } = require("ethers"); const AWSHttpProvider = require('@aws/web3-http-provider'); const endpoint = process.env.AMB_HTTP_ENDPOINT; const baseProvider = new AWSHttpProvider(endpoint); const provider = new ethers.providers.Web3Provider(baseProvider);
Would you please have any idea what's going on ?
Thanks !
The text was updated successfully, but these errors were encountered: