[Ultimate PDF] Ultimate PDF
Forge component by Leonardo Fernandes

Hi, we're having trouble with Ultimate PDF and we can't print a PDF on Production. (It's working in Dev and UAT)

We have already specified the proper URL in Production still didnt work. 

We also tried adding permissions in C:\Windows\Temp\.local-chromium\  and tried deleting this folder to let Outsystems create new one, still giving the same error

I'm not sure what else is the problem yet, please let us know what else we can do to solve the issue

Attached below is the error message:

UltimatePDFErrorMsg.txt

mvp_badge
MVP

Hi John,

The best practice of asking a question related to a Forge component is to select that component on the question form. That way, the component team gets notified.

Regards,

Daniel

Hi Daniël,

Thank you! I managed to edit the question and tagged it as Component problem and tagging the Ultimate PDF. Thanks!

Hello John,

Was that the only error you observed in Service Center? Could you check for other errors around the same time and if related, please share, as they may hold other clues.

Regards,

AJ

Hi AJ,

Aside from the error above. The another one was closing the connection.

We get these 2 errors when we try to execute the Timer that run the PrintToPDF_Advanced (from UltimatePDF) server action

[1] The underlying connection was closed: An unexpected error occurred on a send.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at PuppeteerSharp.BrowserFetcher.<DownloadAsync>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at OutSystems.NssUltimatePDF.Browser.BrowserUtils.<DownloadRevision>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at OutSystems.NssUltimatePDF.CssUltimatePDF.RunAsync(Func`1 async)
at OutSystems.NssUltimatePDF.CssUltimatePDF.MssSetupLocalBrowser(Int32 ssBrowserRevision)
at ssUltimatePDF.RssExtensionUltimatePDF.MssSetupLocalBrowser(HeContext heContext, Int32 inParamBrowserRevision)

[2] Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)

[3] An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)

Thanks John, a few things to look at:

1. Were the files smaller in lower environments typically? and are they larger in Production in terms of # of pages per file.

2. You mentioned a timer, so are the errors encountered closer to the timer start or much later?
Do you have logic in place to extend the timer run beyond the default time out of 20 minutes, assuming the timer runs that long?

3. Have you verified if the URL in Production is not the issue. For e.g. has the timer executed successfully on other occasions for the same URL? or has it been failing ever since going live?

Thanks

Hi AJ

1. Were the files smaller in lower environments typically? and are they larger in Production in terms of # of pages per file.

Usually the number of files in lower environment are almost identical to numbers in Production. Since we import data from Production to UAT and Dev (to replicate issues and bugs). These numbers ranges from 50-100 pdf files in 1 ZIP file


2. You mentioned a timer, so are the errors encountered closer to the timer start or much later?
Do you have logic in place to extend the timer run beyond the default time out of 20 minutes, assuming the timer runs that long?


- The timer error was encountered in the specified PDF action, which ultimately closed the run of the timer since it encounters an error. There are no logic to extend beyond the default time of 20 minutes.


3. Have you verified if the URL in Production is not the issue. For e.g. has the timer executed successfully on other occasions for the same URL? or has it been failing ever since going live? 


- This was the first time the component went live in Production. We tried to get the URL being generated from the Error Log and when we try to open that URL in a browser, it will open the PDF. That means the correct URL setup is correct.


Hello John,

Is this still an open issue (I hope not ofcourse)? If you are on-prem then most online suggestions point to issues with the Security Protocol settings in IIS. (For e.g. https://www.outsystems.com/forums/discussion/56485/the-underlying-connection-was-closed-an-unexpected-error-occurred-on-a-send/)

Would be good to hear back in case you did solve the issue on your end, so the steps you took might end up helping someone else next time.

Regards,

AJ

Hi AJ,

After checking again on this error log:
The underlying connection was closed: An unexpected error occurred on a send at ssUltimatePDF.RssExtensionUltimatePDF.MssSetupLocalBrowser

We tried this solution by downloading the binary file from https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/637110/chrome-win.zip and extract it to into C:\Windows\Temp\.local-chromium\Win64-637110. 

It worked and all went while after a while. After few hours, it failed again and brought up another error. Here is the message:

[1] net::ERR_CONNECTION_TIMED_OUT at https://outsyshkitsapp.ap.manulife.com/ManulifeATRS_Reports/IR56M_Memo.aspx?Year=2021&AgentCode=905820&Commission=30764.81000000&Bonus=239430.35000000&BonusPlan=0.00000000&StockOptions=0.00000000&IsActive=True&Month=&CurrencyCode=04 at https://outsyshkitsapp.ap.manulife.com/ManulifeATRS_Reports/IR56M_Memo.aspx?Year=2021&AgentCode=905820&Commission=30764.81000000&Bonus=239430.35000000&BonusPlan=0.00000000&StockOptions=0.00000000&IsActive=True&Month=&CurrencyCode=04

   at PuppeteerSharp.FrameManager.<NavigateFrameAsync>d__42.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at OutSystems.NssUltimatePDF.Browser.BrowserUtils.<PrintPDF>d__11.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   at OutSystems.NssUltimatePDF.Browser.BrowserUtils.<PrintPDF>d__11.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at OutSystems.NssUltimatePDF.CssUltimatePDF.RunAsync[T](Func`1 async)

   at OutSystems.NssUltimatePDF.CssUltimatePDF.MssPrintPDF(String ssURL, RCViewportRecord ssViewport, RCPaperRecord ssPaper, Int32 ssBrowserRevision, Boolean ssReuseSession, Byte[]& ssPDF)

   at ssUltimatePDF.RssExtensionUltimatePDF.MssPrintPDF(HeContext heContext, String inParamURL, IRecord inParamViewport, IRecord inParamPaper, Int32 inParamBrowserRevision, Boolean inParamReuseSession, Byte[]& outParamPDF)


[2] net::ERR_CONNECTION_TIMED_OUT at https://outsyshkitsapp.ap.manulife.com/ManulifeATRS_Reports/IR56M_Memo.aspx?Year=2021&AgentCode=905820&Commission=30764.81000000&Bonus=239430.35000000&BonusPlan=0.00000000&StockOptions=0.00000000&IsActive=True&Month=&CurrencyCode=04

   at PuppeteerSharp.FrameManager.<NavigateAsync>d__43.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at PuppeteerSharp.FrameManager.<NavigateFrameAsync>d__42.MoveNext()


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.