-
Notifications
You must be signed in to change notification settings - Fork 1
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
[pickup 3.0] internal error 500 on delivery request #2
Comments
Hey @bsandmann ! |
Hey @antonbaliasnikov One note to the above request: We don't support the 'limit' yet. We parse it but the database doesn't filter it yet. Minor thing, but not important at the moment I would say. Same thing with paging. |
Hey @bsandmann ! Now, it's working, but reports a problem that DID was not found, but mediation was successfully granted. Here is what's going on: {
"id": "a97a5202-1c81-41bc-a625-141a078ff4e5",
"typ": "application\/didcomm-plain+json",
"type": "https:\/\/didcomm.org\/report-problem\/2.0\/problem-report",
"body": {
"escalate_to": "mailto:[email protected]",
"code": "e.m.me",
"comment": "Internal error: Recipient DID 'did:peer:2.Ez6LSc6RL3vgLZFgka19kacfiRqwPgd41sUMqweZvT7vTiNxx.Vz6MkjQuarYjsws3t8rWJk1wwKpZbnhnnyHFNVnRbLxXgjwpa.SeyJ0IjoiZG0iLCJzIjoiaHR0cDovL2hvc3QuZG9ja2VyLmludGVybmFsOjk5OTkvIiwiciI6W10sImEiOlsiZGlkY29tbS92MiJdfQ' was not found."
},
"pthid": "e6cdc8e0-58fa-433b-aac9-2a9c74adf23d"
} But at the same time, mediation was successfully granted: Request: {
"id": "110204db-9785-4e91-ae9b-eee3e5ea0d2e",
"typ": "application\/didcomm-plain+json",
"type": "https:\/\/didcomm.org\/coordinate-mediation\/2.0\/mediate-request",
"from": "did:peer:2.Ez6LSc6RL3vgLZFgka19kacfiRqwPgd41sUMqweZvT7vTiNxx.Vz6MkjQuarYjsws3t8rWJk1wwKpZbnhnnyHFNVnRbLxXgjwpa.SeyJ0IjoiZG0iLCJzIjoiaHR0cDovL2hvc3QuZG9ja2VyLmludGVybmFsOjk5OTkvIiwiciI6W10sImEiOlsiZGlkY29tbS92MiJdfQ",
"to": [
"did:peer:2.Ez6LSeUYyDHMTbWoMGCKyqntPR95TB3N6ic2A27YLmwZHchxY.Vz6MkgRyq89zDCmXEcg8LmdqKjoaanxK4MUVbbtembDa4fLpK.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOiJodHRwczovL21lZGlhdG9yLmJsb2NrdHJ1c3QuZGV2LyIsInIiOltdLCJhIjpbImRpZGNvbW0vdjIiXX0"
],
"body": {},
"return_route": "all"
} Response: {
"id": "69799421-588e-4ce8-b982-c712e7b06fbe",
"typ": "application\/didcomm-plain+json",
"type": "https:\/\/didcomm.org\/coordinate-mediation\/2.0\/mediate-grant",
"body": {
"routing_did": "did:peer:2.Ez6LSgSy1mqFYhWVa5AsVTHmGn3UngFwwPhsVgfUbA1w2qzoi.Vz6MkoLz7G46Wb8Kq3mYEUKchZsjm2ybe2GG9ZUVYMqBYiY3W.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOiJodHRwczovL21lZGlhdG9yLmJsb2NrdHJ1c3QuZGV2LyIsInIiOltdLCJhIjpbImRpZGNvbW0vdjIiXX0"
},
"thid": "110204db-9785-4e91-ae9b-eee3e5ea0d2e"
} |
I'm currently not so much into the DIDComm topic, so sorry for not having these things correctly in my mind. But I believe the issue is, that you are trying to pickup messages for a recipient which isn't registered yet. At least that is, what the problem report states. Before you can pickup a message or ask for a status you have to update the recipient list. I believe the flow should go like this:
One could argue, that the problem report is the wrong response, and you could also respond with an empty list, but maybe it's more helpful this way. Am I missing something? |
Hey @bsandmann ! My flow is as follows (as described in the protocols):
Why this is required if a Recipient just registered and mediation was successfully granted? And if it's required, how recipient updates the mediator M? |
@antonbaliasnikov After that you have a second request to register the new DID you want to use using the
When you create your DID A, you use that soley for communication between you and the Mediator. The DID A' is soley for the communication with you and Bob. What you are proposing would be using A for the commication between you and the Mediator as well as between you and Bob. Theoretically you could do that, and the mediator could also support that, but that wouldn't be so clean I guess.
https://didcomm.org/mediator-coordination/2.0/ I know that Roots Mediator also works that way, but I'm not sure how Roots Mediator will respond to your scenario. Did you try that for passing forward messages around? |
Thanks @bsandmann Yeah, the RootsID mediator will correctly deliver a message in my scenario. But I understood your idea, it makes total sense. |
@antonbaliasnikov |
@bsandmann , yeah, nothing to "fix" really... but interesting to understand how it's supposed to work. We will be discussing this further with DIDComm community. For reference, see: decentralized-identity/didcomm.org#88 |
I wouldn't fix it right yet. Since we don't know what should be the behavior, I can argue from both sides. |
Seems like Blocktrust's Mediator has the correct behavior. @antonbaliasnikov we need the change our implementation and the test. |
@FabioPinheiro @antonbaliasnikov |
Issue overview
After recipient successfully sets up a mediation, when a sender sends a message to recipient, recipient is unable to pick up the message, because blocktrust mediator responds with error 500 on a
delivery-request
.Here is the scenario:
How to reproduce
Mediation request
Mediation is successful, request:
Response:
Sender sends a forward message
Then, Sender successfully sends a forward message to the mediator and the mediator responds with 202.
I will skip this part, because the forward message is encrypted.
Recipient requests delivery
Sending delivery request message:
In encrypted format:
And the mediator returns error 500 with empty response body.
Expected behavior
Mediator successfully delivers the forward message to recipient.
Notes
RootsID mediator successfully delivers the message with the same flow.
The text was updated successfully, but these errors were encountered: