Known Issues | Old issues now fixed | Frequent troubleshooting questions | Contact us
SAT_SignXML
or SAT_ValidateXml
.
Visual Basic ha detectado un problema y debe cerrarse (Visual Basic has encountered a problem and needs to close)This is a problem from version 9.1.20 onwards caused by a fix for multithreading issues which is incompatible with VB6 running on XP.
Despite our best efforts to support old platforms and programming languages, we can no longer support VB6 on Windows XP. See Minimum Requirements. VB6 still works on all later Windows platforms.
MontoTotalIVA
and FechaFolioFiscalVinculado
in the element GastosHidrocarburos/Erogacion/DocumentoRelacionado
are considered as "required".
Until SAT fix the problem with their XSLT file, omitting these attributes will cause an error.
See Error in GastosHidrocarburos10.xslt.
NoCertificado
with the matching serial number of the certificate being used to sign the document
before attempting to sign. This is a requirement for CFD v3.3 documents.
>firmasat signxml -s @ -c pac.cer -k pac.key -p 12345678a -i cfdv33a-base.xml -o aout.xml STATUS: -106 ERRORDESCRIPTION: Error code -106: Certificate numbers do not match/Los numeros de certificado no coinciden (CERT_NUM_ERROR): Certificate serial number in XML '30001000000300023708' does not match number '30001000000300023699' in X.509 certificate/Numero de serie del certificado en XML no coincide con el numero de certificado X.509
An attempt was made to load a program with an incorrect format. (Exception from HRESULT:0x8007000B)See Exception from HRESULT:0x8007000B.
Here is an extract from an XML document:
pais="México" formaDePago="Una sola exhibición"
Use the command-line instruction
hexdump -C myfile.xml
If your file is in UTF-8 encoding, the accented characters will show as two bytes.
000000 70 61 69 73 3d 22 4d c3 a9 78 69 63 6f 22 20 66 pais="M..xico" f 000010 6f 72 6d 61 44 65 50 61 67 6f 3d 22 55 6e 61 20 ormaDePago="Una 000020 73 6f 6c 61 20 65 78 68 69 62 69 63 69 c3 b3 6e sola exhibici..n 000030 22 "But if it's in Latin-1 (ISO-8859-1), the accented characters will only show as single byte values.
000000 70 61 69 73 3d 22 4d e9 78 69 63 6f 22 20 66 6f pais="M.xico" fo 000010 72 6d 61 44 65 50 61 67 6f 3d 22 55 6e 61 20 73 rmaDePago="Una s 000020 6f 6c 61 20 65 78 68 69 62 69 63 69 f3 6e 22 ola exhibici.n"In this case, you must re-save the file in UTF-8.
You could also use the
CNV_CheckUTF8Bytes
function or
Cnv.CheckUTF8 Method
in CryptoSys PKI, reading the file into a byte array first.
If the result is zero it means your file is not valid UTF-8.
(0xEF,0xBB,0xBF)
at the beginning of a file.
Although it is actually unnecessary to use a BOM for a UTF-8-encoded file, some validation sites will require it in all XML documents and will give an error if it is not present. For more on this see UTF-8 byte-order mark problem. We have added a new function in FirmaSAT 4.1 to fix it.
You cannot detect the presence of a BOM using a modern text editor like NotePad or UltraEdit because
they look for it and act on it but do not show it (because it actually represents a zero-width, no-break character in Unicode).
Older editors may show it as

.
You can use a tool like hexdump.exe to examine your XML document or use a hex editor like HxD Free Hex Editor. The output should look like this:
hexdump -C miarchivo.xml
000000 ef bb bf 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e ...<?xml version 000010 3d 22 31 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d ="1.0" encoding= 000020 22 55 54 46 2d 38 22 3f 3e 0d 0a 3c 43 6f 6d 70 "UTF-8"?>..<Comp 000030 72 6f 62 61 6e 74 65 20 78 6d 6c 6e 73 3d 22 68 robante xmlns="h 000040 74 74 70 3a 2f 2f 77 77 77 2e 73 61 74 2e 67 6f ttp://www.sat.go
If you see ef bb bf
at the beginning then the file has the required BOM.
To comment on this page or ask a question, please Send us a message. For support, go to the support page.
This page last updated 14 December 2022