Command 'ASSIGN' rejected with code 'NOT_FOUND': Expected to assign user task with key, but no such user task was found

Camunda 8.6.10 configured with tenants. A local installation with Kind K8s cluster using official Helm charts. The Zeebe and Operate work as expected.

But the Tasklist not.

The task is in the Tasklist visible:

However if you try to assign it, it is not possible and in the log of the tasklist pod we can see the following:
Command 'ASSIGN' rejected with code 'NOT_FOUND': Expected to assign user task with key, but no such user task was found

What is the problem?

@Adam_Boczek While modeling the user task have you configured the task type as “Job Worker” or “Zeebe/Camunda User Task” ?

For job worker based user task you need to use tasklist v1 api’s and for “Zeebe/Camunda User task” use tasklist v2 api.

It is a ZEEBE_USER_TASK according to the information we get over the API:

GET http://localhost:8082/v1/tasks/2251799813686176

HTTP/1.1 200 
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Security-Policy: default-src 'self';connect-src 'self' https: *.mixpanel.com cloudflareinsights.com *.appcues.net wss://api.appcues.net;script-src 'self' https: *.chargebee.com *.mixpanel.com ajax.cloudflare.com static.cloudflareinsights.com;style-src 'self' https: 'unsafe-inline' *.googleapis.com *.chargebee.com;img-src * data: ;font-src 'self' data: https://fonts.gstatic.com https://fonts.camunda.io;frame-ancestors;frame-src 'self' https: *.chargebee.com ;child-src;worker-src 'self' blob:;base-uri 'self';form-action 'self';object-src 'none';script-src-attr 'none';
Content-Type: application/json
Transfer-Encoding: chunked
Date: Mon, 10 Mar 2025 11:18:28 GMT

{
  "id": "2251799813686176",
  "name": "Ship order",
  "taskDefinitionId": "ShipOrder_Task",
  "processName": "Ship Order",
  "creationDate": "2025-03-07T07:23:01.646+0000",
  "completionDate": null,
  "assignee": null,
  "taskState": "CREATED",
  "formKey": "2251799813686110",
  "formId": "ShipOrderInputTrackingDataForm",
  "formVersion": 2,
  "isFormEmbedded": false,
  "processDefinitionKey": "2251799813686109",
  "processInstanceKey": "2251799813686163",
  "tenantId": "adam-test",
  "dueDate": null,
  "followUpDate": null,
  "candidateGroups": null,
  "candidateUsers": null,
  "implementation": "ZEEBE_USER_TASK",
  "priority": 50
}

Calling the API directly causes the same error as listed in log:

POST http://localhost:8082/v2/user-tasks/2251799813686176/completion

HTTP/1.1 404 
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Security-Policy: default-src 'self';connect-src 'self' https: *.mixpanel.com cloudflareinsights.com *.appcues.net wss://api.appcues.net;script-src 'self' https: *.chargebee.com *.mixpanel.com ajax.cloudflare.com static.cloudflareinsights.com;style-src 'self' https: 'unsafe-inline' *.googleapis.com *.chargebee.com;img-src * data: ;font-src 'self' data: https://fonts.gstatic.com https://fonts.camunda.io;frame-ancestors;frame-src 'self' https: *.chargebee.com ;child-src;worker-src 'self' blob:;base-uri 'self';form-action 'self';object-src 'none';script-src-attr 'none';
Content-Type: application/problem+json
Transfer-Encoding: chunked
Date: Mon, 10 Mar 2025 11:45:16 GMT

{
  "type": "about:blank",
  "title": "NOT_FOUND",
  "status": 404,
  "detail": "Command 'COMPLETE' rejected with code 'NOT_FOUND': Expected to complete user task with key '2251799813686176', but no such user task was found",
  "instance": "/v2/user-tasks/2251799813686176/completion"
}

When trying to use v1 of the API we get the hint we should use the new API as tried above:

PATCH http://localhost:8082/v1/tasks/2251799813686176/complete

