hyperledger-archives / aries-framework-dotnet

Aries Framework .NET for building multiplatform SSI services
https://wiki.hyperledger.org/display/aries
Apache License 2.0
84 stars 74 forks source link

DotNet Edge Agent is unable to send a `Connectionless Presentation Message` to the DotNet Verifier Agent #174

Open sahil-khanna opened 3 years ago

sahil-khanna commented 3 years ago

Below is the scenario. EA = Edge Agent

ProofRecord record = await proofService.ProcessRequestAsync(agentContext, Proof.RequestPresentationMessage, null);
(PresentationMessage presentationMessage, ProofRecord proofRecord) = await proofService.CreatePresentationAsync(agentContext, record.Id, requestedCredentials);
ServiceDecorator service = Proof.RequestPresentationMessage.GetDecorator<ServiceDecorator>(DecoratorNames.ServiceDecorator);
IMessageService messageService = App.Container.Resolve<IMessageService>();
await messageService.SendAsync(agentContext: agentContext, message: presentationMessage, recipientKey: service.RecipientKeys.First(), endpointUri: service.ServiceEndpoint, routingKeys: service.RoutingKeys?.ToArray());

In the above step, EA2 gets the error "Failed to send A2A message with an HTTP status code of InternalServerError and content".

Can anyone advise on the changes I need to make to get it working?

DaevMithran commented 3 years ago

You are passing the wrong arguments for CreatePresentationAsync while creating a presentation for connectionless transport, You should use a different method.