Welcome Guest Search | Active Topics | Sign In | Register

ConvertHtml crashes Options
Adiacent
Posted: Monday, December 11, 2023 3:53:14 AM
Rank: Member
Groups: Member

Joined: 12/30/2012
Posts: 11
While using the ConvertHtml method of EO.Pdf.HtmlToPdf we are facing issues randomly.
Current Version of EO.Pdf installed in project: 23.4.5

The conversion is executed by an Azure Function. Here the configuration details:
Stack: .NET
.Net Version: .NET7 isolated
Platform: 32 Bit
Managed pipeline version: Integrated

The HTML provided to the ConvertHtml method doesn't contain any external link (no image, no link, no css, ...).

These are the most common issues:

First Issue:
Child process exited unexpectedly.
      at EO.Internal.suxd.edoz(Exception nnh, Boolean nni)
      at EO.Internal.suxd.edoy(sutc nne) at EO.Internal.suxd.edom(Boolean& nmc, Type[] nmd, String nme, String nmf)
      at EO.Internal.suxd.xgxr(Type[] nlz, String nma, String nmb)
      at EO.Internal.suxe.xgxr(String nrr, String nrs)
      at EO.Internal.jqrf.eivi() at EO.Internal.jqrf.mgeh.qjux() at EO.Internal.suss.ifjd(Action luk)
      at EO.Internal.jqrf.cxla(WindowsIdentity hc) at EO.WebEngine.Engine.Start(WindowsIdentity user)
      at EO.WebEngine.Engine.Start() at EO.Internal.vufm.qycm() at EO.Internal.vufn.qycm(vufm& bsu)
      at EO.Internal.vufo.qycm(jqra bsy, vufm& bsz)
      at EO.Internal.vufr.stqn() at EO.Internal.vufr..ctor(jqra btd, HtmlToPdfOptions bte)
      at EO.Pdf.HtmlToPdfSession.seir(HtmlToPdfOptions aav, WebView aaw) at EO.Pdf.HtmlToPdfSession..ctor(HtmlToPdfOptions aar, WebView aas, HtmlToPdfSession aat, ResourceHandler aau)
      at EO.Pdf.HtmlToPdfSession.Create(HtmlToPdfOptions options, ResourceHandler resourceHandler)
      at EO.Pdf.HtmlToPdf.bydt.abgm()
      at EO.Internal.vufo.dwun[a](susk`1 btc)
      at EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options)
      at EO.Pdf.HtmlToPdf.ConvertHtml(String html, Stream stream, HtmlToPdfOptions options)

Second Issue:
Operation timed out while waiting the page to be loaded, taskId = 11
at System.Environment.get_StackTrace()
at EO.Base.BaseException..ctor(String lss, Exception lst)
at EO.Pdf.HtmlToPdfException..ctor(HtmlToPdfErrorCode acf, Int32 acg, String ach, Exception aci)
at EO.Pdf.HtmlToPdfException.vqxm(String acm)
at EO.Internal.cbpc.jjbw(String bvc)
at EO.Internal.cbpc.bslq(cbkh bud, String bue, String buf, Int32 bug, Int32 buh, String bui, Boolean buj)
at EO.Internal.cbpc.qiqv(cbkh btv, String btw, HtmlToPdfOptions btx, String bty, Int32 btz, Int32 bua, String bub, Boolean buc)
at EO.Pdf.HtmlToPdfSession.qiqv(cbkh aba, String abb, String abc, Int32 abd, Int32 abe, String abf, Boolean abg)
at EO.Pdf.HtmlToPdfSession.qiqv(cbkh abh, String abi, String abj, Boolean abk)
at EO.Pdf.HtmlToPdfSession.LoadHtml(String html)
at EO.Pdf.HtmlToPdf.loou.rnif()
at EO.Internal.cboz.dqen[a](mcsu`1 btc)
at EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options)
at EO.Pdf.HtmlToPdf.ConvertHtml(String html, Stream stream, HtmlToPdfOptions options)

