digitalcredentials / vc

JavaScript implementation of W3C Verifiable Credentials standard
BSD 3-Clause "New" or "Revised" License
4 stars 4 forks source link

RangeError if VC verification fails #17

Open swatigoel opened 7 months ago

swatigoel commented 7 months ago

Hi, We are using this library with version ^1.1.2. We are getting an error while verifying the VC.

Response we get after verification is

 {
    "verified": false,
    "result": {
        "error": {
            "name": "VerificationError"
        }
    },
    "error": {
        "errors": [
            {
                "name": "RangeError",
                "message": "Maximum call stack size exceeded (native stack depth)"
            }
        ]
    }
 }

After debugging, we could find that, in this file @digitalcredentials/jsonld/lib/jsonld.js canonize is being imported @digitalcredentials/rdf-canonize. In this library, we could see recursive call is happening for canonize method.

Because of this, we are unable to identify exact reasoning for verification failure.

Would be good if someone can help us here?

Thank You !!

kayaelle commented 7 months ago

@swatigoel - thanks for contacting us about this. Our team is looking into it. Stay tuned.

swatigoel commented 6 months ago

Hi @kayaelle @dmitrizagidulin Do we have any ETA on this?

swatigoel commented 6 months ago

@kayaelle We have written a js library to verify VC independently. With this library we are able to verify all VCs even the one which were failing earlier. Here is the link for library https://github.com/tw-mosip/verify-credential-js/tree/xhr-movement

We integrated this library in our Application but got same RangeError.

Is it related to react native framework we are using to build our Application? 🤔 Sharing this here, if it can help to narrow down the issue.

alexfigtree commented 2 months ago

@swatigoel Thank you for this information, we have added this issue to our backlog.