Open bomb-on opened 4 months ago
Related: #4104
Just to mention that I went through the linked issue myself before I reported mine and even tried to implement a logic where I would catch some of these errors (e.g. provider.on("debug", myDebugCatchingFunction);
or provider.on("error", myErrorCatchingFunction);
) but for some reason I just couldn't suppress constant printing out the whole error and stack trace so I thought I'm doing something wrong and decided to report here.
@bomb-on; Yeah, I couldn't find a proper fix either. As a temporary fix, using polling: true
option instead has been working for me.
@eshaan7 did that cause any duplicate events?
Ethers Version
6.13.1
Search Terms
provider, events, eth_getFilterChanges, eth_getLogs
Describe the Problem
I'm observing strange problems while using ethers v6 and trying to listen to events, staring with errors like
This is not happening if I switch to a "non-official" chain's RPC provider endpoint (details in the code snippet).
However, if I switch to a "non-official" RPC provider endpoint, I occasionally get an error
after which my script completely crashes.
None of this is happening if I use ethers v5 and an "official" RPC provider endpoint.
I would extremely appreciate if someone (@ricmoo probably would be the best) could clarify me few things here:
filter not found
error if I use ethers v6 and never in v5?requested to block 47918748 after last accepted block 47918747
error happening when I try to get transaction receipt and what is a suggested method to catch such error instead of experiencing crashes? Is a simpletry/catch
block within my listener enough?Code Snippet
Contract ABI
Errors
Environment
node.js (v12 or newer)
Environment (Other)
No response