-
-
Notifications
You must be signed in to change notification settings - Fork 431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working under Windows Service #2582
Comments
We have a similar issue (when app is running as a service) but with PDF generation: |
After some research it appears that this was broken since v15.0 : |
I am also having issues with this. After updating from 17.0.0, our app has stalled on the same method, page.PdfStreamAsync. However, I have only seen this issue when code is run on the server. When doing local development in Visual Studio, v18.0.2 appears to be working fine. |
Ok. I'm rolling the browser back |
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: