Sicos1977 / ChromiumHtmlToPdf

Convert HTML to PDF with a Chromium based browser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues after chrome update to 111.0.5563.65 - web socket timeout

Shaulbm opened this issue · comments

While trying to run a standard import after chrome updated - these errors occur (web socket is timed out).

it seems to be related to a required additional parameter --remote-allow-origins=* when running chrome now.

attached run log:
"C:\Install\ChromeHtmlToPdf_264\ChromeHtmlToPdfConsole.exe" --input "C:\Temp\Reports\fullReport.html" --output "C:\Temp\Reports\fullReport.pdf"

2023-03-16T09:37:19.595 - Resetting Chrome arguments to default
2023-03-16T09:37:19.610 - Adding Chrome argument '--headless'
2023-03-16T09:37:19.611 - Adding Chrome argument '--disable-gpu'
2023-03-16T09:37:19.611 - Adding Chrome argument '--hide-scrollbars'
2023-03-16T09:37:19.611 - Adding Chrome argument '--mute-audio'
2023-03-16T09:37:19.611 - Adding Chrome argument '--disable-background-networking'
2023-03-16T09:37:19.611 - Adding Chrome argument '--disable-background-timer-throttling'
2023-03-16T09:37:19.611 - Adding Chrome argument '--disable-default-apps'
2023-03-16T09:37:19.611 - Adding Chrome argument '--disable-extensions'
2023-03-16T09:37:19.611 - Adding Chrome argument '--disable-hang-monitor'
2023-03-16T09:37:19.612 - Adding Chrome argument '--disable-prompt-on-repost'
2023-03-16T09:37:19.612 - Adding Chrome argument '--disable-sync'
2023-03-16T09:37:19.612 - Adding Chrome argument '--disable-translate'
2023-03-16T09:37:19.612 - Adding Chrome argument '--metrics-recording-only'
2023-03-16T09:37:19.612 - Adding Chrome argument '--no-first-run'
2023-03-16T09:37:19.612 - Adding Chrome argument '--disable-crash-reporter'
2023-03-16T09:37:19.613 - Adding Chrome argument '--remote-debugging-port="0"'
2023-03-16T09:37:19.613 - Adding Chrome argument '--window-size="1366,768"'
2023-03-16T09:37:19.950 - Starting Chrome from location 'C:\Program Files\Google\Chrome\Application\chrome.exe' with working directory 'C:\Program Files\Google\Chrome\Application'
2023-03-16T09:37:19.951 - "C:\Program Files\Google\Chrome\Application\chrome.exe" --headless --disable-gpu --hide-scrollbars --mute-audio --disable-background-networking --disable-background-timer-throttling --disable-default-apps --disable-extensions --disable-hang-monitor --disable-prompt-on-repost --disable-sync --disable-translate --metrics-recording-only --no-first-run --disable-crash-reporter --remote-debugging-port="0" --window-size="1366,768"
2023-03-16T09:37:19.966 - Chrome process started
2023-03-16T09:37:20.062 - Received Chrome error data: 'DevTools listening on ws://127.0.0.1:63198/devtools/browser/fa4f4c82-a51f-4bd9-9352-b500f32ec7a2'
2023-03-16T09:37:20.063 - Connecting to dev protocol on uri 'ws://127.0.0.1:63198/devtools/browser/fa4f4c82-a51f-4bd9-9352-b500f32ec7a2'
2023-03-16T09:37:20.188 - Creating new websocket connection to url 'ws://127.0.0.1:63198/devtools/browser/fa4f4c82-a51f-4bd9-9352-b500f32ec7a2'
2023-03-16T09:37:20.196 - Opening websocket connection with a timeout of 30 seconds
2023-03-16T09:45:09.746 - Websocket connection timed out after 30 seconds with the state 'Closed'
2023-03-16T09:45:09.748 - Exception: Websocket connection timed out after 30 seconds with the state 'Closed'

