You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we use puppeteer-sharp with console app its working fine
but when we use it with Windows Service we are getting below exception with LaunchAsync
System.AggregateException: One or more errors occurred. (Failed to create connection)
---> PuppeteerSharp.ProcessException: Failed to create connection
---> PuppeteerSharp.TargetClosedException: Protocol error(Target.setDiscoverTargets): Target closed. (The remote party closed the WebSocket connection without completing the close handshake.)
at PuppeteerSharp.Helpers.TaskHelper.WithTimeout[T](Task1 task, TimeSpan timeout, Func2 exceptionFactory) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Helpers/TaskHelper.cs:line 183
at PuppeteerSharp.Connection.SendAsync(String method, Object args, Boolean waitForCallback, CommandOptions options) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Connection.cs:line 138
at PuppeteerSharp.ChromeTargetManager.InitializeAsync() in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/ChromeTargetManager.cs:line 61
at PuppeteerSharp.Browser.CreateAsync(SupportedBrowser browserToCreate, Connection connection, String[] contextIds, Boolean ignoreHTTPSErrors, ViewPortOptions defaultViewPort, LauncherBase launcher, Func2 targetFilter, Func2 isPageTargetCallback, Action1 initAction) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Browser.cs:line 304 at PuppeteerSharp.Browser.CreateAsync(SupportedBrowser browserToCreate, Connection connection, String[] contextIds, Boolean ignoreHTTPSErrors, ViewPortOptions defaultViewPort, LauncherBase launcher, Func2 targetFilter, Func2 isPageTargetCallback, Action1 initAction) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Browser.cs:line 309
at PuppeteerSharp.Launcher.LaunchAsync(LaunchOptions options) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Launcher.cs:line 74
--- End of inner exception stack trace ---
at PuppeteerSharp.Launcher.LaunchAsync(LaunchOptions options) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Launcher.cs:line 92
at PuppeteerSharp.Launcher.LaunchAsync(LaunchOptions options) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Launcher.cs:line 98
We have make sure that we are using it with proper awaits as its working fine with console app,
Besides this if we are using --no-sandbox then its working fine with windows service. but we read the documentation and came to know that using this args is not recommended.
so please suggest any other way to run it under windows service.
The text was updated successfully, but these errors were encountered:
If we use puppeteer-sharp with console app its working fine
but when we use it with Windows Service we are getting below exception with LaunchAsync
System.AggregateException: One or more errors occurred. (Failed to create connection)
---> PuppeteerSharp.ProcessException: Failed to create connection
---> PuppeteerSharp.TargetClosedException: Protocol error(Target.setDiscoverTargets): Target closed. (The remote party closed the WebSocket connection without completing the close handshake.)
at PuppeteerSharp.Helpers.TaskHelper.WithTimeout[T](Task
1 task, TimeSpan timeout, Func
2 exceptionFactory) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Helpers/TaskHelper.cs:line 183at PuppeteerSharp.Connection.SendAsync(String method, Object args, Boolean waitForCallback, CommandOptions options) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Connection.cs:line 138
at PuppeteerSharp.ChromeTargetManager.InitializeAsync() in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/ChromeTargetManager.cs:line 61
at PuppeteerSharp.Browser.CreateAsync(SupportedBrowser browserToCreate, Connection connection, String[] contextIds, Boolean ignoreHTTPSErrors, ViewPortOptions defaultViewPort, LauncherBase launcher, Func
2 targetFilter, Func
2 isPageTargetCallback, Action1 initAction) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Browser.cs:line 304 at PuppeteerSharp.Browser.CreateAsync(SupportedBrowser browserToCreate, Connection connection, String[] contextIds, Boolean ignoreHTTPSErrors, ViewPortOptions defaultViewPort, LauncherBase launcher, Func
2 targetFilter, Func2 isPageTargetCallback, Action
1 initAction) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Browser.cs:line 309at PuppeteerSharp.Launcher.LaunchAsync(LaunchOptions options) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Launcher.cs:line 74
--- End of inner exception stack trace ---
at PuppeteerSharp.Launcher.LaunchAsync(LaunchOptions options) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Launcher.cs:line 92
at PuppeteerSharp.Launcher.LaunchAsync(LaunchOptions options) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Launcher.cs:line 98
We have make sure that we are using it with proper awaits as its working fine with console app,
Besides this if we are using --no-sandbox then its working fine with windows service. but we read the documentation and came to know that using this args is not recommended.
so please suggest any other way to run it under windows service.
The text was updated successfully, but these errors were encountered: