Reasons for getting Invalid signed properties hashing, SignedProperties with id='xadesSignedProperties' error

Can you explain what the possible reasons to get this error “Invalid signed properties hashing, SignedProperties with id=‘xadesSignedProperties’”? So that I can debug one by one. I checked other queries in the forum as well as the manual, but I am not able to trace this error. Having the reasons for this error, might help me to trace the issue. I am not using the zatca tools, I have my own code.

Perform the following two operations before creating the hash:

  1. Replace “\r\n” with “\n”
  2. Trim the input

This worked for me.