Skip to content
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

Handle connection invitations in base64 or URL formats #186

Merged

Conversation

andrewwhitehead
Copy link
Contributor

Fixes #180

@codecov-io
Copy link

Codecov Report

Merging #186 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #186   +/-   ##
=======================================
  Coverage   71.75%   71.75%           
=======================================
  Files         218      218           
  Lines        9883     9883           
=======================================
  Hits         7092     7092           
  Misses       2791     2791

@swcurran
Copy link
Contributor

@andrewwhitehead - doesn't seem to work with the full URL. The connection process definitely starts, but I don't get a prompt in the Alice window - it just seems to hang as below:

Startup duration: 3.52s
Admin url is at: http://172.17.0.1:8031
Endpoint url is at: http://172.17.0.1:8030

#9 Input faber.py invitation details
Invite details: https://agentbook.vonx.io:10000?c_i=eyJyZWNpcGllbnRLZXlzIjogWyI5N
0p5aXdxcmYzVzdmVzc1NjM3NmJualdYSEdWdlBqc3ZiNGJKNVBnSmtkdyJdLCAicm91dGluZ0tleXMiOi
BbXSwgInNlcnZpY2VFbmRwb2ludCI6ICJodHRwczovL2FnZW50Ym9vay52b254LmlvOjEwMDAwIiwgImx
hYmVsIjogIkFnZW50Qm9vayIsICJAaWQiOiAiZTUxYmY0NmYtY2I2Ny00NDZmLTk4NTYtODEwNDFjMjAz
ODgwIiwgIkB0eXBlIjogImRpZDpzb3Y6QnpDYnNOWWhNcmpIaXFaRFRVQVNIZztzcGVjL2Nvbm5lY3Rpb
25zLzEuMC9pbnZpdGF0aW9uIn0=
Invitation response:
  {
    "updated_at": "2019-09-18 16:43:06.131938Z",
    "initiator": "external",
    "accept": "auto",
    "connection_id": "c1a27f82-7f45-408a-bef1-51609aa9f2d6",
    "routing_state": "none",
    "my_did": "LZCjHp318jcaXgiZpZK9iV",
    "invitation_mode": "once",
    "invitation_key": "97Jyiwqrf3W7fW756376bnjWXHGVvPjsvb4bJ5PgJkdw",
    "created_at": "2019-09-18 16:43:06.088715Z",
    "their_label": "AgentBook",
    "request_id": "adf2dfcf-272d-4dcf-bd0f-205f44b6dba1",
    "state": "request"
  }


@swcurran
Copy link
Contributor

swcurran commented Sep 18, 2019

Same behaviour if I just paste in the base64 encoded text:

eyJyZWNpcGllbnRLZXlzIjogWyI5N0p5aXdxcmYzVzdmVzc1NjM3NmJualdYSEdWdlBqc3ZiNGJKNVBnSmtkdyJdLCAicm91dGluZ0tleXMiOiBbXSwgInNlcnZpY2VFbmRwb2ludCI6ICJodHRwczovL2FnZW50Ym9vay52b254LmlvOjEwMDAwIiwgImxhYmVsIjogIkFnZW50Qm9vayIsICJAaWQiOiAiZTUxYmY0NmYtY2I2Ny00NDZmLTk4NTYtODEwNDFjMjAzODgwIiwgIkB0eXBlIjogImRpZDpzb3Y6QnpDYnNOWWhNcmpIaXFaRFRVQVNIZztzcGVjL2Nvbm5lY3Rpb25zLzEuMC9pbnZpdGF0aW9uIn0=

On the agentbook side, it shows that it received the connection request, sent the connection response and then...nothing.

Leaving Alice running, I eventually get this error:

Alice      | 2019-09-18 16:45:40,193 asyncio ERROR Future exception was never retrieved
Alice      | future: <Future finished exception=Exception('Unexpected response status',)>
Alice      | Traceback (most recent call last):
Alice      |   File "/home/indy/aries_cloudagent/task_processor.py", line 14, in delay_task
Alice      |     return await task
Alice      |   File "/home/indy/aries_cloudagent/transport/outbound/manager.py", line 216, in dispatch_message
Alice      |     await transport.handle_message(message)
Alice      |   File "/home/indy/aries_cloudagent/transport/outbound/http.py", line 48, in handle_message
Alice      |     raise Exception("Unexpected response status")
Alice      | Exception: Unexpected response status

@andrewwhitehead
Copy link
Contributor Author

@swcurran Is your Alice agent routable?

@swcurran
Copy link
Contributor

@andrewwhitehead - don't know - I'm just using the "run_demo alice" on the ACA-Py side. I just know that what worked last week with Agentbook does not work now. Last week, I had to decode the URL to grab the JSON invite, but once I did that, everything worked. Now it hangs as noted above.

@swcurran
Copy link
Contributor

FYI - same behaviour as last week (using the base64url decoded JSON data) fails as well - no connection established. This is the data I used:

{"recipientKeys": ["3KwBC89e7WNhPMJDe3WvyTfrPgJZJt739pTm5hD2a8Tw"], "routingKeys": [], "serviceEndpoint": "https://agentbook.vonx.io:10000", "label": "AgentBook", "@id": "51779334-5df9-4307-b56b-7b61d98891d6", "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/connections/1.0/invitation"}

Copy link
Contributor

@swcurran swcurran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previous notes were based on tests with a local agent, which (of course) is not going to work. Once I moved the test to Play-With-VON, all worked well.

Sorry about that.

@swcurran swcurran merged commit abc5de2 into openwallet-foundation:master Sep 18, 2019
@andrewwhitehead andrewwhitehead deleted the alice-invites branch February 29, 2020 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make the Alice agent accept different format invitations
3 participants