openwallet-foundation / acapy

ACA-Py is a foundation for building decentralized identity applications and services running in non-mobile environments.
https://aca-py.org
Apache License 2.0
421 stars 515 forks source link

aries_cloudagent.storage.error.StorageNotFoundError #1113

Closed Nabil-oussa closed 3 years ago

Nabil-oussa commented 3 years ago

Hello, I got an issue when I launch agents using this project, and the error is the following :

verifier_1 | 2021-04-23 08:55:08,723 aries_cloudagent.core.dispatcher ERROR Handler error: presentation_exchange_verify_presentation verifier_1 | Traceback (most recent call last): verifier_1 | File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/aries_cloudagent/storage/indy.py", line 106, in get_record verifier_1 | self._wallet.handle, record_type, record_id, options_json verifier_1 | File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/indy/non_secrets.py", line 319, in get_wallet_record verifier_1 | get_wallet_record.cb) verifier_1 | indy.error.WalletItemNotFound

swcurran commented 3 years ago

It is likely that in your startup parameters, you have only partially (or not at all) specified the storage that you want to use. Can you share what your start up parameters are for ACA-Py?

Nabil-oussa commented 3 years ago

FROM bcgovimages/von-image:py36-1.14-1

ARG VERIFIER_SEED ARG VERIFIER_AGENT_ENDPOINT ARG VERIFIER_WALLET_KEY ARG VERIFIER_ADMIN_API_KEY ARG GENESIS_URL ARG INBOUND_PORT ARG API_PORT

ENV SEED=$VERIFIER_SEED ENV AGENT_ENDPOINT=$VERIFIER_AGENT_ENDPOINT ENV WALLET_KEY=$VERIFIER_WALLET_KEY ENV ADMIN_API_KEY=$VERIFIER_ADMIN_API_KEY ENV GENESIS=$GENESIS_URL ENV AGENT_INBOUND_PORT=$INBOUND_PORT ENV ADMIN_API_PORT=$API_PORT

RUN pip install aries-cloudagent

ENTRYPOINT ["/bin/bash", "-c", "aca-py start --inbound-transport http 0.0.0.0 $AGENT_INBOUND_PORT \ --outbound-transport http \ --admin 0.0.0.0 $ADMIN_API_PORT \ --seed $SEED \ --endpoint $AGENT_ENDPOINT \ --wallet-key $WALLET_KEY \ --wallet-name VaxCertVerifier \ --wallet-type indy \ --label CertVerifier \ --admin-api-key $ADMIN_API_KEY \ --auto-accept-invites \ --auto-accept-requests \ --auto-respond-messages \ --auto-respond-credential-proposal \ --auto-respond-credential-offer \ --auto-respond-credential-request \ --auto-respond-presentation-proposal \ --auto-respond-presentation-request \ --auto-store-credential \ --enable-undelivered-queue \ --genesis-url $GENESIS", "--"]

swcurran commented 3 years ago

I'm not an expert on this, but pretty sure you are missing the wallet-storage-type parameter:

  --wallet-storage-type <storage-type>
                        Specifies the type of Indy wallet backend to use.
                        Supported internal storage types are 'basic' (memory),
                        'default' (sqlite), and 'postgres_storage'. The
                        default, if not specified, is 'default'. [env var:
                        ACAPY_WALLET_STORAGE_TYPE]
swcurran commented 3 years ago

It does say that there is a default, so I may not be right on this. Others on team might be able to provide more help -- @andrewwhitehead perhaps?

ianco commented 3 years ago

It looks like the error is raised when verifying a presentation: ERROR Handler error: presentation_exchange_verify_presentation

@Nabil-oussa can you give some more information about how you're starting the agents and what is the set of steps that lead you to this error?

Nabil-oussa commented 3 years ago

@swcurran thunks for your response. @ianco I'm using docker commands to start the agents -> docker-compose build docker-compose up

ianco commented 3 years ago

Can you upload the full set of logs?

Nabil-oussa commented 3 years ago
Sans titre
ianco commented 3 years ago

Something is calling the proof verification endpoint and there is no presentation exchange record. I'm not sure how this is happening, are you calling one of the endpoints or does one of the endpoints get called as part of the startup script?

Nabil-oussa commented 3 years ago

no I did not touch any parameter, but I restarted my PC it seems that this error is no more, I will check and I will come back to you. Thank you very much for your answers and help