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

Connection Errors in Regression Testing with Bifold based wallet #2445

Closed
nodlesh opened this issue Aug 24, 2023 · 3 comments · Fixed by #2446
Closed

Connection Errors in Regression Testing with Bifold based wallet #2445

nodlesh opened this issue Aug 24, 2023 · 3 comments · Fixed by #2446

Comments

@nodlesh
Copy link

nodlesh commented Aug 24, 2023

Last nights BC Wallet regression tests failed connecting to the test agents which are pulled from acapy main. The agent gets to response-sent and nothing else happens, the wallet is spinning on the connection screen. Using acapy main from the night before is fine, along with the official release of ACA-Py.
The error in my agent at the time of the problem is,

2023-08-24 15:34:37,113 aries_cloudagent.core.dispatcher ERROR Handler error: BaseConnectionManager.get_connection_targets
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pydid/validation.py", line 13, in wrap_validation_error
    yield
  File "/usr/local/lib/python3.9/site-packages/pydid/resource.py", line 68, in deserialize
    return parse_obj_as(cls, value)
  File "pydantic/tools.py", line 38, in pydantic.tools.parse_obj_as
  File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for ParsingModel[DIDDocumentRoot]
__root__ -> service -> 0 -> id
  did:sov:PkWfCgY4SSAYeSoaWx3RFP;PkWfCgY4SSAYeSoaWx3RFP#IndyAgentService is not a valid absolute or relative DID URL (type=value_error.invaliddidurl)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/asyncio/tasks.py", line 256, in __step
    result = coro.send(None)
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/connections/base_manager.py", line 603, in get_connection_targets
    targets = await self.fetch_connection_targets(connection)
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/connections/base_manager.py", line 564, in fetch_connection_targets
    return await self.resolve_connection_targets(
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/connections/base_manager.py", line 356, in resolve_connection_targets
    doc, didcomm_services = await self.resolve_didcomm_services(did)
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/connections/base_manager.py", line 263, in resolve_didcomm_services
    doc: ResolvedDocument = pydid.deserialize_document(doc_dict, strict=True)
  File "/usr/local/lib/python3.9/site-packages/pydid/__init__.py", line 63, in deserialize_document
    return cls.deserialize(value)
  File "/usr/local/lib/python3.9/site-packages/pydid/doc/doc.py", line 171, in deserialize
    DIDDocumentRoot.deserialize(value)
  File "/usr/local/lib/python3.9/site-packages/pydid/resource.py", line 68, in deserialize
    return parse_obj_as(cls, value)
  File "/usr/local/lib/python3.9/contextlib.py", line 137, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/usr/local/lib/python3.9/site-packages/pydid/validation.py", line 15, in wrap_validation_error
    raise error_to_raise(
ValueError: Failed to deserialize DIDDocumentRoot:
1 validation error for ParsingModel[DIDDocumentRoot]
__root__ -> service -> 0 -> id
  did:sov:PkWfCgY4SSAYeSoaWx3RFP;PkWfCgY4SSAYeSoaWx3RFP#IndyAgentService is not a valid absolute or relative DID URL (type=value_error.invaliddidurl)
2023-08-24 15:34:37,185 aries_cloudagent.core.conductor ERROR Exception in message handler:
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pydid/validation.py", line 13, in wrap_validation_error
    yield
  File "/usr/local/lib/python3.9/site-packages/pydid/resource.py", line 68, in deserialize
    return parse_obj_as(cls, value)
  File "pydantic/tools.py", line 38, in pydantic.tools.parse_obj_as
  File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for ParsingModel[DIDDocumentRoot]
__root__ -> service -> 0 -> id
  did:sov:PkWfCgY4SSAYeSoaWx3RFP;PkWfCgY4SSAYeSoaWx3RFP#IndyAgentService is not a valid absolute or relative DID URL (type=value_error.invaliddidurl)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/asyncio/tasks.py", line 258, in __step
    result = coro.throw(exc)
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/core/dispatcher.py", line 261, in handle_message
    await handler(context, responder)
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/protocols/connections/v1_0/handlers/connection_request_handler.py", line 47, in handle
    await responder.send_reply(
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/messaging/responder.py", line 142, in send_reply
    return await self.send_outbound(
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/core/dispatcher.py", line 406, in send_outbound
    return await self._send(context.profile, message, self._inbound_message)
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/core/conductor.py", line 637, in outbound_message_router
    status: OutboundSendStatus = await self._outbound_message_router(
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/core/conductor.py", line 665, in _outbound_message_router
    return await self.queue_outbound(profile, outbound, inbound)
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/core/conductor.py", line 697, in queue_outbound
    outbound.target_list = await self.dispatcher.run_task(
  File "/usr/local/lib/python3.9/asyncio/futures.py", line 284, in __await__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.9/asyncio/tasks.py", line 328, in __wakeup
    future.result()
  File "/usr/local/lib/python3.9/asyncio/futures.py", line 201, in result
    raise self._exception
  File "/usr/local/lib/python3.9/asyncio/tasks.py", line 256, in __step
    result = coro.send(None)
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/connections/base_manager.py", line 603, in get_connection_targets
    targets = await self.fetch_connection_targets(connection)
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/connections/base_manager.py", line 564, in fetch_connection_targets
    return await self.resolve_connection_targets(
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/connections/base_manager.py", line 356, in resolve_connection_targets
    doc, didcomm_services = await self.resolve_didcomm_services(did)
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/connections/base_manager.py", line 263, in resolve_didcomm_services
    doc: ResolvedDocument = pydid.deserialize_document(doc_dict, strict=True)
  File "/usr/local/lib/python3.9/site-packages/pydid/__init__.py", line 63, in deserialize_document
    return cls.deserialize(value)
  File "/usr/local/lib/python3.9/site-packages/pydid/doc/doc.py", line 171, in deserialize
    DIDDocumentRoot.deserialize(value)
  File "/usr/local/lib/python3.9/site-packages/pydid/resource.py", line 68, in deserialize
    return parse_obj_as(cls, value)
  File "/usr/local/lib/python3.9/contextlib.py", line 137, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/usr/local/lib/python3.9/site-packages/pydid/validation.py", line 15, in wrap_validation_error
    raise error_to_raise(
ValueError: Failed to deserialize DIDDocumentRoot:
1 validation error for ParsingModel[DIDDocumentRoot]
__root__ -> service -> 0 -> id
  did:sov:PkWfCgY4SSAYeSoaWx3RFP;PkWfCgY4SSAYeSoaWx3RFP#IndyAgentService is not a valid absolute or relative DID URL (type=value_error.invaliddidurl)
2023-08-24 15:34:37,203 aries_cloudagent.core.conductor ERROR DON'T shutdown on ValueError Failed to deserialize DIDDocumentRoot:
1 validation error for ParsingModel[DIDDocumentRoot]
__root__ -> service -> 0 -> id
  did:sov:PkWfCgY4SSAYeSoaWx3RFP;PkWfCgY4SSAYeSoaWx3RFP#IndyAgentService is not a valid absolute or relative DID URL (type=value_error.invaliddidurl)
2023-08-24 15:34:37,204 aries_cloudagent.core.dispatcher ERROR Handler error: Dispatcher.handle_message
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pydid/validation.py", line 13, in wrap_validation_error
    yield
  File "/usr/local/lib/python3.9/site-packages/pydid/resource.py", line 68, in deserialize
    return parse_obj_as(cls, value)
  File "pydantic/tools.py", line 38, in pydantic.tools.parse_obj_as
  File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for ParsingModel[DIDDocumentRoot]
__root__ -> service -> 0 -> id
  did:sov:PkWfCgY4SSAYeSoaWx3RFP;PkWfCgY4SSAYeSoaWx3RFP#IndyAgentService is not a valid absolute or relative DID URL (type=value_error.invaliddidurl)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/asyncio/tasks.py", line 258, in __step
    result = coro.throw(exc)
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/core/dispatcher.py", line 261, in handle_message
    await handler(context, responder)
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/protocols/connections/v1_0/handlers/connection_request_handler.py", line 47, in handle
    await responder.send_reply(
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/messaging/responder.py", line 142, in send_reply
    return await self.send_outbound(
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/core/dispatcher.py", line 406, in send_outbound
    return await self._send(context.profile, message, self._inbound_message)
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/core/conductor.py", line 637, in outbound_message_router
    status: OutboundSendStatus = await self._outbound_message_router(
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/core/conductor.py", line 665, in _outbound_message_router
    return await self.queue_outbound(profile, outbound, inbound)
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/core/conductor.py", line 697, in queue_outbound
    outbound.target_list = await self.dispatcher.run_task(
  File "/usr/local/lib/python3.9/asyncio/futures.py", line 284, in __await__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.9/asyncio/tasks.py", line 328, in __wakeup
    future.result()
  File "/usr/local/lib/python3.9/asyncio/futures.py", line 201, in result
    raise self._exception
  File "/usr/local/lib/python3.9/asyncio/tasks.py", line 256, in __step
    result = coro.send(None)
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/connections/base_manager.py", line 603, in get_connection_targets
    targets = await self.fetch_connection_targets(connection)
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/connections/base_manager.py", line 564, in fetch_connection_targets
    return await self.resolve_connection_targets(
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/connections/base_manager.py", line 356, in resolve_connection_targets
    doc, didcomm_services = await self.resolve_didcomm_services(did)
  File "/usr/local/lib/python3.9/site-packages/aries_cloudagent/connections/base_manager.py", line 263, in resolve_didcomm_services
    doc: ResolvedDocument = pydid.deserialize_document(doc_dict, strict=True)
  File "/usr/local/lib/python3.9/site-packages/pydid/__init__.py", line 63, in deserialize_document
    return cls.deserialize(value)
  File "/usr/local/lib/python3.9/site-packages/pydid/doc/doc.py", line 171, in deserialize
    DIDDocumentRoot.deserialize(value)
  File "/usr/local/lib/python3.9/site-packages/pydid/resource.py", line 68, in deserialize
    return parse_obj_as(cls, value)
  File "/usr/local/lib/python3.9/contextlib.py", line 137, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/usr/local/lib/python3.9/site-packages/pydid/validation.py", line 15, in wrap_validation_error
    raise error_to_raise(
ValueError: Failed to deserialize DIDDocumentRoot:
1 validation error for ParsingModel[DIDDocumentRoot]
__root__ -> service -> 0 -> id
  did:sov:PkWfCgY4SSAYeSoaWx3RFP;PkWfCgY4SSAYeSoaWx3RFP#IndyAgentService is not a valid absolute or relative DID URL (type=value_error.invaliddidurl)
@dbluhm
Copy link
Contributor

dbluhm commented Aug 24, 2023

Do you have a sample DID Doc attachment for what is getting sent from the BC Wallet to ACA-Py?

@nodlesh
Copy link
Author

nodlesh commented Aug 24, 2023

Attached is the entire output from the agent. Hope it helps.
acapy-main.log

@dbluhm
Copy link
Contributor

dbluhm commented Aug 24, 2023

That helps, thanks! Indeed, the service ID being sent is <nym>#IndyAgentService. I'll make sure we're accounting for values like that in the LegacyDocCorrections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants