Closed papkie closed 3 years ago
Hi @papkie, I helped work on the mediator code and would like to help. Could you post more error logs, nothing is jumping out with the current details.
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
@burdettadam I have investigated it a bit more later, and it's probably the issue with aca-py agent. I'm getting message related to unsupported batch pickup type:
aries_cloudagent.core.dispatcher ERROR Message parsing failed: Unrecognized message type https://didcomm.org/messagepickup/1.0/batch-pickup, sending problem report
on aca-py agent
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
Understood, thank you!
Sadly, batch-pickup is not implemented in ACA-py. ACA-py uses websockets for mediation. Currently, they are being implemented in AFJ #218
I have used a workaround for this. You can use AFJ mediator instead of ACA-py mediator. Then you can connect to ACA-py agent using that mediator.
@icc-romeu
I have tried to use AFJ as a mediator (using the script in samples/mediator.ts).
I use samples/mediator.ts
code to set up the mediator.
Edge agent (mobile one, javascript) has no issues connecting to it, but there is an issue with connecting this mediator to the ACA-Py edge client.
I'm trying to receive the invitation created by the mediator (AFJ - on /invitation
path) on the ACA-Py edge client. ACA-Py sends a request with an empty body to /msg
endpoint, so AFJ is not able to handle it.
When I try to receive an invitation created by ACA-Py on Javascript mediator, AFJ throws UnhandledPromiseRejectionWarning: Error: Trying to save the message without theirKey!
error.
Do you have some example code somewhere?
If not, I'll just wait for WS support.
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.
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!
Hi @icc-romeu, it has been two years and I think Aries Mobile agent has progress alots. so, it is possible to connect Aries Mobile Agent React Native to Mediator of ACA-Py? Currently, I cannot connect Aries Mobile Agent with Mediator of ACA-Py because Aries Mobile Agent sent the did:peer to Mediator of ACA-Py while ACA-Py accepts only Indy DID.
I believe, you can connect Aries bifold and Aca-py mediator. Because I did it last month . I follow this link to get my mediator up and running "https://github.com/hyperledger/aries-mediator-service". Try for yourself and see if it works
@darapich92 you need to make sure to not use the did exchange protocol. You can either use connection invitations in the ACA-Py mediator, or use out of band invitations where the handshake_protocols does not include the did exchange protocol
Hi @PenguinTaro, thank you very much. I will note it down.
@TimoGlastra, thanks for your answer. I tried to use https://didcomm.org/connections/1.0
in the handshake_protocols in the out-of-band in the mediator of ACA-Py, my message sent from Edge Agent (React native) was undelivered.
Hi @icc-romeu, it has been two years and I think Aries Mobile agent has progress alots. so, it is possible to connect Aries Mobile Agent React Native to Mediator of ACA-Py? Currently, I cannot connect Aries Mobile Agent with Mediator of ACA-Py because Aries Mobile Agent sent the did:peer to Mediator of ACA-Py while ACA-Py accepts only Indy DID.
Sorry for the late reply.
I have been trying myself and I'm in the same point as you, no luck
Can you provide me with a reproduction? Having the message be undelivered can be because of a number of reasons, and I'd need to dig into it a bit more
Sorry @TimoGlastra I was wrong. Mediation does work. What does not work is pickup protocol. So nothing to do with this.
DEBUG DEBUG: Agent received message
INFO INFO: Received message with type 'did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/notification/1.0/problem-report', recipient key z6MkmQpVr4xD2a5TejpDZv2zAfPgHQRM2DnjRN3cM8PtehJG and sender key z6MkgUYKsfH7WYYH3FEwUcKFsyN4T7mCDNEaWkzNEo61aagZ {
"@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/notification/1.0/problem-report",
"@id": "287a87ed-450f-4cba-b587-74167981102c",
"~thread": {
"thid": "8123f295-7666-4091-ab8e-e32387e08142"
},
"description": {
"en": "Unrecognized message type https://didcomm.org/messagepickup/2.0/status-request",
"code": "message-parse-failure"
}
}
ERROR ERROR: Failed to process message {
"error": {
"name": "AriesFrameworkError",
"message": "Not sending problem report in response to problem report: No message class found for message type \"https://didcomm.org/notification/1.0/problem-report\"",
Okay, thanks for clarifying. Are you using the pickup plugin for the ACA-Py mediator? https://github.com/Indicio-tech/acapy-plugin-pickup
Also, if you're mostly looking for a mediator for development, you can also use the docker image from this repo: https://github.com/animo/animo-mediator
Okay, thanks for clarifying. Are you using the pickup plugin for the ACA-Py mediator? https://github.com/Indicio-tech/acapy-plugin-pickup
Also, if you're mostly looking for a mediator for development, you can also use the docker image from this repo: https://github.com/animo/animo-mediator
WOOOPS! Maybe that's the issue 😅 We will check, thank you!
Hi @TimoGlastra, thank you for your answer and now, I can connect Aries Mobile agent with the aca-py. I have a new problem when accepting the new credential from issuer because mobile agent cannot verify the DID of credential issuer.
TRACE: Retrieved 0 responses from ledgers for did 'So9SHrrNXBDDTBrDcRTt1P'
I think it is worked if aries mobile agent can connect to von-network for verifying DID of Issuer. Do you know how to overcome this problem? thank you very much!
Are you using a customer ledger? In that case you need to add it to the ledgers.json in bifold
@TimoGlastra, Yes i use the customized ledger. so I need to modify ledgers.json
in the configs/ledgers/indy
. thank you for your information!
Hi @TimoGlastra, after configuring ledgers.json, the aries mobile can capture the client_ip and port of nodes. but after the executing await this.wallet.initialize(walletConfig)
in the initialize() function of BaseAgent.js, my Aries mobile keep spinning and pop up the message Undefined is not a function
. Before I configure the ledger, it works properly. Could you give me any suggestion about this problem? thank you very much!
Can you share the config for your ledger?
Hi @TimoGlastra, I found the problem. i deleted some code because I want to have only one genesis that's the reason that it was stuck. I tried to have multiple genesis and it works now. thank you very much for your help!
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:
But I'm getting an error on edge agent (mediator looks good - it shows messages regarding forwarded messages):
Invitation created by edge agent looks like this:
I copy invitation url, then paste it to qr generator and scan it.
Mediator config:
Edge agent config:
Mobile config:
Has anyone experienced an issue like this?