Skip to content
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

Filter Exception, Invalid request: filter not found #1998

Open
0xPuddi opened this issue Jan 6, 2024 · 0 comments
Open

Filter Exception, Invalid request: filter not found #1998

0xPuddi opened this issue Jan 6, 2024 · 0 comments
Labels
bug A bug in behaviour or functionality

Comments

@0xPuddi
Copy link

0xPuddi commented Jan 6, 2024

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)
@0xPuddi 0xPuddi added the bug A bug in behaviour or functionality label Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug in behaviour or functionality
Projects
None yet
Development

No branches or pull requests

1 participant