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

Issuance fails #69

Closed
GHkrishna opened this issue Aug 13, 2024 · 3 comments · Fixed by #70
Closed

Issuance fails #69

GHkrishna opened this issue Aug 13, 2024 · 3 comments · Fixed by #70

Comments

@GHkrishna
Copy link
Contributor

I am trying to issue credentials by uncommenting LOCUST_FILES=locustMediatorIssue.py as suggested by Quickstart

However, I am encountering the following error,

connection = self.client.accept_invite(self.invite['invitation_url'])
TypeError: 'NoneType' object is not subscriptable

The error comes from,

@task
    def accept_invite(self):
        self.client.ensure_is_running()

        connection = self.client.accept_invite(self.invite['invitation_url'])
        self.connection = connection

Here, the invite is set as follows,

    @task
    def get_invite(self):
        invite = self.client.issuer_getinvite()
        self.invite = invite

But the invite when printed is 'None'

I have following config in .env as,

ISSUER_URL=http://issuer:8150
ISSUER_HEADERS={}

I also tried replacing the above with my ip, localhost, 0.0.0.0, 127.0.0.1. But there seems no change. Also I am not able to see any logs in the issuer container that are otherwise printed in case we do any such operations(like creating an OOB issuance) directly on the issuer agent

@anwalker293
Copy link
Contributor

Hi @GHkrishna! Here's a list of things to try :) (in order)

  • Pull for recent changes to main (git fetch && git pull)
  • Follow the quick start instructions, including to put in the mediation URL, as well as anchoring a DID, creating a cred def, etc.
  • ^Follow the remaining instructions + run the test :)

I was able to get everything working, but please let me know if you run into issues!

@GHkrishna
Copy link
Contributor Author

I tried with multiple machines of different configs(all linux), but still unable to run the demo.

I am facing the same issue as mentioned above.

Contents

Here's the content of my .env

# docker-compose.yml commands won't work out of the box - 
# please make sure to update the command according to your environment.
MEDIATION_URL=http://mediator:3000?c_i=eyJAdHlwZSI6ICJkaWQ6c292OkJ6Q2JzTlloTXJqSGlxWkRUVUFTSGc7c3BlYy9jb25uZWN0aW9ucy8xLjAvaW52aXRhdGlvbiIsICJAaWQiOiAiYzE1MzE5NGQtMzRiZi00YWJlLWJmNDctMTAxYzM4ODkzMTU0IiwgInNlcnZpY2VFbmRwb2ludCI6ICJodHRwOi8vbWVkaWF0b3I6MzAwMCIsICJsYWJlbCI6ICJNZWRpYXRvciAoQWRtaW4pIiwgInJlY2lwaWVudEtleXMiOiBbIkJzRlNIWXhMbnVoZ3ZpYkU0UjZBRTR5ejVNandzMXRESFN6a0pyU1lLODRyIl19

# If clustered environment
MASTER_HOST= # external ip
MASTER_PORT=8089
AGENT_IP= # external ip (load balancer if clustered)

# Period an agent will wait before running another ping
LOCUST_MIN_WAIT=1
LOCUST_MAX_WAIT=10

ISSUER_URL=http://issuer:8150
ISSUER_HEADERS={}

VERIFIER_URL=http://issuer:8150
VERIFIER_HEADERS={}

CRED_DEF=RNETGAU1vmCHtpxnhEyrNp:3:CL:14159:default
LEDGER=indicio # or candy or whichever ledger is your preference
CRED_ATTR='[{"mime-type": "text/plain","name": "score","value": "test"}]'
SCHEMA=RNETGAU1vmCHtpxnhEyrNp:2:prefs:1.0
VERIFIED_TIMEOUT_SECONDS=60 # seconds for verified: true

WITH_MEDIATION=True 
#LOCUST_FILES=locustMediatorPing.py
#LOCUST_FILES=locustMediatorMsg.py
LOCUST_FILES=locustMediatorIssue.py
#LOCUST_FILES=locustMediatorPresentProof.py

# Increase the END_PORT if you want to run a lot of agents in parallel
# If doing large clustering, it is recommended to increase ports exposed
START_PORT=10000
END_PORT=10100

MESSAGE_TO_SEND="Lorem ipsum dolor sit amet consectetur, adipiscing elit nisi aptent rutrum varius, class non nullam etiam. Ac purus donec morbi litora vivamus nec semper suscipit vehicula, aliquet parturient leo mollis in mauris quis nisi tincidunt, sociis accumsan senectus pellentesque erat cras sociosqu phasellus augue, posuere ligula scelerisque tempus dapibus enim torquent facilisi. Imperdiet gravida justo conubia congue senectus porta vivamus netus rhoncus nec, mauris tristique semper feugiat natoque nunc nibh montes dapibus proin, egestas luctus sollicitudin maecenas malesuada pharetra eleifend nam ultrices. Iaculis fringilla penatibus dictumst varius enim elementum justo senectus, pretium mauris cum vel tempor gravida lacinia auctor a, cursus sed euismod scelerisque vivamus netus aenean. Montes iaculis dui platea blandit mattis nec urna, diam ridiculus augue tellus vivamus justo nulla, auctor hendrerit aenean arcu venenatis tristique feugiat, odio pellentesque purus nascetur netus fringilla. S."

# Mediator Configuration
MEDIATOR_DNS=mediator

# Aca-py configuration
ACAPY_GENESIS_URL=https://raw.githubusercontent.com/Indicio-tech/indicio-network/main/genesis_files/pool_transactions_testnet_genesis
ACCOUNT="test"
PASSWORD="test"
ADMIN_ACCOUNT="test"
ADMIN_PASSWORD="test"

Note: The above schemaID and CredefId is the one that I have created as per the instruction.

As per suggested in the video, I didn't get any error regarding the pickup protocol. Still tested it with both pickup V2 and implicit in load-agent/agent.ts. Still the same error.

Error

This is the error from locust for your reference,

From failures

Screenshot from 2024-08-18 09-56-49

From Exceptions

Screenshot from 2024-08-18 09-57-06

I see no reasons to why this must fail as per the documentation. I also had a look at the debugging section, but was unable to find anything helpful regarding this specific issue.

Another thing to note is, I tried by cloning the exact version of credo(afj-0.4.2, as per the package.json) into the root directory as suggested by the docs, as AFJ has now been updated to credo-ts. Can this be an issue?

Please let me know if there's anything required from my end to help debug the issue faster, this seems like a very interesting issue.

@GHkrishna
Copy link
Contributor Author

Update on this,

We were able to run the Quickstart with the following changes. I have created a PR #70 for this.

The issue was while setting the environment variables for Issuer type below,

ISSUER_TYPE = os.getenv("ISSUER_TYPE", "acapy")
VERIFIER_TYPE = os.getenv("VERIFIER_TYPE", "acapy")

Since, the ISSUER_TYPE and VERIFIER_TYPE was missing in the sample.demo.env the above code also failed to assign the default value for some reason. For now until we have a definite solution upon why the default values are not picked, we can add the types in env's as the PR

@anwalker293 can you please have a look at this?

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 a pull request may close this issue.

2 participants