Skip to content

java.util.concurrent.ExecutionException: org.a2aproject.sdk.spec.TaskNotFoundError: Task not found error after upgrade to 1.3.0.Final #1125

Description

@mescaja

I have an 1.2.0.Final A2A client agent and a Server agent working ok. Decided to bump them both to 1.3.0.Final and that cause this issue.

The reproducer consists of 3 quarkus apps. Unzip the 3 files to a local folder for instance /home/admin/A2A.

Upgrading the A2A Client agent to 1.3.0.Final does not break anything. The issue comes up when the A2A Server Agent is bumped from 1.2.0.Final to 1.3.0.Final.

step 1: start up keycloak

cd /home/admin/A2A/keycloak-reproducer
./mvnw quarkus:dev

this starts up Keycloak on port 9001. You need to wait till Keycloak is fully up and running otherwise the other 2 apps won't start up due to the OIDC extension dependency on the Idp being available.

step 2: start up A2A Server Agent

cd /home/admin/A2A/a2a-server-agent-reproducer
./mvnw quarkus:dev

this starts up the A2A Server agent on port 8001

step 3: start up A2A Client Agent

cd /home/admin/A2A/a2a-client-agent-reproducer
./mvnw quarkus:dev

this starts up the A2A Client agent on port 7001

step 4: test

go to http://localhost:7001/keycloak/hello
browser should be redirected to keycloak login page
log on as bob/bob or alice/alice
the page should render "Hello from Quarkus REST - A2A Client Agent: Hello from A2A Server Agent: Miguel"

Step 5: reproduce the issue

edit the pom.xml file under the a2a-server-agent-reproducer quarkus app
reset version to 1.3.0.Final
Save and retest
go to http://localhost:7001/keycloak/hello
log on as bob/bob or alice/alice

this error comes back

Streaming error occurred: Task not found
org.a2aproject.sdk.spec.TaskNotFoundError: Task not found
	at org.a2aproject.sdk.grpc.utils.JSONRPCUtils.processError(JSONRPCUtils.java:428)
	at org.a2aproject.sdk.grpc.utils.JSONRPCUtils.parseResponseEvent(JSONRPCUtils.java:292)
	at org.a2aproject.sdk.client.transport.jsonrpc.sse.SSEEventListener.parseAndHandleMessage(SSEEventListener.java:62)
	at org.a2aproject.sdk.client.transport.jsonrpc.sse.SSEEventListener.onMessage(SSEEventListener.java:33)
	at org.a2aproject.sdk.client.transport.jsonrpc.JSONRPCTransport.lambda$sendMessageStreaming$0(JSONRPCTransport.java:125)
	at org.a2aproject.sdk.client.http.ServerSentEventParser.dispatchEvent(ServerSentEventParser.java:170)
	at org.a2aproject.sdk.client.http.ServerSentEventParser.processLine(ServerSentEventParser.java:71)
	at org.a2aproject.sdk.client.http.JdkA2AHttpClient$JdkBuilder$1.onNext(JdkA2AHttpClient.java:183)
	at org.a2aproject.sdk.client.http.JdkA2AHttpClient$JdkBuilder$1.onNext(JdkA2AHttpClient.java:170)
	at java.net.http/jdk.internal.net.http.LineSubscriberAdapter$LineSubscription.loop(LineSubscriberAdapter.java:447)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler$LockingRestartableTask.run(SequentialScheduler.java:182)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask.run(SequentialScheduler.java:149)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:207)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:280)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:233)
	at java.net.http/jdk.internal.net.http.LineSubscriberAdapter$LineSubscription.submit(LineSubscriberAdapter.java:188)
	at java.net.http/jdk.internal.net.http.LineSubscriberAdapter.onNext(LineSubscriberAdapter.java:95)
	at java.net.http/jdk.internal.net.http.LineSubscriberAdapter.onNext(LineSubscriberAdapter.java:53)
	at java.net.http/jdk.internal.net.http.common.HttpBodySubscriberWrapper.onNext(HttpBodySubscriberWrapper.java:391)
	at java.net.http/jdk.internal.net.http.common.HttpBodySubscriberWrapper.onNext(HttpBodySubscriberWrapper.java:49)
	at java.net.http/jdk.internal.net.http.Stream.schedule(Stream.java:239)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler$LockingRestartableTask.run(SequentialScheduler.java:182)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask.run(SequentialScheduler.java:149)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:207)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:280)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:233)
	at java.net.http/jdk.internal.net.http.Stream.receiveDataFrame(Stream.java:427)
	at java.net.http/jdk.internal.net.http.Stream.incoming(Stream.java:578)
	at java.net.http/jdk.internal.net.http.Http2Connection.processFrame(Http2Connection.java:1072)
	at java.net.http/jdk.internal.net.http.frame.FramesDecoder.decode(FramesDecoder.java:155)
	at java.net.http/jdk.internal.net.http.Http2Connection$FramesController.processReceivedData(Http2Connection.java:318)
	at java.net.http/jdk.internal.net.http.Http2Connection.asyncReceive(Http2Connection.java:871)
	at java.net.http/jdk.internal.net.http.Http2Connection$Http2TubeSubscriber.processQueue(Http2Connection.java:1840)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler$LockingRestartableTask.run(SequentialScheduler.java:182)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask.run(SequentialScheduler.java:149)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:207)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
	at java.base/java.lang.Thread.run(Thread.java:1474)
An error occurred: org.a2aproject.sdk.spec.TaskNotFoundError: Task not found
Streamming Completed. 
java.util.concurrent.ExecutionException: org.a2aproject.sdk.spec.TaskNotFoundError: Task not found
	at java.base/java.util.concurrent.CompletableFuture.wrapInExecutionException(CompletableFuture.java:345)
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:440)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2094)
	at org.acme.TestClientAgent.callAgent(TestClientAgent.java:88)
	at org.acme.TestClientAgent_ClientProxy.callAgent(Unknown Source)
	at org.acme.GreetingResource.helloProtected(GreetingResource.java:37)
	at org.acme.GreetingResource$quarkusrestinvoker$helloProtected_0e4d8b73cb0193072504e312802bc58af0469e5c.invoke(Unknown Source)
	at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
	at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:195)
	at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:150)
	at io.quarkus.vertx.core.runtime.VertxCoreRecorder$15.runWith(VertxCoreRecorder.java:695)
	at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2651)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2630)
	at org.jboss.threads.EnhancedQueueExecutor.runThreadBody(EnhancedQueueExecutor.java:1622)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1589)
	at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:11)
	at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:11)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:1474)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions