thegreenter / demo

Ejemplos utilizando Greenter (UBL 2.1, SOAP, Firma digital, PDF, QR)
https://greenter-sample.herokuapp.com
MIT License
60 stars 51 forks source link

DOMDocument::loadXML(): input conversion failed due to input error. #59

Closed JHONQUISPEFLORES closed 5 years ago

JHONQUISPEFLORES commented 5 years ago

buenas tardes @giansalex , a que crees que me falte: Warning: DOMDocument::loadXML(): input conversion failed due to input error, bytes 0x81 0x4C 0x43 0x55 in /home2/jquispe/dominio.com/facturador_ok/vendor/greenter/xmldsig/src/Sunat/SignedXml.php on line 292

Warning: DOMDocument::loadXML(): input conversion failed due to input error, bytes 0x81 0x4C 0x43 0x55 in /home2/jquispe/dominio.com/facturador_ok/vendor/greenter/xmldsig/src/Sunat/SignedXml.php on line 292

Warning: DOMDocument::loadXML(): encoder errorCData section not finished ERROR EN in Entity, line: 49 in /home2/jquispe/dominio.com/facturador_ok/vendor/greenter/xmldsig/src/Sunat/SignedXml.php on line 292

Warning: DOMDocument::loadXML(): Premature end of data in tag VoidReasonDescription line 49 in Entity, line: 49 in /home2/jquispe/dominio.com/facturador_ok/vendor/greenter/xmldsig/src/Sunat/SignedXml.php on line 292

Warning: DOMDocument::loadXML(): Premature end of data in tag VoidedDocumentsLine line 44 in Entity, line: 49 in /home2/jquispe/dominio.com/facturador_ok/vendor/greenter/xmldsig/src/Sunat/SignedXml.php on line 292

Warning: DOMDocument::loadXML(): Premature end of data in tag VoidedDocuments line 2 in Entity, line: 49 in /home2/jquispe/dominio.com/facturador_ok/vendor/greenter/xmldsig/src/Sunat/SignedXml.php on line 292 {"code":"2075","cdsc":"El XML no contiene el tag o no existe informacion de UBLVersionID - Detalle: xxx.xxx.xxx value='ticket: 1554766571217 error: No existe el tag UBLVersionID'","codigo_error":"2075","error":"El XML no contiene el tag o no existe informacion de UBLVersionID - Detalle: xxx.xxx.xxx value='ticket: 1554766571217 error: No existe el tag UBLVersionID'"}

giansalex commented 5 years ago

Podrias probar generando solo el XML sin firmar, y compartirlo.

JHONQUISPEFLORES commented 5 years ago

image

JHONQUISPEFLORES commented 5 years ago

haber voy a probar sin firmado.

JHONQUISPEFLORES commented 5 years ago

me sale igual, sin firmarlo. en modo local si me funciona todo.

JHONQUISPEFLORES commented 5 years ago

me sale solo la linea uno. sin firmado

JHONQUISPEFLORES commented 5 years ago

debe ser k me falta asignarle algun valor mas, xk hice la prueba con la comunicac. de prueba y si funciona. image

giansalex commented 5 years ago

intenta borrando la carpeta cache, y que esta tenga permisos de escritura en el hosting .

JHONQUISPEFLORES commented 5 years ago

HOLAS @giansalex , ENCONTRE EL ORIGEN DEL ERROR: EN EL CAMPO "DesMotivoBaja" LE COLOQUE: "ERROR EN CÁLCULOS" CON TILDE. QUIERE DECIR QUE DEBO SUPRIMIR LAS TILDES PARA QUE NO ME GENERE EL ERROR.

giansalex commented 5 years ago

Hola @JHONQUISPEFLORES , el problema ha sido por la codificación que indica en el header del XML. /src/Xml/Templates/voided.xml.twig#L1 Debe estar como UTF-8 al igual que en facturas.

JHONQUISPEFLORES commented 5 years ago

Y EN SUMARY DICE encoding="ISO-8859-1", IMAGINO K TAMBIÉN

giansalex commented 5 years ago

@JHONQUISPEFLORES asi es, la corrección es para todas las plantillas. Se ha hecho la correcion en https://github.com/giansalex/greenter-xml/commit/d125084235c1f583f7303ee83d036931e7537332 , puedes ejecutar composer update