Overview
This guide helps you diagnose and resolve common issues with LibreDTE Core.Certificate Issues
Certificate Loading Fails
Error: Cannot load certificate file
Error: Cannot load certificate file
Problem: The certificate file cannot be loaded or the password is incorrect.Solution:
-
Verify the certificate file exists:
-
Check file permissions:
-
Verify the password is correct:
-
Ensure OpenSSL extension is installed:
Error: Certificate expired
Error: Certificate expired
Problem: The digital certificate has expired.Solution:
-
Check certificate expiration date:
- Obtain a new certificate from your certification authority
- Update your certificate file path in your configuration
Error: Certificate does not match RUT
Error: Certificate does not match RUT
Problem: The certificate RUT doesn’t match the emisor RUT.Solution:Ensure the certificate belongs to the correct taxpayer:
CAF (Folio) Issues
CAF Validation Errors
Error: Invalid CAF signature
Error: Invalid CAF signature
Problem: CAF signature validation fails.Solution:
-
Verify the CAF XML file is not corrupted:
- Download a fresh CAF from SII
-
Ensure the CAF matches the document type:
Error: Folio out of range
Error: Folio out of range
Problem: The requested folio is not within the CAF range.Solution:
-
Check the CAF range:
- Request a new CAF range from SII if folios are exhausted
-
Use a folio within the valid range:
Error: CAF RUT does not match Emisor
Error: CAF RUT does not match Emisor
Problem: The CAF was issued for a different taxpayer.Solution:Verify RUT consistency:
SII Integration Issues
Authentication Failures
Error: SII authentication timeout
Error: SII authentication timeout
Problem: Connection to SII authentication service times out.Solution:
-
Check internet connectivity:
- Verify firewall allows HTTPS connections to SII
- Check if SII services are operational: SII Status
- Increase timeout in your HTTP client configuration
Error: Invalid token
Error: Invalid token
Problem: Authentication token is rejected by SII.Solution:
-
Request a fresh token:
- Ensure your certificate is valid and not expired
- Verify you’re using the correct environment (certification vs production)
Error: SOAP error
Error: SOAP error
Problem: SOAP webservice communication fails.Solution:
-
Verify SOAP extension is installed:
-
Enable SOAP error reporting:
- Check SII webservice URLs are accessible
Document Sending Failures
Error: Document rejected by SII
Error: Document rejected by SII
Problem: SII rejects the submitted document.Solution:
-
Validate the XML schema before sending:
- Check SII error response for specific rejection reasons
-
Verify document signature:
- Ensure all required fields are present and valid
Error: Track ID not found
Error: Track ID not found
Problem: Cannot retrieve document status using track ID.Solution:
- Wait a few minutes - SII processing may be delayed
- Verify you’re using the correct track ID
- Check the correct environment (certification vs production)
- Verify the track ID belongs to your RUT
PHP Extension Issues
Missing Extensions
Error: ext-openssl not found
Error: ext-openssl not found
Problem: OpenSSL extension is not installed.Solution:Install the extension based on your OS:Ubuntu/Debian:CentOS/RHEL:macOS:
Error: ext-soap not found
Error: ext-soap not found
Problem: SOAP extension is not installed.Solution:Ubuntu/Debian:CentOS/RHEL:
Error: ext-curl not found
Error: ext-curl not found
Problem: cURL extension is not installed.Solution:Ubuntu/Debian:CentOS/RHEL:
Document Generation Issues
XML Validation Errors
Error: XML schema validation failed
Error: XML schema validation failed
Problem: Generated XML doesn’t match SII schema.Solution:
-
Validate data before building:
- Check for invalid characters in text fields
- Verify numeric fields contain valid numbers
- Review SII documentation for field requirements
Error: PDF generation fails
Error: PDF generation fails
Problem: Cannot render document to PDF.Solution:
-
Ensure mPDF or TCPDF is installed:
-
Check memory limit:
- Verify write permissions on temp directory
Performance Issues
Slow document generation
Slow document generation
Problem: Document creation takes too long.Solution:
-
Enable OPcache:
-
Use caching for repeated operations:
-
Optimize autoloading:
Debug Mode
Enable Detailed Error Messages
Enable debug mode during development to get detailed error information.
Getting Help
If you can’t resolve your issue:- Check the FAQ for common questions
- Review the Examples for working code
- Search GitHub Issues
- Create a new issue with:
- PHP version (
php -v) - LibreDTE Core version
- Complete error message
- Minimal code to reproduce the issue
- PHP version (