2023-03-16T09:45:09.748 - Error: Websocket connection timed out after 30 seconds with the state 'Closed'
'
2023-03-16T09:45:12.889 - Chrome did not close gracefully, closing it by killing it's process on id '23608'
2023-03-16T09:45:12.946 - Chrome exited unexpectedly, arguments used: --headless --disable-gpu --hide-scrollbars --mute-audio --disable-background-networking --disable-background-timer-throttling --disable-default-apps --disable-extensions --disable-hang-monitor --disable-prompt-on-repost --disable-sync --disable-translate --metrics-recording-only --no-first-run --disable-crash-reporter --remote-debugging-port="0" --window-size="1366,768"
2023-03-16T09:45:12.946 - Process id: 23608
2023-03-16T09:45:12.946 - Process exit time: 2023-03-16T09:45:12.940
2023-03-16T09:45:12.947 - Chrome killed
2023-03-16T09:45:12.950 - Exception: 0xFFFFFFFF

Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
at ChromeHtmlToPdfLib.Converter._chromeProcess_Exited(Object sender, EventArgs e) in C:\Kees\ChromeHtmlToPdf\ChromeHtmlToPdfLib\Converter.cs:line 620
at System.Diagnostics.Process.OnExited()
at System.Diagnostics.Process.RaiseOnExited()
at System.Diagnostics.Process.CompletionCallback(Object waitHandleContext, Boolean wasSignaled)
at System.Threading._ThreadPoolWaitOrTimerCallback.WaitOrTimerCallback_Context(Object state, Boolean timedOut)
at System.Threading._ThreadPoolWaitOrTimerCallback.WaitOrTimerCallback_Context_f(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading._ThreadPoolWaitOrTimerCallback.PerformWaitOrTimerCallback(_ThreadPoolWaitOrTimerCallback helper, Boolean timedOut)
2023-03-16T09:45:12.982 - [null] - at ChromeHtmlToPdfLib.Converter.StartChromeHeadless() in C:\Kees\ChromeHtmlToPdf\ChromeHtmlToPdfLib\Converter.cs:line 476
at ChromeHtmlToPdfLib.Converter.Convert(OutputFormat outputFormat, Object input, Stream outputStream, PageSettings pageSettings, String waitForWindowStatus, Int32 waitForWindowsStatusTimeout, Nullable1 conversionTimeout, Nullable1 mediaLoadTimeout, ILogger logger) in C:\Kees\ChromeHtmlToPdf\ChromeHtmlToPdfLib\Converter.cs:line 1216
at ChromeHtmlToPdfLib.Converter.ConvertToPdf(ConvertUri inputUri, Stream outputStream, PageSettings pageSettings, String waitForWindowStatus, Int32 waitForWindowsStatusTimeout, Nullable1 conversionTimeout, Nullable1 mediaLoadTimeout, ILogger logger) in C:\Kees\ChromeHtmlToPdf\ChromeHtmlToPdfLib\Converter.cs:line 1392
at ChromeHtmlToPdfLib.Converter.ConvertToPdf(ConvertUri inputUri, String outputFile, PageSettings pageSettings, String waitForWindowStatus, Int32 waitForWindowsStatusTimeout, Nullable1 conversionTimeout, Nullable1 mediaLoadTimeout, ILogger logger) in C:\Kees\ChromeHtmlToPdf\ChromeHtmlToPdfLib\Converter.cs:line 1436
at ChromeHtmlToPdfConsole.Program.Convert(Options options) in C:\Kees\ChromeHtmlToPdf\ChromeHtmlToPdfConsole\Program.cs:line 346
at ChromeHtmlToPdfConsole.Program.Main(String[] args) in C:\Kees\ChromeHtmlToPdf\ChromeHtmlToPdfConsole\Program.cs:line 135, Websocket connection timed out after 30 seconds with the state 'Closed'

Issues occurred on version 2.6.4 - resolved on latest 2.6.5