Hi guys,
In your recent blockcerts-verifier version 1.57.2 we are getting the following error Failed JSON-LD normalization .
We were searching for details and we found a solutionđ. If you remove the publicKey attribute inside the verification general attribute the problem will be fixed without affecting the Blockcerts verification process.
The problem with this is that we need to remove the publicKey attribute in all the previous generated JSONs which is quite expensiveâ:cry:.
Looking forward to hearing from you and find alternatives.
Maybe is because the current public key structure has the following syntax with â-â symbol I dont know.
âverificationâ: {
âtypeâ: [
âMerkleProofVerification2017â,
âExtensionâ
],
âpublicKeyâ: âecdsa-koblitz-pubkey0x8Ad1fC3f16795Ab926BD3CHANGEDFORSECURITYâ
}
Hello, Wondering if there is a solution available that doesnât involve generating new certificates. Old certificate created in 2022, now failed with âFailed JSON-LD normalizationâ error.
In my case, I removed the âverification.publicKeyâ attribute from the previously generated JSONs, and it worked. With the solution I proposed, you donât need to generate new certificates; just alter the issued certificates whenever the user requires a copy.
@jkwan similarly to @dannysuarez I would need to investigate your data model to pinpoint the issue (unless you can do it yourself? If I recall correctly the error shows what property is the culprit).
@lemoustachiste i am also facing this error that is failed json-ld normalization with our previously generated certificates which were able to verify successfully in the past. I have tried your solution of removing verification.publickey attribute from json file but it is not solving the problem or making any difference. Still facing failed json-ld normalization error. Please help in this regard.
@Farazhs every error will be specific to oneâs model so what solved it for someone wonât necessarily work for you.
I think if you look in the console you should see the js error thrown by the jsonld library. This error indicates what property isnât properly normalized so that should get you on track.
If you canât figure it out with this, please share with me an example cert so I can further investigate.
For anyone facing this issue, using the jsonld playground will guide you towards your error: JSON-LD Playground
When doing the hash comparison, we drop the signature or proof property, so you should analyze only the bare document in the playground. You will then need to modify your @context declaration accordingly, or modify the document according to your business needs and I canât have a say there.
It seems I have deactivated safeMode for MerkleProof2019 but not MerkleProof2017, and my inclination is to rather re-enable it in MerkleProof2019 verification, rather than deactivate it for MerkleProof2017 too.