Failed JSON-LD normalization

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::cry::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”: [
“publicKey”: “ecdsa-koblitz-pubkey0x8Ad1fC3f16795Ab926BD3CHANGEDFORSECURITY”

this is being treated here: Failed JSON-LD normalization · Issue #1485 · blockchain-certificates/blockcerts-verifier · GitHub

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.

Hello there,

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).

I removed ‘verification.publicKey’ attribute from cert file, but doesn’t seems like to make any difference in my case.

@lemoustachiste Thanks, how can I DM you my cert file?

@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.