Third Issue:
Exception: System.AggregateException: One or more errors occurred. (The request was canceled.)
---> The request was canceled.
at System.Environment.get_StackTrace()
at EO.Base.BaseException..ctor(String lss, Exception lst)
at EO.Pdf.HtmlToPdfException..ctor(HtmlToPdfErrorCode acf, Int32 acg, String ach, Exception aci)
at EO.Pdf.HtmlToPdfException.vqxl(LoadFailedEventArgs acl)
at EO.Internal.cbpc.bslq(cbkh bud, String bue, String buf, Int32 bug, Int32 buh, String bui, Boolean buj)
at EO.Internal.cbpc.qiqv(cbkh btv, String btw, HtmlToPdfOptions btx, String bty, Int32 btz, Int32 bua, String bub, Boolean buc)
at EO.Pdf.HtmlToPdfSession.qiqv(cbkh aba, String abb, String abc, Int32 abd, Int32 abe, String abf, Boolean abg)
at EO.Pdf.HtmlToPdfSession.qiqv(cbkh abh, String abi, String abj, Boolean abk)
at EO.Pdf.HtmlToPdfSession.LoadHtml(String html)
at EO.Pdf.HtmlToPdf.loou.rnif()
at EO.Internal.cboz.dqen[a](mcsu`1 btc)
at EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options)
at EO.Pdf.HtmlToPdf.ConvertHtml(String html, Stream stream, HtmlToPdfOptions options)

Usually, the issues dissapear restarting the Azure Function . Then 3 or 4 documents are successfully converted, but after that one of this issue appears again.

Look forward to receiving your comments.
Thanks,
eo_support
Posted: Tuesday, December 12, 2023 11:16:28 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

Can you capture the log when this occurs and send the log to us? The code can be something like this:

Code: C#
try
{
    EO.Pdf.HtmlToPdf.ConvertHtml(....);
}
catch (Exception ex)
{
    string log = EO.Base.Runtime.GetLogs();
    //save log to a file and send it to us
}


Once we get the log we will see what we can find.

Thanks!
Adiacent
Posted: Wednesday, December 13, 2023 9:28:26 AM
Rank: Member
Groups: Member

Joined: 12/30/2012
Posts: 11
Hi,
I have uploaded the logs from the Contact Us page.

Look forward to receiving your comments.
Thanks!
eo_support
Posted: Wednesday, December 13, 2023 11:25:58 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

We have looked into the log files and it indicates that the GPU process keeps crashing. Can you try to disable the GPU like this and see if it helps?

Code: C#
EO.WebEngine.EngineOptions.Default.DisableGPU = true;


Make sure you run this line before any conversion is triggered. Once a conversion is triggered (which initializes the browser engine), then this line would have no impact.

If the problem continues, please collect crash report and send it to us:

https://www.essentialobjects.com/doc/common/crash_report.html

Thanks!
Adiacent
Posted: Wednesday, December 13, 2023 1:24:47 PM
Rank: Member
Groups: Member

Joined: 12/30/2012
Posts: 11
Hi,
Do I have to disable it in a static method or before any convertion?

Option 1:
static EOPdfHelper()
{
EO.WebEngine.EngineOptions.Default.DisableGPU = true;
}

Option 2:
EO.WebEngine.EngineOptions.Default.DisableGPU = true;
result = HtmlToPdf.ConvertHtml(html, stream, options);

Thanks!
eo_support
Posted: Wednesday, December 13, 2023 3:32:27 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
You can do it either way. The key is it must be called before anything else.
Adiacent
Posted: Thursday, December 14, 2023 12:01:08 PM
Rank: Member
Groups: Member

Joined: 12/30/2012
Posts: 11
Hi,
I still have a random error during the HTML conversion.
I have uploaded the logs file.

Look forward to receiving your comments.
Thanks!
eo_support
Posted: Monday, December 18, 2023 9:42:43 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

We have sent you a test build through private message. Please try that build and send us the new logs.

Thanks!
Adiacent
Posted: Tuesday, December 19, 2023 4:12:39 AM
Rank: Member
Groups: Member

Joined: 12/30/2012
Posts: 11
Hi,
I have uploaded new log files.

Look forward to receiving your comments.
Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.