hardkoded / puppeteer-sharp

Headless Chrome .NET API
https://www.puppeteersharp.com
MIT License
3.36k stars 440 forks source link

Method not found / IJsHandle ExecutionContext #2631

Closed jaybee82 closed 4 months ago

jaybee82 commented 4 months ago

Description

While launch browser, an exception got raised: Method not found: 'PuppeteerSharp.IExecutionContext PuppeteerSharp.IJSHandle.get_ExecutionContext()

Complete minimal example reproducing the issue

var mainHtmlContent = await GetMainTemplateContentAsync(templateViewModel);

await new BrowserFetcher().DownloadAsync();

var launchOptions = new LaunchOptions { Timeout = 50000 }; await using var browser = await Puppeteer.LaunchAsync(launchOptions); <- throws Exception

await using var page = await browser.NewPageAsync(); await page.SetContentAsync(mainHtmlContent); ...

Expected behavior:

Create browser instance without issues

Actual behavior:

Exception got raised, method not found.

Versions

See exception with versions 13.0.0 to 17.0.0. Version 12.0.0 is working fine Targeting .Net 8

Additional Information

-

kblok commented 4 months ago

@jaybee82 can you share the stack trace?