Erorr when Compliance Invoice ,Invalid signed properties hashing, SignedProperties with id='xadesSignedProperties'

hello everyone, i am use my own solution to generate a csr, qr,…etc ,everything in portal environment is ok, and i got a successfully response in all steps of validating file (xml), but when try to using simulation environment, i got error

"errorMessages": [
            {
                "type": "ERROR",
                "code": "signed-properties-hashing",
                "category": "CERTIFICATE_ERRORS",
                "message": "Invalid signed properties hashing, SignedProperties with id='xadesSignedProperties'",
                "status": "ERROR"
            }
        ]

and this is my xml file content, please note that i am will not able to use SDK, because i must use my own solution

<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"><ext:UBLExtensions>
  <ext:UBLExtension>
      <ext:ExtensionURI>urn:oasis:names:specification:ubl:dsig:enveloped:xades</ext:ExtensionURI>
      <ext:ExtensionContent>
          <sig:UBLDocumentSignatures xmlns:sig="urn:oasis:names:specification:ubl:schema:xsd:CommonSignatureComponents-2" xmlns:sac="urn:oasis:names:specification:ubl:schema:xsd:SignatureAggregateComponents-2" xmlns:sbc="urn:oasis:names:specification:ubl:schema:xsd:SignatureBasicComponents-2">
              <sac:SignatureInformation> 
                  <cbc:ID>urn:oasis:names:specification:ubl:signature:1</cbc:ID>
                  <sbc:ReferencedSignatureID>urn:oasis:names:specification:ubl:signature:Invoice</sbc:ReferencedSignatureID>
                  <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="signature">
                      <ds:SignedInfo>
                          <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>
                          <ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"/>
                          <ds:Reference Id="invoiceSignedData" URI="">
                              <ds:Transforms>
                                  <ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
                                      <ds:XPath>not(//ancestor-or-self::ext:UBLExtensions)</ds:XPath>
                                  </ds:Transform>
                                  <ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
                                      <ds:XPath>not(//ancestor-or-self::cac:Signature)</ds:XPath>
                                  </ds:Transform>
                                  <ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
                                      <ds:XPath>not(//ancestor-or-self::cac:AdditionalDocumentReference[cbc:ID='QR'])</ds:XPath>
                                  </ds:Transform>
                                  <ds:Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>
                              </ds:Transforms>
                              <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
                              <ds:DigestValue>Qgv+2fL71/c86dLOAbhZVPc15ZD9gmc9v9dteVXSfzA=</ds:DigestValue>
                          </ds:Reference>
                          <ds:Reference Type="http://www.w3.org/2000/09/xmldsig#SignatureProperties" URI="#xadesSignedProperties">
                              <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
                              <ds:DigestValue>l7HUFKYe4lMSGBS4IqQYTdE405I7KvknIDJ9TBpB1Qw=</ds:DigestValue>
                          </ds:Reference>
                      </ds:SignedInfo>
                      <ds:SignatureValue>MEYCIQC1HeIQABye2rKOeDAyDg+jUjSALNQYopS9LQIZO1U5fgIhAOSZrgVbRhXqM9jpO/wegl+qlblfajMsqxX7k0+6xadB</ds:SignatureValue>
                      <ds:KeyInfo>
                          <ds:X509Data>
                              <ds:X509Certificate>MIICCjCCAbCgAwIBAgIGAZZiVLufMAoGCCqGSM49BAMCMBUxEzARBgNVBAMMCmVJbnZvaWNpbmcwHhcNMjUwNDIzMTEwNzE3WhcNMzAwNDIyMjEwMDAwWjBEMQ8wDQYDVQQDDAZOYWRlZXIxCzAJBgNVBAYTAlNBMRMwEQYDVQQLDAozMDAwNDkxMDI0MQ8wDQYDVQQKDAZOYWRlZXIwVjAQBgcqhkjOPQIBBgUrgQQACgNCAATSf8xR0R6l+4CQG0bgIr6ghJ3NLC4tupb+N2TxbjUoPd7ojSRhrke3f0ZWqdEPGUajUqr51Ohuw9G9MCh1NFsEo4G/MIG8MAwGA1UdEwEB/wQCMAAwgasGA1UdEQSBozCBoKSBnTCBmjFEMEIGA1UEBAw7MS1OYWRlZXJ8Mi1PcGVyYXRpb258My0yOTMyYzNhOC02YzNkLTQ2OGItODQ0Ni0yMjg1OTQ1ODc2Y2UxHzAdBgoJkiaJk/IsZAEBDA8zMTEwODI0OTAyMTAwMDMxDTALBgNVBAwMBDExMDAxDzANBgNVBBoMBlJpeWFkaDERMA8GA1UEDwwIQnVzaW5lc3MwCgYIKoZIzj0EAwIDSAAwRQIhALQbm37rnGT/P82DS/YimkTcKSrU0yZZzEt6TwUyBKHfAiBf7mIr+pXkG9/Xtkh5nXKPI+aSNsxpFjFWu40HtUmewg==</ds:X509Certificate>
                          </ds:X509Data>
                      </ds:KeyInfo>
                      <ds:Object>
                          <xades:QualifyingProperties xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" Target="signature">
                              <xades:SignedProperties Id="xadesSignedProperties">
                                  <xades:SignedSignatureProperties>
                                      <xades:SigningTime>2025-04-23T11:07:25</xades:SigningTime>
                                      <xades:SigningCertificate>
                                          <xades:Cert>
                                              <xades:CertDigest>
                                                  <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
                                                  <ds:DigestValue>NGQzMmFmZTdhZDJhMDIzMmIwMWFlOTBlNDM4ZmU1YmExNjU2NzQ4NjBmYzhjZTdhMGUwOGZkNjJiMzVmNTUzNA==</ds:DigestValue>
                                              </xades:CertDigest>
                                              <xades:IssuerSerial>
                                                  <ds:X509IssuerName>CN=eInvoicing</ds:X509IssuerName>
                                                  <ds:X509SerialNumber>1745406442399</ds:X509SerialNumber>
                                              </xades:IssuerSerial>
                                          </xades:Cert>
                                      </xades:SigningCertificate>
                                  </xades:SignedSignatureProperties>
                              </xades:SignedProperties>
                          </xades:QualifyingProperties>
                      </ds:Object>
                  </ds:Signature>
              </sac:SignatureInformation>
          </sig:UBLDocumentSignatures>
      </ext:ExtensionContent>
  </ext:UBLExtension>
</ext:UBLExtensions>

    <cbc:ProfileID>reporting:1.0</cbc:ProfileID>
    <cbc:ID>935</cbc:ID>
    <cbc:UUID>65ec0f44-ce5a-4d6b-9c2a-2c76cf070396</cbc:UUID>
    <cbc:IssueDate>2025-04-23</cbc:IssueDate>
    <cbc:IssueTime>11:07:25</cbc:IssueTime>
    <cbc:InvoiceTypeCode name="0211010">383</cbc:InvoiceTypeCode>
    <cbc:DocumentCurrencyCode>SAR</cbc:DocumentCurrencyCode>
    <cbc:TaxCurrencyCode>SAR</cbc:TaxCurrencyCode>
    <cac:BillingReference>
       <cac:InvoiceDocumentReference>
          <cbc:ID>?Invoice Number: 354; Invoice Issue Date: 2021-02-10?</cbc:ID>
       </cac:InvoiceDocumentReference>
    </cac:BillingReference>
    <cac:AdditionalDocumentReference>
       <cbc:ID>ICV</cbc:ID>
       <cbc:UUID>70</cbc:UUID>
    </cac:AdditionalDocumentReference>
    <cac:AdditionalDocumentReference>
       <cbc:ID>PIH</cbc:ID>
       <cac:Attachment>
          <cbc:EmbeddedDocumentBinaryObject mimeCode="text/plain">NWZlY2ViNjZmZmM4NmYzOGQ5NTI3ODZjNmQ2OTZjNzljMmRiYzIzOWRkNGU5MWI0NjcyOWQ3M2EyN2ZiNTdlOQ==</cbc:EmbeddedDocumentBinaryObject>
       </cac:Attachment>
    </cac:AdditionalDocumentReference><cac:AdditionalDocumentReference>
        <cbc:ID>QR</cbc:ID>
        <cac:Attachment>
            <cbc:EmbeddedDocumentBinaryObject mimeCode="text/plain">AQZOYWRlZXICDzMxMTA4MjQ5MDIxMDAwMwMUMjAyNS0wNC0yM1QxMTowNzoyNVoEBjI1MC4wMAUEMC4wMAYsbDdIVUZLWWU0bE1TR0JTNElxUVlUZEU0MDVJN0t2a25JREo5VEJwQjFRdz0HYE1FWUNJUUMxSGVJUUFCeWUycktPZURBeURnK2pValNBTE5RWW9wUzlMUUlaTzFVNWZnSWhBT1NacmdWYlJoWHFNOWpwTy93ZWdsK3FsYmxmYWpNc3F4WDdrMCs2eGFkQghYMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAE0n/MUdEepfuAkBtG4CK+oISdzSwuLbqW/jdk8W41KD3e6I0kYa5Ht39GVqnRDxlGo1Kq+dTobsPRvTAodTRbBAlHMEUCIQC0G5t+65xk/z/Ng0v2IppE3Ckq1NMmWcxLek8FMgSh3wIgX+5iK/qV5Bvf17ZIeZ1yjyPmkjbMaRYxVruNB7VJnsI=</cbc:EmbeddedDocumentBinaryObject>
        </cac:Attachment>
</cac:AdditionalDocumentReference><cac:Signature>
      <cbc:ID>urn:oasis:names:specification:ubl:signature:Invoice</cbc:ID>
      <cbc:SignatureMethod>urn:oasis:names:specification:ubl:dsig:enveloped:xades</cbc:SignatureMethod>
</cac:Signature>
    
    <cac:AccountingSupplierParty>
         <cac:Party>
             <cac:PartyIdentification>
                 <cbc:ID schemeID="CRN">1010515264</cbc:ID>
             </cac:PartyIdentification>
             <cac:PostalAddress>
                 <cbc:StreetName>شارع الامام سعود</cbc:StreetName>
                 <cbc:BuildingNumber>1234</cbc:BuildingNumber>
                 <cbc:CitySubdivisionName>Riyadh</cbc:CitySubdivisionName>
                 <cbc:CityName>Riyadh</cbc:CityName>
                 <cbc:PostalZone>11254</cbc:PostalZone>
                 <cac:Country>
                     <cbc:IdentificationCode>SA</cbc:IdentificationCode>
                 </cac:Country>
             </cac:PostalAddress>
             <cac:PartyTaxScheme>
                 <cbc:CompanyID>311082490210003</cbc:CompanyID>
                 <cac:TaxScheme>
                     <cbc:ID>VAT</cbc:ID>
                 </cac:TaxScheme>
             </cac:PartyTaxScheme>
             <cac:PartyLegalEntity>
                 <cbc:RegistrationName>Nadeer</cbc:RegistrationName>
             </cac:PartyLegalEntity>
         </cac:Party>
     </cac:AccountingSupplierParty>
      <cac:AccountingCustomerParty>
         <cac:Party>
             <cac:PostalAddress>
                 <cbc:StreetName>صلاح الدين | Salah Al-Din</cbc:StreetName>
                 <cbc:BuildingNumber>1111</cbc:BuildingNumber>
                 <cbc:CitySubdivisionName>المروج | Al-Murooj</cbc:CitySubdivisionName>
                 <cbc:CityName>الرياض | Riyadh</cbc:CityName>
                 <cbc:PostalZone>12222</cbc:PostalZone>
                 <cac:Country>
                     <cbc:IdentificationCode>SA</cbc:IdentificationCode>
                 </cac:Country>
             </cac:PostalAddress>
             <cac:PartyTaxScheme>
                 <cbc:CompanyID>399999999800003</cbc:CompanyID>
                 <cac:TaxScheme>
                     <cbc:ID>VAT</cbc:ID>
                 </cac:TaxScheme>
             </cac:PartyTaxScheme>
             <cac:PartyLegalEntity>
                 <cbc:RegistrationName>شركة نماذج فاتورة المحدودة | Fatoora Samples LTD</cbc:RegistrationName>
             </cac:PartyLegalEntity>
         </cac:Party>
     </cac:AccountingCustomerParty>
    <cac:Delivery>
         <cbc:ActualDeliveryDate>2022-03-13</cbc:ActualDeliveryDate>
         <cbc:LatestDeliveryDate>2022-03-15</cbc:LatestDeliveryDate>
     </cac:Delivery>
    <cac:PaymentMeans>
       <cbc:PaymentMeansCode>42</cbc:PaymentMeansCode>
       <cbc:InstructionNote>Returned items</cbc:InstructionNote>
    </cac:PaymentMeans>
    <cac:TaxTotal>
       <cbc:TaxAmount currencyID="SAR">0.00</cbc:TaxAmount>
       <cac:TaxSubtotal>
          <cbc:TaxableAmount currencyID="SAR">250.00</cbc:TaxableAmount>
          <cbc:TaxAmount currencyID="SAR">0.00</cbc:TaxAmount>
          <cac:TaxCategory>
             <cbc:ID>Z</cbc:ID>
             <cbc:Percent>0</cbc:Percent>
             <cbc:TaxExemptionReasonCode>VATEX-SA-HEA </cbc:TaxExemptionReasonCode>
             <cbc:TaxExemptionReason>Private healthcare to citizen</cbc:TaxExemptionReason>
             <cac:TaxScheme>
                <cbc:ID>VAT</cbc:ID>
             </cac:TaxScheme>
          </cac:TaxCategory>
       </cac:TaxSubtotal>
    </cac:TaxTotal>
    <cac:TaxTotal>
       <cbc:TaxAmount currencyID="SAR">0.00</cbc:TaxAmount>
    </cac:TaxTotal>
    <cac:LegalMonetaryTotal>
       <cbc:LineExtensionAmount currencyID="SAR">250.00</cbc:LineExtensionAmount>
       <cbc:TaxExclusiveAmount currencyID="SAR">250.00</cbc:TaxExclusiveAmount>
       <cbc:TaxInclusiveAmount currencyID="SAR">250.00</cbc:TaxInclusiveAmount>
       <cbc:PayableAmount currencyID="SAR">250.00</cbc:PayableAmount>
    </cac:LegalMonetaryTotal>
    <cac:InvoiceLine>
       <cbc:ID>73428</cbc:ID>
       <cbc:InvoicedQuantity>1</cbc:InvoicedQuantity>
       <cbc:LineExtensionAmount currencyID="SAR">250.00</cbc:LineExtensionAmount>
       <cac:TaxTotal>
          <cbc:TaxAmount currencyID="SAR">0.00</cbc:TaxAmount>
          <cbc:RoundingAmount currencyID="SAR">250.00</cbc:RoundingAmount>
       </cac:TaxTotal>
       <cac:Item>
          <cbc:Name>Surgery</cbc:Name>
          <cac:ClassifiedTaxCategory>
             <cbc:ID>Z</cbc:ID>
             <cbc:Percent>0</cbc:Percent>
             <cac:TaxScheme>
                <cbc:ID>VAT</cbc:ID>
             </cac:TaxScheme>
          </cac:ClassifiedTaxCategory>
       </cac:Item>
       <cac:Price>
          <cbc:PriceAmount currencyID="SAR">250.00</cbc:PriceAmount>
       </cac:Price>
    </cac:InvoiceLine>
 </Invoice>

Dear @Mostafa_ragap

Thanks for reaching out,

Since you are implementing your own solution, please find the attached “SigningProcessUpdated.pdf” shows how doing the signing process manually, please ensure to follow the exact mention steps and use the static values as mentioned in the file with no spaces or you will see the same error.

SigningProcessUpdated.pdf (927.7 KB)

Thanks,
Ibrahem Daoud.

Dear @idaoud
Thank you for responding to my inquiry.
please note that i am already follow all steps in the file, signingProcessUpdated in my own solution and got the same error, we want to know what is the possible causes of this error. so that we can find a solution or alternative solution
Thanks,

@idaoud
could you plz reply ?
any solutions ?
thank you