question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invitation from aca-py agent with aca-py mediator between

See original GitHub issue

Hey.

I’m trying to make a connection (from https://github.com/hyperledger/aries-mobile-agent-react-native) with another agent with a mediator between. I can connect from react native app (using code from this repo) to aca-py mediator, but had to move the invitation to another server (/invitation path does not exist in aca-py admin). I don’t know if it’s good, but it works.

The issue is when I want to connect with another aca-py agent with mediator between. When I try to receive invitation on mobile I’m getting message in react native app:

New Connection Record
{
    "_didDoc":
    {
        "@context": "https://w3id.org/did/v1",
        "authentication":
        [
            [
                undefined
            ]
        ],
        "id": "Cv5XNG6AW7bQNSz49M3a8h",
        "publicKey":
        [
            [
                undefined
            ]
        ],
        "service":
        [
            [
                undefined
            ]
        ]
    },
    "_invitation":
    {
        "@id": "859fec9e-ad20-4fe1-bc5b-2585e52636cc",
        "@type": "https://didcomm.org/connections/1.0/invitation",
        "label": "label",
        "recipientKeys":
        [
            "G9JytRnX8tx6uSetjPyYuSkwwVrDFm23LB8GGK7ifB4k"
        ],
        "routingKeys":
        [
            "8zNjW3SZt9Tc94dmHjpGdm5qGL8EFQNPMXVCHqJR88ff"
        ],
        "serviceEndpoint": "http://x:3006/"
    },
    "_theirDidDoc": undefined,
    "alias": undefined,
    "autoAcceptConnection": true,
    "createdAt": 1618056938615,
    "did": "Cv5XNG6AW7bQNSz49M3a8h",
    "endpoint": undefined,
    "id": "d12851bc-f05c-46af-8c7a-721023b1a960",
    "role": "INVITEE",
    "state": "requested",
    "tags":
    {
        "invitationKey": "G9JytRnX8tx6uSetjPyYuSkwwVrDFm23LB8GGK7ifB4k",
        "verkey": "7VfLb6mWcLz3apc3Z1dQxcytAghm4E4c2iKppVYdLXB3"
    },
    "theirDid": undefined,
    "type": "ConnectionRecord",
    "verkey": "7VfLb6mWcLz3apc3Z1dQxcytAghm4E4c2iKppVYdLXB3"
}

But I’m getting an error on edge agent (mediator looks good - it shows messages regarding forwarded messages):

2021-04-10 07:17:57,143 aries_cloudagent.core.conductor WARNING Cannot queue message for delivery, no supported transport

Invitation created by edge agent looks like this:

{
  "connection_id": "1281a500-aa9b-49ba-b8b8-7dba030772ba",
  "invitation": {
    "@type": "https://didcomm.org/connections/1.0/invitation",
    "@id": "16be3a5c-4cc7-4c2f-a182-6defe6665930",
    "recipientKeys": [
      "4hxjdd6u3iHyi9WnPfesh9nDvwAKmGZiskw1NiriWMNr"
    ],
    "label": "Edge",
    "serviceEndpoint": "http://x:3006/",
    "routingKeys": [
      "8zNjW3SZt9Tc94dmHjpGdm5qGL8EFQNPMXVCHqJR88ff"
    ]
  },
  "invitation_url": "http://x:3006/?c_i=invitation base 64"
}

I copy invitation url, then paste it to qr generator and scan it.

Mediator config:

aca-py start --wallet-type indy \
--seed 00000000000000000000000001Mediat \
--wallet-key mediatorkey \
--wallet-name mediator \
--label "Mediator" \
--open-mediation \
--genesis-url http://genesishost/genesis \
--inbound-transport http 0.0.0.0 3006 \
--inbound-transport ws 0.0.0.0 3008 \
--outbound-transport http \
--outbound-transport ws \
--admin 0.0.0.0 3007 \
--admin-insecure-mode --auto-accept-invites --auto-accept-requests --auto-ping-connection \
--log-level info \
-e http://x:3006/ \
--emit-new-didcomm-prefix 

Edge agent config:

aca-py start --wallet-type indy \
--seed 00000000000000000000000001Issuer \
--wallet-key issuerkey \
--wallet-name issuer \
--label "Edge" \
--inbound-transport http 0.0.0.0 3001 \
--inbound-transport ws 0.0.0.0 3003 \
--outbound-transport http \
--outbound-transport ws \
-e http://x:3001/ \
--admin 0.0.0.0 3002 \
--admin-insecure-mode --auto-accept-invites --auto-accept-requests --auto-ping-connection \
--log-level debug \
--genesis-url http://genesishost/genesis \
--emit-new-didcomm-prefix 

Mobile config:

      const agentConfig = new AgentConfig({
        mediatorUrl: Config.MEDIATOR_URL,
        label: 'Holder',
        walletConfig: {id: 'holder-wallet'},
        walletCredentials: {key: 'holderkey'},
        autoAcceptConnections: true,
        genesisPath,
        logger: new ConsoleLogger(LogLevel.debug),
        indy,
      })

Has anyone experienced an issue like this?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
TimoGlastracommented, Apr 14, 2021

Whoops I missed your message @papkie! I think the problem here is that you’re trying to connect to an ACA-Py mediator. We don’t fully support the mediator coordination protocol yet which means we can’t request mediation from ACA-Py…

I believe @JamesKEbert is working on this, but until then you can only use an aries framework javascript mediator inside the mobile agent

1reaction
papkiecommented, Apr 29, 2021

Maybe I do not understand what you are trying to do @papkie but you do not need to connect ACA-py to the mediator. The process on should be:

Connect from the mobile AFJ to the AFJ mediator via the invitation. This works as you say. Connect from the mobile AFJ to the ACA-py using an ACA-py invitation. When the ACA-py starts it shows you an invitation URL. That’s the one you should use once the mobile is setup with the mediator. AFJ will handle the connection with ACA-py and it will respond to your mediator instead of the mobile.

Thanks, I have tried this scenario, unfortunately, it didn’t work. I see there is mediation protocol implementation in progress, so I’ll wait for that, thank you anyway!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Connection-Less Proof Requests with ACA-Py - HackMD
In case of an agent not exposed directly to the web, but behind a mediator, I believe the serviceEndpoint would be themediator's and...
Read more >
Aries Cloud Agent Python Documentation
Hyperledger Aries Cloud Agent Python (ACA-Py) is a foundation for building decentralized identity ... EVENT_NAMESPACE = 'acapy::record'.
Read more >
Becoming a Hyperledger Aries Developer - Getting Started
ACA-py support command line options to automatically accept invites and requests when they come in. This allows you to skip step 3 and...
Read more >
Aries Cloud Agent Python Documentation - Read the Docs
Hyperledger Aries Cloud Agent Python (ACA-Py) is a foundation for ... Storage management for configuration-provided mediation invite.
Read more >
Interoperability Between ACA-Py and the Trinsic Platform
In this webinar and workshop, you will see how two codebases, Aries Cloud Agent Python (ACA-Py) and Trinsic (based on Aries Framework ....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found