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

/present-proof-2.0/send-proposal throws exception on the verifying side #1474

Closed
etschelp opened this issue Nov 3, 2021 · 1 comment · Fixed by #1667
Closed

/present-proof-2.0/send-proposal throws exception on the verifying side #1474

etschelp opened this issue Nov 3, 2021 · 1 comment · Fixed by #1667
Assignees

Comments

@etschelp
Copy link
Contributor

etschelp commented Nov 3, 2021

I'm trying to send a indy proof proposal via /present-proof-2.0/send-proposal, as I learned this endpoint now expects a proof request vs the v1 proposal. So to replicate the v1 behavior I'm sending a very specific proof request that describes my intended proposal as close as possible. So this is my payload:

{
    "by_format": {
        "pres_proposal": {
            "indy": {
                "name": "Test V2",
                "version": "2.0",
                "requested_attributes": {
                    "iban": {
                        "name": "iban",
                        "restrictions": [
                            {
                                "schema_id": "M6Mbe3qx7vB4wpZF4sBRjt:2:bank_account:1.0",
                                "cred_def_id": "EraYCDJUPsChbkw7S1vV96:3:CL:571:bob-bank-04",
                                "attr::iban::value": "mytestvalue"
                            }
                        ]
                    }
                },
                "requested_predicates": {}
            }
        }
    }
}

This works on the proofing side, but the verifier logs the following exception:

2021-11-01 14:42:08,959 aries_cloudagent.core.conductor ERROR Exception in message handler:
Traceback (most recent call last):
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/core/dispatcher.py", line 197, in handle_message
    await handler(context, responder)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/protocols/present_proof/v2_0/handlers/pres_proposal_handler.py", line 64, in handle
    comment=context.message.comment,
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/protocols/present_proof/v2_0/manager.py", line 135, in create_bound_request
    request_data,
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/protocols/present_proof/v2_0/formats/indy/handler.py", line 117, in create_bound_request
    indy_proof_request["name"] = request_data.get("name") or "proof-request"
AttributeError: 'NoneType' object has no attribute 'get'

By looking at the handler this kind of makes sense, because the variable that handles the request is assigned as a None type as a default which probably means it is not assigned as intended.

  async def create_bound_request(
        self,
        pres_ex_record: V20PresExRecord,
        request_data: dict = None,
    )
        // ...
        indy_proof_request["name"] = request_data.get("name") or "proof-request"
@shaangill025 shaangill025 self-assigned this Nov 3, 2021
@ffendt
Copy link

ffendt commented Feb 25, 2022

Also ran into this, @shaangill025 are you currently working on a solution for 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.

3 participants