Puppeteer-sharp-extra icon indicating copy to clipboard operation
Puppeteer-sharp-extra copied to clipboard

Method not found PuppeteerSharp.IPage.EvaluateExpressionOnNewDocumentAsync(System.String)

Open sirEgghead opened this issue 1 year ago • 3 comments

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

sirEgghead avatar Jul 03 '24 13:07 sirEgghead

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

ToSa27 avatar Jul 07 '24 10:07 ToSa27

Did somebody find a way to fix it?

iamyegor avatar Feb 03 '25 18:02 iamyegor

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.

slongietti avatar Feb 21 '25 13:02 slongietti

https://www.nuget.org/packages/PuppeteerExtraSharp/3.0.0

Overmiind avatar Sep 02 '25 10:09 Overmiind