Open balachandarg-tw opened 2 months ago
Hello @balachandarg-tw, could you please list the steps to reproduce so we can try and replicate, and let us know what verifiable credential you are using?
@balachandarg-tw Please let us know if we can close this ticket.
Hi, We are trying to verify the credential with proof type "ed255192020". We are able to verify it successfully in sample node js project, but when we verify the same credential in React Native project, verification fails with below error response,
{ "verified": false, "results": [ { "proof": { "@context": [ "https://www.w3.org/2018/credentials/v1", "<context-url>", "https://w3id.org/security/suites/ed25519-2020/v1" ], "type": "Ed25519Signature2020", "created": "2024-05-09T09:10:05Z", "proofValue": "<proof-value>", "proofPurpose": "assertionMethod", "verificationMethod": "<verification-method-url>" }, "verified": false, "error": { "name": "TypeError", "message": "Cannot read property 'digest' of undefined", "stack": "TypeError: Cannot read property 'digest' of undefined\n at ?anon_0_ (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:163234:115)\n at next (native)\n at asyncGeneratorStep (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:31348:26)\n at _next (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:31367:29)\n at anonymous (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:31372:14)\n at tryCallTwo (address at InternalBytecode.js:1:1222)\n at doResolve (address at InternalBytecode.js:1:2541)\n at Promise (address at InternalBytecode.js:1:1318)\n at anonymous (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:31364:25)\n at apply (native)\n at sha256digest (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:163239:35)\n at anonymous (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:162962:87)\n at tryCallOne (address at InternalBytecode.js:1:1180)\n at anonymous (address at InternalBytecode.js:1:1874)\n at apply (native)\n at anonymous (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:38101:26)\n at _callTimer (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:37980:17)\n at _callReactNativeMicrotasksPass (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:38025:17)\n at callReactNativeMicrotasks (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:38231:44)\n at __callReactNativeMicrotasks (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:2154:48)\n at anonymous (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:1927:45)\n at __guard (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:2126:15)\n at flushedQueue (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:1926:21)\n at invokeCallbackAndReturnFlushedQueue (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:1920:33)" } } ], "error": { "name": "VerificationError", "errors": [ { "name": "TypeError", "message": "Cannot read property 'digest' of undefined", "stack": "TypeError: Cannot read property 'digest' of undefined\n at ?anon_0_ (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:163234:115)\n at next (native)\n at asyncGeneratorStep (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:31348:26)\n at _next (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:31367:29)\n at anonymous (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:31372:14)\n at tryCallTwo (address at InternalBytecode.js:1:1222)\n at doResolve (address at InternalBytecode.js:1:2541)\n at Promise (address at InternalBytecode.js:1:1318)\n at anonymous (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:31364:25)\n at apply (native)\n at sha256digest (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:163239:35)\n at anonymous (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:162962:87)\n at tryCallOne (address at InternalBytecode.js:1:1180)\n at anonymous (address at InternalBytecode.js:1:1874)\n at apply (native)\n at anonymous (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:38101:26)\n at _callTimer (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:37980:17)\n at _callReactNativeMicrotasksPass (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:38025:17)\n at callReactNativeMicrotasks (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:38231:44)\n at __callReactNativeMicrotasks (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:2154:48)\n at anonymous (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:1927:45)\n at __guard (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:2126:15)\n at flushedQueue (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:1926:21)\n at invokeCallbackAndReturnFlushedQueue (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.mytestapp&modulesOnly=false&runModule=true:1920:33)" } ] } }
Dependencies added: "react": "18.2.0", "react-native": "0.74.1", "@digitalcredentials/vc": "^7.0.0", "@digitalcredentials/ed25519-verification-key-2020": "^4.0.0", "@digitalcredentials/jsonld": "^5.2.1", "@digitalcredentials/jsonld-signatures": "^9.3.1", "@digitalcredentials/ed25519-signature-2020": "digitalcredentials/ed25519-signature-2020",
would be helpful if someone can suggest any solutions or workaround.
Thank you.