Open llbartekll opened 3 years ago
I have checked this issue and it seems there is a problem with passing the router key?
Configuration: Every agent is running with rest. Alice - outbound only, WebSocket, auto-accept Carl - outbound only, WebSocket, auto-accept Router - in/out, WebSocket, auto-accept
Steps I did to recreate this issue, using WebSocket:
complete
complete
router_connection_id
of Router in bodyrouter_connection_id
of Router in bodyrequested
status in connectionabandoned
Same issue for regular invitation/receive.Alice throws this error:
[aries-framework/out-of-band/service] 2021/02/10 13:10:40 UTC - outofband.(*Service).handleDIDEvent -> DEBUG input: {ProtocolName:didexchange Type:1 StateID:abandoned Msg:map[@id:f02db974-1ae4-4fbf-84d9-3ba1eee6c4cc @type:https://didcomm.org/didexchange/1.0/request _internal_metadata:map[] connection:map[did:did:peer:1zQmNyXoRZTr7ojWmMCoN2BmXFRffYfzDpqhnZFuNJKyciwX did_doc:map[@context:[https://w3id.org/did/v1] assertionMethod:[#1flj933qjuuidrs1yo21yzp2s9SisD-sCWmm4w6U6h0] authentication:[#1flj933qjuuidrs1yo21yzp2s9SisD-sCWmm4w6U6h0] created:2021-02-10T14:10:40.344195+01:00 id:did:peer:1zQmNyXoRZTr7ojWmMCoN2BmXFRffYfzDpqhnZFuNJKyciwX service:[map[id:d0df515b-7cce-4728-8fff-533d9b2a68f0 priority:0 recipientKeys:[GJGRfccvpaRSjJkBuF2YznJ4dB88huPV7Kx4UgbKyBmz] routingKeys:[] serviceEndpoint:didcomm:transport/queue type:did-communication]] updated:2021-02-10T14:10:40.344195+01:00 verificationMethod:[map[controller: id:#1flj933qjuuidrs1yo21yzp2s9SisD-sCWmm4w6U6h0 publicKeyBase58:GJGRfccvpaRSjJkBuF2YznJ4dB88huPV7Kx4UgbKyBmz type:Ed25519VerificationKey2018]]]] label:alice2 ~thread:map[pthid:7dcc1acf-b731-42d3-8443-7d297c7c594a thid:f02db974-1ae4-4fbf-84d9-3ba1eee6c4cc]] Properties:failed to execute state action 'responded': outboundDispatcher.Send: no transport found for serviceEndpoint: didcomm:transport/queue}
It looks like accepting requests does not get valid serviceEndpoint
, so it does not know it should respond to Router with the given routing key.
It does work without the auto-accept flag enabled. Is it expected behavior?
@llbartekll @papkie auto-accept
is a helper function that accepts all actions related to didexchange without providing any arguments Continue(&Empty{})
.
// the function body
for msg := range ch {
msg.Continue(&Empty{})
}
In your case because of auto-accept
you are missing the AcceptExchangeRequest
call. exchange request
was executed automatically. And the problem here is that router_connection_id
was not provided due to (msg.Continue(&Empty{})
).
The solution is to turn off auto-accept
and perform A.AcceptExchangeRequest
manually where you would need to provide a router_connection_id
.
@papkie Is it expected behavior? - yes, it is.
I have two mobile agents A and B and mediator agent M. Mobile agents configuration:
Mobile agents A and B register agent M as a router
agents A creates an invitation:
Agent B accept an invitation:
Agent A gets status
responded
Agent B gets status
completed
Agent A is able to request presentation or propose credentials to agent B
Agent B cannot respond to agent A and an error is thrown: