AnonSolutions / django-indy-community

Django wrapper for a cloud-base Hyperledger Indy Agent
Other
3 stars 6 forks source link

Error in demo version #36

Open guilherme-funchal opened 4 years ago

guilherme-funchal commented 4 years ago

Hi

I need help, I tried to use the demo version, but I get the following error in the terminal :

indy-django_1 | Traceback (most recent call last): indy-django_1 | File "manage.py", line 15, in indy-django_1 | execute_from_command_line(sys.argv) indy-django_1 | File "/home/indy/.pyenv/versions/3.6.5/lib/python3.6/site-packages/django/core/management/init.py", line 381, in execute_from_command_line indy-django_1 | utility.execute() indy-django_1 | File "/home/indy/.pyenv/versions/3.6.5/lib/python3.6/site-packages/django/core/management/init.py", line 375, in execute indy-django_1 | self.fetch_command(subcommand).run_from_argv(self.argv) indy-django_1 | File "/home/indy/.pyenv/versions/3.6.5/lib/python3.6/site-packages/django/core/management/base.py", line 323, in run_from_argv indy-django_1 | self.execute(*args, *cmd_options) indy-django_1 | File "/home/indy/.pyenv/versions/3.6.5/lib/python3.6/site-packages/django/core/management/base.py", line 364, in execute indy-django_1 | output = self.handle(args, *options) indy-django_1 | File "/home/indy/indy_community_demo/indy_community_demo/indy_community/management/commands/loads_orgs.py", line 91, in handle indy-django_1 | org = org_signup(user, password, name, org_attrs=org_attrs, org_relation_attrs=relation_attrs, org_role=org_role, org_ico_url=ico_url) indy-django_1 | File "/home/indy/indy_community_demo/indy_community_demo/indy_community/registration_utils.py", line 74, in org_signup indy-django_1 | org = org_provision(org, raw_password, org_role) indy-django_1 | File "/home/indy/indy_community_demo/indy_community_demo/indy_community/registration_utils.py", line 59, in org_provision indy-django_1 | creddef = create_creddef(org.wallet, schema, schema.schema_name + '-' + org.wallet.wallet_name, schema.schema_template) indy-django_1 | File "/home/indy/indy_community_demo/indy_community_demo/indy_community/agent_utils.py", line 180, in create_creddef indy-django_1 | cred_def = run_coroutine_with_args(CredentialDef.create, 'credef_uuid', creddef_name, indy_schema.ledger_schema_id, 0) indy-django_1 | File "/home/indy/indy_community_demo/indy_community_demo/indy_community/utils.py", line 91, in run_coroutine_with_args indy-django_1 | return loop.run_until_complete(coroutine(args)) indy-django_1 | File "/home/indy/.pyenv/versions/3.6.5/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete indy-django_1 | return future.result() indy-django_1 | File "/home/indy/.pyenv/versions/3.6.5/lib/python3.6/site-packages/vcx/api/credential_def.py", line 76, in create indy-django_1 | c_params) indy-django_1 | File "/home/indy/.pyenv/versions/3.6.5/lib/python3.6/site-packages/vcx/api/vcx_base.py", line 47, in _create indy-django_1 | cls.create.cb) indy-django_1 | vcx.error.VcxError: (<ErrorCode.CreateCredentialDefErr: 1034>, {'backtrace': '', 'cause': 'Error: Unknown libindy error\n Caused by: Error: Pool timeout\n Caused by: Consensus is impossible\n\n', 'error': 'Call to create Credential Definition failed', 'message': 'Error: Call to create Credential Definition failed\n Caused by: Error: Unknown libindy error\n Caused by: Error: Pool timeout\n Caused by: Consensus is impossible\n\n\n'})

ianco commented 4 years ago

This is caused by an incompatible Indy version in the latest von-network code. (The Indy version in django-indy-community is older).

To fix, you need to checkout and build a specific commit of von-network. The README file is updated.

For von-network:

git clone https://github.com/bcgov/von-network.git
cd von-network
git checkout e1dee37ce4a8ef76c37f03a1e0af399af9e6a820
./manage build
./manage start

... and for django-indy-community, use the published base-image, do not run the step to build it locally:

git clone https://github.com/AnonSolutions/django-indy-community.git
# this is necessary only on 'nix since we are mounting local directories
chmod -R a+rwx django-indy-community/indy_community_demo
cd django-indy-community/docker
#./base-image      # note that this takes about 30 mintues
./manage start

Also when stopping and re-starting the demo, make sure to run ./manage rm in BOTH shells (von-network and django-indy-community) otherwise the data in the two sets of docker containers will get out of sync.

guilherme-funchal commented 4 years ago

thank you very much, everything working. I did not understand the function of the "wallet" in the interface.