question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error creating browser on .Net 4.6.2

See original GitHub issue

Simplest 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:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jhear1287commented, Jul 23, 2018

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

0reactions
kblokcommented, Mar 17, 2018

@cosmaioan I just published 0.3.1. Could you give it a try?

Read more comments on GitHub >

github_iconTop Results From Across the Web

error creating browser on .Net 4.6.2 · Issue #90
WriteLine("Navigating google"); //this line throws an error (stack trace below) var browser = await Puppeteer.LaunchAsync(new LaunchOptions ...
Read more >
Cannot load project with target .Net Framework 4.6.2
I am using a Windows 10 with Visual Studio 2017. I have .Net Framework 4.6.1 and 4.7.2 installed but not 4.6.2. I tried...
Read more >
Fix .NET Framework 'This application could not be started'
When you attempt to run a .NET Framework application, you may receive the "This application could not be started" error message.
Read more >
Known issues when you upgrade .NET Framework ...
This article helps you resolve the problem where Microsoft .NET Framework applications can't run when you upgrade .NET Framework 4.5.2 to .
Read more >
Can not add .NET framework 4.6.2 web app reference to . ...
I have created a .NET framework 4.6.2 web application. Then I have created a .NET Standard class library. The target framework is 1.6...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found