web3j
web3j copied to clipboard
Filter Exception, Invalid request: filter not found
Filter Exception, Invalid request: filter not found
I'm using a custom contract customEventFlowable(filter).subscribe(()->{...}) to filter through that event, the filter is created by:
EthFilter eFilter = new EthFilter(DefaultBlockParameterName.LATEST, DefaultBlockParameterName.LATEST, contractAddress);
eFilter.addSingleTopic(EventEncoder.encode(Contract.CUSTOM_EVENT));
The odd thing is that I run it multiple times and once it went through without error. I have no idea how to solve it, as the event is being added to the event filter.
Environment
Describe the environment in which the issue occurs
- Web3j 4.9.8
- Java 17.0.9
- Operating System, MacOS M2
Additional context
Stacktrace:
org.web3j.protocol.core.filters.FilterException: Invalid request: filter not found
at org.web3j.protocol.core.filters.Filter.throwException(Filter.java:200)
at org.web3j.protocol.core.filters.Filter.getInitialFilterLogs(Filter.java:123)
at org.web3j.protocol.core.filters.Filter.run(Filter.java:72)
at org.web3j.protocol.rx.JsonRpc2_0Rx.run(JsonRpc2_0Rx.java:89)
at org.web3j.protocol.rx.JsonRpc2_0Rx.lambda$ethLogFlowable$2(JsonRpc2_0Rx.java:79)
at io.reactivex.internal.operators.flowable.FlowableCreate.subscribeActual(FlowableCreate.java:71)
at io.reactivex.Flowable.subscribe(Flowable.java:14479)
at io.reactivex.internal.operators.flowable.FlowableMap.subscribeActual(FlowableMap.java:37)
at io.reactivex.Flowable.subscribe(Flowable.java:14479)
at io.reactivex.Flowable.subscribe(Flowable.java:14416)
at io.reactivex.Flowable.subscribe(Flowable.java:14337)
Were you able to find a solution for this?