Native Exception Handling in IronPDF
In recent versions of IronPDF, a native exception message in the logs will include a specific issue code: [Issue Code IRONPDF-NATIVE-EXCEPTION]. An example of such exception message is shown below:
IronPdf.Exceptions.IronPdfNativeException: Error while generating PDF from HTML: 'Error while rendering pdf from html for job group 0: 'Error during dev tools execution: {"method":"Inspector.targetCrashed","params":{}}''.
2024-01-25 08:12:11,960 INFO [Thread-3] [, , , , , , , , ] c.i.i.i.s.Access: [IronPdfEngine]To learn how to solve this issue please read https://ironpdf.com/troubleshooting/ironpdf-native-exception [Issue Code IRONPDF-NATIVE-EXCEPTION]
Possible cause
IronPDF native exceptions typically arise from various issues that are related to the C++ code used in the IronPdf.Native.Chrome package, which serves as a dependency for IronPDF and involves the usage of Chrome PDF rendering engine.
Solution
To receive assistance with issues related to native exceptions, please submit an engineering support request and provide full log files for further investigation.
Enable native logging by including the following code snippet in your project:
IronPdf.Logging.Logger.LogFilePath = "Default.log"; //May be set to a directory name or full file
IronPdf.Logging.Logger.LoggingMode = IronPdf.Logging.Logger.LoggingModes.All;
IronPdf.Logging.Logger.LogFilePath = "Default.log"; //May be set to a directory name or full file
IronPdf.Logging.Logger.LoggingMode = IronPdf.Logging.Logger.LoggingModes.All;
IronPdf.Logging.Logger.LogFilePath = "Default.log" 'May be set to a directory name or full file
IronPdf.Logging.Logger.LoggingMode = IronPdf.Logging.Logger.LoggingModes.All
Log files created by IronPDF are typically found in the /bin directory of your project where your DLLs are deployed, or you may set a custom IronPdf.Logging.Logger.LogFilePath
to store the log files in a specific location. Relevant log files include:
- Default.log (Deployment, threading, and rendering process. Useful for observing the process behavior and exceptions.)
- cef.log (Chrome embedded framework process)
Please note
IronSoftwareEngine.log
and IronSoftwareEngine.log
. Please submit all log files generated when requesting engineering support.For cloud servers, log files may be located in specific directories. Refer to our guides for generating log files in Azure and AWS.