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

Issuer doesn't download tails file from server if not present in local filesystem #701

Closed
esune opened this issue Aug 27, 2020 · 2 comments

Comments

@esune
Copy link
Member

esune commented Aug 27, 2020

Issue

When issuing a credential that supports revocation, if the tails file is NOT on the issuer agent's filesystem as expected, the issuing process is disrupted resulting in a credential permanently in the pending state. In the issuer logs, the following exception is observable:

Faber      | 2020-08-27 23:34:18,557 aries_cloudagent.core.dispatcher ERROR Handler error: credential_exchange_issue
Faber      | Traceback (most recent call last):
Faber      |   File "/home/indy/aries_cloudagent/protocols/issue_credential/v1_0/routes.py", line 1057, in credential_exchange_issue
Faber      |     ) = await credential_manager.issue_credential(cred_ex_record, comment=comment)
Faber      |   File "/home/indy/aries_cloudagent/protocols/issue_credential/v1_0/manager.py", line 551, in issue_credential
Faber      |     tails_path,
Faber      |   File "/home/indy/aries_cloudagent/issuer/indy.py", line 208, in create_credential
Faber      |     if tails_file_path is not None
Faber      |   File "/home/indy/aries_cloudagent/indy/__init__.py", line 15, in create_tails_reader
Faber      |     raise FileNotFoundError("Tails file does not exist.")
Faber      | FileNotFoundError: Tails file does not exist.
Faber      | 2020-08-27 23:34:18,560 aries_cloudagent.admin.server ERROR Handler error with exception: Tails file does not exist.
Faber      | 2020-08-27 23:34:18,561 aiohttp.server ERROR Error handling request
Faber      | Traceback (most recent call last):
Faber      |   File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 418, in start
Faber      |     resp = await task
Faber      |   File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/aiohttp/web_app.py", line 458, in _handle
Faber      |     resp = await handler(request)
Faber      |   File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 119, in impl
Faber      |     return await handler(request)
Faber      |   File "/home/indy/aries_cloudagent/admin/server.py", line 154, in ready_middleware
Faber      |     raise e
Faber      |   File "/home/indy/aries_cloudagent/admin/server.py", line 144, in ready_middleware
Faber      |     return await handler(request)
Faber      |   File "/home/indy/aries_cloudagent/admin/server.py", line 169, in debug_middleware
Faber      |     return await handler(request)
Faber      |   File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/aiohttp_apispec/middlewares.py", line 45, in validation_middleware
Faber      |     return await handler(request)
Faber      |   File "/home/indy/aries_cloudagent/admin/server.py", line 267, in apply_limiter
Faber      |     return await task
Faber      |   File "/home/indy/aries_cloudagent/protocols/issue_credential/v1_0/routes.py", line 1057, in credential_exchange_issue
Faber      |     ) = await credential_manager.issue_credential(cred_ex_record, comment=comment)
Faber      |   File "/home/indy/aries_cloudagent/protocols/issue_credential/v1_0/manager.py", line 551, in issue_credential
Faber      |     tails_path,
Faber      |   File "/home/indy/aries_cloudagent/issuer/indy.py", line 208, in create_credential
Faber      |     if tails_file_path is not None
Faber      |   File "/home/indy/aries_cloudagent/indy/__init__.py", line 15, in create_tails_reader
Faber      |     raise FileNotFoundError("Tails file does not exist.")
Faber      | FileNotFoundError: Tails file does not exist.

How to reproduce

Start the "Alice gets a phone" demo and step through it stopping right before issuing the credential.
At this point:

  • open a shell into the agent's container
  • go to /home/indy/.indy_client/tails and remove the contents of the directory (there should be two folders corresponding to two tails files)
  • exit the shell and open a new shell into the tails-server container
  • navigate to /tmp/tails-files and verify the tails files are present (both files previously removed from the agent's filesystem should be there)
  • exit the shell
  • continue the demo steps and try issuing the credential
  • once the credential offer is accepted on the phone, an exception similar to the above is thrown

Desired behaviour

The agent downloads the relevant file(s) from the tails server and proceeds to issuing a credential successfully.

@sklump
Copy link
Contributor

sklump commented Aug 28, 2020

I'm looking into this today

@sklump
Copy link
Contributor

sklump commented Aug 28, 2020

#702 addresses

@sklump sklump closed this as completed Aug 31, 2020
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

No branches or pull requests

2 participants