hyperledger-archives / aries-acapy-plugin-toolbox

Hyperledger Aries
https://wiki.hyperledger.org/display/aries
Apache License 2.0
23 stars 40 forks source link

indy.error.CommonInvalidState in demo caused by outdated TestNet genesis URL #149

Closed jkrupicka closed 1 year ago

jkrupicka commented 1 year ago

When completing this Hyperledger Aries Workshop, I encountered a problem with starting up the agents for the demo. In the demo directory, I run docker-compose -f docker-compose.alice-bob.yml up --build and Alice and Bob both start up, but they both shut down after indy.error.CommonInvalidState. I believe that this Discord message cites the same problem. The stack trace is below.

I determined that the problem is with the Indicio TestNet Genesis URL in demo/configs/alice.yml and demo/configs/bob.yml. The URL currently is https://raw.githubusercontent.com/Indicio-tech/indicio-network/master/genesis_files/pool_transactions_testnet_genesis, but I believe that Indicio has switched their naming convention from "master" to "main." Changing the URL to https://raw.githubusercontent.com/Indicio-tech/indicio-network/main/genesis_files/pool_transactions_testnet_genesis fixes the issue.

I will also submit a PR with this fix, but given that this is my first PR for aries-acapy-plugin-toolbox, I wanted to submit an issue with more information to make sure I'm not missing anything.


agent-alice_1   | Traceback (most recent call last):
agent-alice_1   |   File "/home/indy/.venv/lib/python3.6/site-packages/aries_cloudagent/ledger/indy.py", line 175, in open
agent-alice_1   |     self.handle = await indy.pool.open_pool_ledger(self.name, pool_config)
agent-alice_1   |   File "/home/indy/.venv/lib/python3.6/site-packages/indy/pool.py", line 88, in open_pool_ledger
agent-alice_1   |     open_pool_ledger.cb)
agent-alice_1   | indy.error.CommonInvalidState
agent-alice_1   | 
agent-alice_1   | The above exception was the direct cause of the following exception:
agent-alice_1   | 
agent-alice_1   | Traceback (most recent call last):
agent-alice_1   |   File "/home/indy/.venv/lib/python3.6/site-packages/aries_cloudagent/commands/start.py", line 72, in init
agent-alice_1   |     await startup
agent-alice_1   |   File "/home/indy/.venv/lib/python3.6/site-packages/aries_cloudagent/commands/start.py", line 28, in start_app
agent-alice_1   |     await conductor.setup()
agent-alice_1   |   File "/home/indy/.venv/lib/python3.6/site-packages/aries_cloudagent/core/conductor.py", line 176, in setup
agent-alice_1   |     self.root_profile, self.setup_public_did and self.setup_public_did.did
agent-alice_1   |   File "/home/indy/.venv/lib/python3.6/site-packages/aries_cloudagent/config/ledger.py", line 133, in ledger_config
agent-alice_1   |     async with ledger:
agent-alice_1   |   File "/home/indy/.venv/lib/python3.6/site-packages/aries_cloudagent/ledger/indy.py", line 277, in __aenter__
agent-alice_1   |     await self.pool.context_open()
agent-alice_1   |   File "/home/indy/.venv/lib/python3.6/site-packages/aries_cloudagent/ledger/indy.py", line 210, in context_open
agent-alice_1   |     await self.open()
agent-alice_1   |   File "/home/indy/.venv/lib/python3.6/site-packages/aries_cloudagent/ledger/indy.py", line 175, in open
agent-alice_1   |     self.handle = await indy.pool.open_pool_ledger(self.name, pool_config)
agent-alice_1   |   File "/home/indy/.venv/lib/python3.6/site-packages/aries_cloudagent/indy/sdk/error.py", line 27, in __exit__
agent-alice_1   |     ) from err_value
agent-alice_1   |   File "/home/indy/.venv/lib/python3.6/site-packages/aries_cloudagent/ledger/indy.py", line 175, in open
agent-alice_1   |     self.handle = await indy.pool.open_pool_ledger(self.name, pool_config)
agent-alice_1   |   File "/home/indy/.venv/lib/python3.6/site-packages/indy/pool.py", line 88, in open_pool_ledger
agent-alice_1   |     open_pool_ledger.cb)
agent-alice_1   | aries_cloudagent.ledger.error.LedgerConfigError: Exception opening pool ledger default: Error: Invalid library state
agent-alice_1   |   Caused by: Consistency proof verification failed
agent-alice_1   | 
agent-alice_1   | 
agent-alice_1   | Shutting down
demo_agent-bob_1 exited with code 0
demo_agent-alice_1 exited with code 0```
dbluhm commented 1 year ago

Resolved by #150