Puppeteer-sharp-extra
Puppeteer-sharp-extra copied to clipboard
Method not found PuppeteerSharp.IPage.EvaluateExpressionOnNewDocumentAsync(System.String)
Running PuppeteerExtraSharp 2.0.0. Using the quick start example in the README. Receiving exception on the var browser line
System.MissingMethodException
HResult=0x80131513
Message=Method not found: 'System.Threading.Tasks.Task PuppeteerSharp.IPage.EvaluateExpressionOnNewDocumentAsync(System.String)'.
Source=PuppeteerExtraSharp
StackTrace:
at PuppeteerExtraSharp.Plugins.ExtraStealth.StealthPlugin.<OnPageCreated>d__5.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at PuppeteerExtraSharp.Plugins.ExtraStealth.StealthPlugin.OnPageCreated(IPage page)
at PuppeteerExtraSharp.PuppeteerExtra.<Register>d__9.MoveNext()
at PuppeteerExtraSharp.PuppeteerExtra.<OnStart>d__5.MoveNext()
at PuppeteerExtraSharp.PuppeteerExtra.<LaunchAsync>d__2.MoveNext()
at hospitalvote.MainClass.<Main>d__0.MoveNext() in C:\Users\user\dev\app\app console\Program.cs:line 15
Looks like this is an incompatibility with a recent PuppeteerSharp update. I got the same error after updating PuppeteerSharp from v12 to v18.0.3
Did somebody find a way to fix it?
This happens when using PuppeteerSharp V15.0.1 or greater. The current PuppeteerSharp version is 20.1.2.
Best next steps is to create a pr updating PuppeteerSharp for this library.
https://www.nuget.org/packages/PuppeteerExtraSharp/3.0.0