HTTP/1.1 400 
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Security-Policy: default-src 'self';connect-src 'self' https: *.mixpanel.com cloudflareinsights.com *.appcues.net wss://api.appcues.net;script-src 'self' https: *.chargebee.com *.mixpanel.com ajax.cloudflare.com static.cloudflareinsights.com;style-src 'self' https: 'unsafe-inline' *.googleapis.com *.chargebee.com;img-src * data: ;font-src 'self' data: https://fonts.gstatic.com https://fonts.camunda.io;frame-ancestors;frame-src 'self' https: *.chargebee.com ;child-src;worker-src 'self' blob:;base-uri 'self';form-action 'self';object-src 'none';script-src-attr 'none';
Content-Type: application/problem+json
Transfer-Encoding: chunked
Date: Mon, 10 Mar 2025 11:49:28 GMT
Connection: close

{
  "status": 400,
  "message": "This operation is not supported using Tasklist V1 API. Please use the latest API. For more information, refer to the documentation: https://docs.camunda.io/docs/apis-tools/tasklist-api-rest/migrate-to-zeebe-user-tasks/",
  "instance": "bf97e7e3-4d07-475b-a48a-cf8989cfed9d"
}

You should use Tasklist v2 version of api for querying and other task related actions.

Could you share the bpmn model to further check this issue?

With Tasklist v2 api are you able to search the tasks by processInstanceKey?

/v2/user-tasks/search

with payload:

{
    "filter": {
        "processInstanceKey": <processInstanceKey>
    }
}

Hi, thank you for your suggestion, but please take another look at my initial post. The issue is that Camunda’s Tasklist UI can display the tasks, but when I click the “Assign” button, it returns an error. Checking the logs of the Tasklist pod reveals that it is using the correct version (v2) of the API, but it cannot find the requested task (404 error). This problem is related to Camunda’s tooling, not my custom application.

Hello @Adam_Boczek ,
I need more details about the setup you are using:

  • do you use multi tenancy feature?
  • do you use standalone Zeebe gateways, or a Zeebe broker with embedded gateway (you can check with kubectl get pods) ?

Thanks

Hi @houssain-barouni,

  • do you use multi tenancy feature?

Yes I do. I have just upgraded the deployed version to the latest 8.6.12 with no effect; the problem remains (from tasklist pod log after trying to assign Camunda User Task using Tasklist UI):

2025-03-19 07:12:22.618 [] [http-nio-0.0.0.0-8080-exec-9] [] INFO
      io.camunda.tasklist.webapp.config.filter.LoggingFilter - Request Processed: Method=POST, URI=/v1/tasks/search, Response Code=200, Time Taken=24 ms
2025-03-19 07:12:26.652 [] [http-nio-0.0.0.0-8080-exec-6] [] INFO
      io.camunda.tasklist.webapp.config.filter.LoggingFilter - Request Processed: Method=GET, URI=/v1/tasks/2251799813685434, Response Code=200, Time Taken=7 ms
2025-03-19 07:12:26.732 [] [http-nio-0.0.0.0-8080-exec-5] [] ERROR
      io.camunda.tasklist.webapp.api.rest.v1.controllers.TaskController - Unexpected exception happened: Failed with code 404: 'Not Found'. Details: 'class ProblemDetail {
    type: about:blank
    title: NOT_FOUND
    status: 404
    detail: Command 'ASSIGN' rejected with code 'NOT_FOUND': Expected to assign user task with key '2251799813685434', but no such user task was found
    instance: /v2/user-tasks/2251799813685434/assignment
}'
io.camunda.zeebe.client.api.command.ProblemException: Failed with code 404: 'Not Found'. Details: 'class ProblemDetail {
    type: about:blank
    title: NOT_FOUND
    status: 404
    detail: Command 'ASSIGN' rejected with code 'NOT_FOUND': Expected to assign user task with key '2251799813685434', but no such user task was found
    instance: /v2/user-tasks/2251799813685434/assignment
}'
        at io.camunda.zeebe.client.impl.http.ApiCallback.handleErrorResponse(ApiCallback.java:113) ~[zeebe-client-java-8.6.12.jar:8.6.12]
        at io.camunda.zeebe.client.impl.http.ApiCallback.completed(ApiCallback.java:61) ~[zeebe-client-java-8.6.12.jar:8.6.12]
        at io.camunda.zeebe.client.impl.http.ApiCallback.completed(ApiCallback.java:31) ~[zeebe-client-java-8.6.12.jar:8.6.12]
        at org.apache.hc.core5.concurrent.BasicFuture.completed(BasicFuture.java:148) ~[httpcore5-5.3.2.jar:5.3.2]
        at org.apache.hc.core5.concurrent.ComplexFuture.completed(ComplexFuture.java:72) ~[httpcore5-5.3.2.jar:5.3.2]
        at org.apache.hc.client5.http.impl.async.InternalAbstractHttpAsyncClient$2$1.completed(InternalAbstractHttpAsyncClient.java:310) ~[httpclient5-5.4.2.jar:5.4.2]
        at org.apache.hc.core5.http.nio.support.AbstractAsyncResponseConsumer$1.completed(AbstractAsyncResponseConsumer.java:101) ~[httpcore5-5.3.2.jar:5.3.2]
        at org.apache.hc.core5.http.nio.entity.AbstractBinAsyncEntityConsumer.completed(AbstractBinAsyncEntityConsumer.java:87) ~[httpcore5-5.3.2.jar:5.3.2]
        at org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer.streamEnd(AbstractBinDataConsumer.java:83) ~[httpcore5-5.3.2.jar:5.3.2]
        at org.apache.hc.core5.http.nio.support.AbstractAsyncResponseConsumer.streamEnd(AbstractAsyncResponseConsumer.java:142) ~[httpcore5-5.3.2.jar:5.3.2]
        at org.apache.hc.client5.http.impl.async.HttpAsyncMainClientExec$1.streamEnd(HttpAsyncMainClientExec.java:283) ~[httpclient5-5.4.2.jar:5.4.2]
        at org.apache.hc.core5.http.impl.nio.ClientHttp1StreamHandler.dataEnd(ClientHttp1StreamHandler.java:276) ~[httpcore5-5.3.2.jar:5.3.2]
        at org.apache.hc.core5.http.impl.nio.ClientHttp1StreamDuplexer.dataEnd(ClientHttp1StreamDuplexer.java:366) ~[httpcore5-5.3.2.jar:5.3.2]
        at org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.onInput(AbstractHttp1StreamDuplexer.java:338) ~[httpcore5-5.3.2.jar:5.3.2]
        at org.apache.hc.core5.http.impl.nio.AbstractHttp1IOEventHandler.inputReady(AbstractHttp1IOEventHandler.java:64) ~[httpcore5-5.3.2.jar:5.3.2]
        at org.apache.hc.core5.http.impl.nio.ClientHttp1IOEventHandler.inputReady(ClientHttp1IOEventHandler.java:41) ~[httpcore5-5.3.2.jar:5.3.2]
        at org.apache.hc.core5.reactor.InternalDataChannel.onIOEvent(InternalDataChannel.java:143) ~[httpcore5-5.3.2.jar:5.3.2]
        at org.apache.hc.core5.reactor.InternalChannel.handleIOEvent(InternalChannel.java:51) ~[httpcore5-5.3.2.jar:5.3.2]
        at org.apache.hc.core5.reactor.SingleCoreIOReactor.processEvents(SingleCoreIOReactor.java:176) ~[httpcore5-5.3.2.jar:5.3.2]
        at org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:125) ~[httpcore5-5.3.2.jar:5.3.2]
        at org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:92) ~[httpcore5-5.3.2.jar:5.3.2]
        at org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44) ~[httpcore5-5.3.2.jar:5.3.2]
        at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]

  • do you use standalone Zeebe gateways, or a Zeebe broker with embedded gateway (you can check with kubectl get pods) ?
❯ kg po
NAME                                             READY   STATUS    RESTARTS      AGE
camunda-platform-connectors-67589575f5-5cgxt     1/1     Running   2 (34m ago)   16h
camunda-platform-elasticsearch-master-0          1/1     Running   2 (34m ago)   16h
camunda-platform-identity-57d495f665-7vv7p       1/1     Running   3 (34m ago)   16h
camunda-platform-identity-postgresql-0           1/1     Running   2 (34m ago)   16h
camunda-platform-keycloak-0                      1/1     Running   2 (34m ago)   16h
camunda-platform-operate-7654f58f76-rw6fn        1/1     Running   2 (34m ago)   16h
camunda-platform-postgresql-0                    1/1     Running   2 (34m ago)   16h
camunda-platform-tasklist-7bf6fb479c-g6gzk       1/1     Running   2 (34m ago)   16h
camunda-platform-zeebe-0                         1/1     Running   2 (34m ago)   16h
camunda-platform-zeebe-gateway-d788b65f7-2tnh4   1/1     Running   2 (34m ago)   16h

Thanks for the shared information,

  1. can you make sure that zeebe application is assigned to all the tenants? You can do that with Identity console. Checkout the documentation here.
  2. There is a known issue with helm chart related to this. However, I think you should not be impacted by that since you have a standalone gateway configured in your cluster.

Best regards,

Hi @houssain-barouni, thx. I did as proposed in 1st point, however without any success. For the testing purposes I changed the type of my user tasks to the deprecated “job worker” version and they work as expected.

So it is a problem of a Camunda User Task in a multi-tenant configuration in a C8 installation on kind-Kubernetes-cluster with Helm for 8.6.12.

Hi @Adam_Boczek,

can you share the config map of Zeebe gateway

kubectl get cm <zeebe-gateway-cm> -o yaml

you can replace <zeebe-gateway-cm> with the name of the config map of the gateway that you get with kubectl get cm

Regards,

Hi @houssain-barouni,

with pleasure:

❯ kg cm
NAME                                           DATA   AGE
camunda-platform-connectors-configuration      1      7d17h
camunda-platform-identity-configuration        1      7d17h
camunda-platform-identity-env-vars             4      7d17h
camunda-platform-keycloak-env-vars             15     7d17h
camunda-platform-operate-configuration         1      7d17h
camunda-platform-release                       1      7d17h
camunda-platform-tasklist-configuration        1      7d17h
camunda-platform-zeebe-configuration           3      7d17h
camunda-platform-zeebe-gateway-configuration   2      7d17h
kube-root-ca.crt                               1      7d17h
❯ kg cm camunda-platform-zeebe-gateway-configuration -o yaml
apiVersion: v1
data:
  application.yaml: |
    spring:
      profiles:
        active: "identity-auth"

    # Camunda Database configuration
    camunda.database:
      type: elasticsearch
      # Cluster name
      clusterName: elasticsearch
      # Elasticsearch full url
      url: "http://camunda-platform-elasticsearch:9200"

    server:
      address: "0.0.0.0"
      port: "8080"
    camunda:
      identity:
        type: "KEYCLOAK"
        issuerBackendUrl: "http://camunda-platform-keycloak:80/auth/realms/camunda-platform"
        audience: "zeebe-api"
        baseUrl: "http://camunda-platform-identity:80"
    zeebe:
      gateway:
        security:
          authentication:
            mode: identity
        monitoring:
          host: 0.0.0.0
          port: "9600"
        cluster:
          clusterName: camunda-platform-zeebe
          port: "26502"
        network:
          host: 0.0.0.0
          port: "26500"
        multitenancy:
          enabled: true
      broker:
        gateway:
          multitenancy:
            enabled: true
  gateway-log4j2.xml: ""
kind: ConfigMap
metadata:
  annotations:
    meta.helm.sh/release-name: camunda-platform
    meta.helm.sh/release-namespace: default
  creationTimestamp: "2025-03-18T14:58:19Z"
  labels:
    app: camunda-platform
    app.kubernetes.io/component: zeebe-gateway
    app.kubernetes.io/instance: camunda-platform
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: camunda-platform
    app.kubernetes.io/part-of: camunda-platform
    app.kubernetes.io/version: 8.6.12
    helm.sh/chart: camunda-platform-11.2.2
  name: camunda-platform-zeebe-gateway-configuration
  namespace: default
  resourceVersion: "1834"
  uid: 53118e04-01b2-46da-a9db-88a97109e57f

Hi @Adam_Boczek ,
we lately discovered this issue, and a workaround for that is to use this env variable override in the chart

zeebeGateway:
  env:
  - name: ZEEBE_GATEWAY_ENABLE
    value: "true"

I hope this fixes the issue for you as well

1 Like

Hi @houssain-barouni,

I have just applied the workaround and the Tasklist works now as expected.

Thank you.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.