Skip to content

DIDComm connection failure with Credo (issuer) and ACA-Py 1.5.1 (holder) due to did:key parsing error #4077

@Sshovon

Description

@Sshovon

I’m testing interoperability between the Credo 0.6.x (as issuer) and ACA-Py 1.5.1 (as holder), and the DIDComm connection fails on the ACA-Py side during didexchange. The connection record in ACA-Py remains stuck in request state, and the invitation record ends up as deleted.

Invitation response after accepting the connection:

{
  "state": "deleted",
  "created_at": "2026-03-04T07:56:02.523858Z",
  "updated_at": "2026-03-04T07:56:02.523858Z",
  "trace": false,
  "oob_id": "c5a064af-6262-4d89-a2b4-ad13c9099b92",
  "invi_msg_id": "05de475c-06e0-4a93-9b96-5bd4517b66cb",
  "invitation": {
    "@type": "https://didcomm.org/out-of-band/1.1/invitation",
    "@id": "05de475c-06e0-4a93-9b96-5bd4517b66cb",
    "handshake_protocols": [
      "https://didcomm.org/didexchange/1.1",
      "https://didcomm.org/connections/1.0"
    ],
    "accept": [
      "didcomm/aip1",
      "didcomm/aip2;env=rfc19"
    ],
    "services": [
      {
        "id": "#inline-0",
        "type": "did-communication",
        "recipientKeys": [
          "did:key:z6Mkn2q9r8Yv1QjVhbqudsr3zH1Y2CT31mMV9vckKasfY98h"
        ],
        "serviceEndpoint": "https://60f5-27-147-191-147.ngrok-free.app"
      }
    ]
  },
  "connection_id": "385ea12a-5bae-4976-8e53-6e78039d3b35",
  "role": "receiver",
  "multi_use": false
}

When ACA-Py tries to complete the didexchange, it errors out. Relevant stack trace:

Alice      | Traceback (most recent call last):
Alice      |   File "/usr/local/lib/python3.13/asyncio/tasks.py", line 304, in __step_run_and_handle_result
Alice      |     result = coro.send(None)
Alice      |   File "/acapy_agent/core/dispatcher.py", line 255, in handle_v1_message
Alice      |     await handler(context, responder)
Alice      |   File "/acapy_agent/protocols/didexchange/v1_0/handlers/response_handler.py", line 26, in handle
Alice      |     conn_rec = await mgr.accept_response(context.message, context.message_receipt)
Alice      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Alice      |   File "/acapy_agent/protocols/didexchange/v1_0/manager.py", line 1000, in accept_response
Alice      |     signed_did = await self.verify_rotate(
Alice      |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
Alice      |         wallet, response.did_rotate_attach, conn_rec.invitation_key
Alice      |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Alice      |     )
Alice      |     ^
Alice      |   File "/acapy_agent/protocols/didexchange/v1_0/manager.py", line 1208, in verify_rotate
Alice      |     if not await attached.data.verify(wallet, invi_key):
Alice      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Alice      |   File "/acapy_agent/messaging/decorators/attach_decorator.py", line 446, in verify
Alice      |     encoded_pk = DIDKey.from_did(protected["jwk"]["kid"]).public_key_b58
Alice      |                  ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
Alice      |   File "/acapy_agent/did/did_key.py", line 77, in from_did
Alice      |     _, fingerprint = did_parts[0].split("did:key:")
Alice      |     ^^^^^^^^^^^^^^
Alice      | ValueError: not enough values to unpack (expected 2, got 1)
Alice      | 2026-03-04 07:56:03,653 acapy_agent.core.dispatcher ERROR Handler error: Dispatcher.handle_v1_message
Alice      | Traceback (most recent call last):
Alice      |   File "/usr/local/lib/python3.13/asyncio/tasks.py", line 304, in __step_run_and_handle_result
Alice      |     result = coro.send(None)
Alice      |   File "/acapy_agent/core/dispatcher.py", line 255, in handle_v1_message
Alice      |     await handler(context, responder)
Alice      |   File "/acapy_agent/protocols/didexchange/v1_0/handlers/response_handler.py", line 26, in handle
Alice      |     conn_rec = await mgr.accept_response(context.message, context.message_receipt)
Alice      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Alice      |   File "/acapy_agent/protocols/didexchange/v1_0/manager.py", line 1000, in accept_response
Alice      |     signed_did = await self.verify_rotate(
Alice      |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
Alice      |         wallet, response.did_rotate_attach, conn_rec.invitation_key
Alice      |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Alice      |     )
Alice      |     ^
Alice      |   File "/acapy_agent/protocols/didexchange/v1_0/manager.py", line 1208, in verify_rotate
Alice      |     if not await attached.data.verify(wallet, invi_key):
Alice      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Alice      |   File "/acapy_agent/messaging/decorators/attach_decorator.py", line 446, in verify
Alice      |     encoded_pk = DIDKey.from_did(protected["jwk"]["kid"]).public_key_b58
Alice      |                  ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
Alice      |   File "/acapy_agent/did/did_key.py", line 77, in from_did
Alice      |     _, fingerprint = did_parts[0].split("did:key:")

In ACA-Py, GET /connections shows the connection stuck in request state. Can anyone please help me out on this? Happy to provide full logs, config, or test against a specific branch if that helps.

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