error creating browser on .Net 4.6.2
See original GitHub issueSimplest console app (copy paste of code from the working console app working in Core 2)
System.InvalidOperationException: ‘No process is associated with this object.’
var chromiumRevision = 526987;
Console.WriteLine("Downloading chromium");
await Downloader.CreateDefault().DownloadRevisionAsync(chromiumRevision);
Console.WriteLine("Navigating google");
//this line throws an error (stack trace below)
var browser = await Puppeteer.LaunchAsync(new LaunchOptions
{
Headless = true
}, chromiumRevision);
{“No process is associated with this object.”}
at System.Diagnostics.Process.EnsureState(State state) at System.Diagnostics.Process.EnsureState(State state) at System.Diagnostics.Process.get_Id() at PuppeteerSharp.Launcher.<ForceKillChrome>d__11.MoveNext() — End of stack trace from previous location where exception was thrown — at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at PuppeteerSharp.Launcher.<LaunchAsync>d__7.MoveNext() — End of stack trace from previous location where exception was thrown — at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at PuppeteerSharp.Puppeteer.<LaunchAsync>d__0.MoveNext() — End of stack trace from previous location where exception was thrown — at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at PuppeteerSharpPdfDemo.MainClass.<MainAsync>d__1.MoveNext() in C:\temp\data\puppeteer-sharp-master\puppeteer-sharp-master\demos\ConsoleApp1\Program.cs:line 27
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
I think the issue is related to Websocket, upon checking code, it uses websocket to connect to chrome. i also notice this is issue when i deploy it to windows server 2008 r2. but when i run it to my local machine which windows 10 there’s no issues.
You may also refer to this link. https://msdn.microsoft.com/en-us/library/hh159285
@cosmaioan I just published 0.3.1. Could you give it a try?