-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Error on Events triggering #3767
Comments
The problem seems to be that the specified backend does not support the In v5, polling was always used, which is why it continues to work. In v6, it is supposed to detect this and fallback onto polling, so I'm looking into why it isn't. I think it has to do with detection. When Geth doesn't support filters, it returns a |
Where did you need?
|
This should be fixed now. Let me know if you have any more issues. Thanks! :) |
Just tested and seems to be working on JsonRPC but still same error if i try with a websocket. |
Thanks! I’ll look into it shortly. |
I think it might be a little more difficult to support a connection-based provider. It seems strange to me that something that supports long-lived connections doesn’t support filters. Do you have a websocket url I can test against? |
Hello @ricmoo , I am having almost the exact same issue while listening for the "PairCreated" event from the Uniswap v2 Factory with the new 6.0.5 version. Here is the error message:
And here is some of my code:
|
@FancyLobster what network and provider are you using? |
Ethereum and Quicknode
-------- Original message --------From: Richard Moore ***@***.***> Date: 2/19/23 6:47 PM (GMT-06:00) To: "ethers-io/ethers.js" ***@***.***> Cc: William ***@***.***>, Mention ***@***.***> Subject: Re: [ethers-io/ethers.js] Error on Events triggering (Issue #3767)
@FancyLobster what network and provider are you using?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
hello @ricmoo. Have the same issue while listening from websocket connection
The error: uncaughtException: unknown ProviderEvent (argument="event", value="{"topics":["0xb7cfccdb200d3b32433aeb5d2b829c5191534e3602213c2fbb1d2de273a91f20"],"address":["0x1aeca9d86feba74b2c10ff6ed859f11375df87db"]}", code=INVALID_ARGUMENT, version=6.0.5) V5 working without any problems, please assist here |
@saccura which network and provider are you using? I’ll look into this asap. |
It is private Geth clone, custom contracts. |
@saccura WebSocketProvider? IpcProvider? JsonRpcProvider? Any additional details are helpful tracking issues down. |
WebSocketProvider |
Here is my factory provider:
May be provider.websocket works differently in v6? |
I am having the exact same issue the others are having with WebSocketProvider. [network=BSC][provider=getblock] |
Have the same issue as well with QuickNode WebSocket on 6.0.8.
|
I'm testing something on sepolia and I'm missing the event object in the callback. :( contract.on("Transfer", async (from, to, tokenId, event) => {
console.log(event) // undefined :( |
In version 6.1, the problem remains, the same error. It does not depend on the provider, in HTTP listening works correctly, and in WSS there is an error on the event: "TypeError: unknown ProviderEvent (argument="event", value="{"topics":["0x..."],"address":["0x..."]}", code=INVALID_ARGUMENT, version=6.1.0)" . Please fix it |
I also have that problem in version 6.1.0. |
Yes, thanks for the information, I know about it. But currently I have migrated a large amount of code to version 6, so there is no way to go back to 5.7.2. Unfortunately, I had to use another library for now. But I believe in developers and I'm waiting for updates! |
This is still happening in
Also it's not a critical error, why even cause an exception that is impossible to try catch, app just crashes for no reason when it can recover if otherwise. |
Sorry. Lost track of this. I will look into it today. |
Found the single-character bug causing this in the SocketEventSubscriber. I'll get this out shortly. :) |
This should now be fixed for WebSocketProvider in v6.2.3. Please try it out and let me know if there are further issues. Thanks! :) |
Closing as fixed. But if any further problems occur, let me know. Thanks! :) |
@ricmoo I have issue while listening to PairCreated event in pancakeswap v2 factory, i use JsonRpcProvider, my network is BSC and my ethers version is 5.7.0 ,when i run code nothing happens , i don't get any errors but i don't get new pairs which are created. could you please help me?!
|
Ethers Version
6.02
Search Terms
events, event
Describe the Problem
While creating event listeners upon receipt of event an error occurs. Simplified example provided.
This is occurring for multiple contracts and events. Switching to v5.7.2 the events work fine.
Code Snippet
Contract ABI
[ "event Transfer(address indexed from, address indexed to, uint amount)" ]
Errors
Environment
node.js (v12 or newer)
Environment (Other)
No response
The text was updated successfully, but these errors were encountered: