Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Most StealthPlugin errors in PuppeteerSharp come from using the wrong package family, incompatible resolved versions, or an API method that changed between versions. In .NET, install and configure PuppeteerExtraSharp and register the plugin through PuppeteerExtra. Do not paste the Node.js puppeteer-extra example into a C# project. Then classify the failure as a build error, launch error, or target-site block before changing code.

Use the .NET integration pattern first

Puppeteer-sharp-extra provides the .NET plugin wrapper, while PuppeteerSharp supplies browser automation. The documented setup creates a PuppeteerExtra instance, registers StealthPlugin, and launches through that wrapper.

Minimal C# example

using PuppeteerExtraSharp;
using PuppeteerExtraSharp.Plugins.Stealth;

var extra = new PuppeteerExtra();
extra.Use(new StealthPlugin());

await using var browser = await extra.LaunchAsync();
await using var page = await browser.NewPageAsync();
await page.GoToAsync("https://example.com");
Console.WriteLine(await page.GetTitleAsync());

The exact namespaces can vary with the package version, so let your IDE resolve them from the installed assembly. If PuppeteerExtra or StealthPlugin cannot be found, the project probably has PuppeteerSharp alone, the wrong package, or a package version whose API differs from the example.

Separate Node.js code from C# code

The upstream JavaScript project documents a pattern similar to puppeteer.use(StealthPlugin()). That syntax belongs to the Node packages puppeteer-extra and puppeteer-extra-plugin-stealth, described in the upstream stealth README. It is not a C# API.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Node.js: JavaScript packages, require or import, and puppeteer.use(...).
  • .NET: NuGet packages, C# namespaces, PuppeteerExtra, Use(new StealthPlugin()), and LaunchAsync().

Remove JavaScript imports from a .NET project and verify that your project references PuppeteerExtraSharp, not only PuppeteerSharp.

Check the packages that are actually resolved

A project file can contain a version range while NuGet resolves a different version through a transitive dependency. Inspect the resolved graph and compare the two libraries before debugging a method call.

Commands

dotnet list package

dotnet list package --include-transitive

Record the resolved versions of PuppeteerSharp and PuppeteerExtraSharp. Also record your target framework from the <TargetFramework> element in the project file. Compare those versions with the compatibility information in the package listing and the source repository. A clean rebuild after changing versions prevents stale binaries from hiding the result:

dotnet clean
dotnet restore
dotnet build

Do not assume that the newest release of one package is compatible with every release of the other. Align versions supported by the package documentation, then retest the smallest possible program.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Identify where the error occurs

Symptom stage Typical signal What to inspect first
Build or compile Type, namespace, method, or overload does not exist Package identity, resolved versions, namespace, and API signature
Browser launch Exception while calling LaunchAsync Launch options, browser executable/download, and compatible package versions
Navigation Page timeout, challenge, CAPTCHA, or access denial Target-site behavior, network conditions, and whether automation is being blocked

A site refusing navigation is not proof that the plugin failed to load. Conversely, a missing method at compile time cannot be fixed by changing user-agent or stealth settings.

Resolve missing-method and overload errors carefully

One secondary troubleshooting report mentions a mismatch between EvaluateExpressionOnNewDocumentAsync(string) and EvaluateFunctionOnNewDocumentAsync(string). Treat this as a diagnostic lead, not a universal patch. The correct method depends on the PuppeteerSharp version, the plugin version, and whether the supplied script is an expression or a function.

  1. Copy the complete error, including the assembly and method signature named by the compiler or runtime.
  2. Open the API reference for the same PuppeteerSharp version. The general references are the PuppeteerSharp API and LaunchOptions API; do not use documentation for a different release.
  3. Check the plugin source or package version for the exact call that fails.
  4. Confirm the expected script format before changing the method. A function-oriented API and an expression-oriented API are not interchangeable merely because both accept a string.
  5. Rebuild with the aligned package set and test a minimal page.

If the plugin internally calls a method absent from your resolved PuppeteerSharp assembly, upgrading or downgrading only one package can make the mismatch worse. Change the pair deliberately and keep the versions recorded for reproducibility.

Use launch options only after integration works

Once the wrapper compiles, add launch settings incrementally. Start with the default launch, then introduce one option at a time so an invalid executable path, argument, or headless setting is not mistaken for a StealthPlugin problem.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
var extra = new PuppeteerExtra();
extra.Use(new StealthPlugin());

var browser = await extra.LaunchAsync(new PuppeteerSharp.LaunchOptions
{
    Headless = true
});

Consult the version-matched LaunchOptions documentation for available properties. Browser download and executable requirements can differ by PuppeteerSharp release, operating system, and deployment environment; capture the full launch exception rather than replacing options randomly.

When the target site still blocks you

The stealth project’s stated purpose is to make headless automation harder to detect. It does not guarantee that a target accepts automation. A successful build and browser launch can therefore be followed by a CAPTCHA, challenge page, HTTP denial, or application-level block.

  • Save the final URL and response or page title.
  • Check whether a normal interactive browser reaches the same page from the same network.
  • Separate a timeout or failed load from an explicit bot challenge.
  • Respect the site’s terms, robots policy, authentication rules, and applicable law.
  • Do not treat stealth as a way to defeat access controls.

These symptoms require application and site-behavior diagnosis, not a blind substitution of evaluation methods.

Build a minimal reproducible test

Reduce the project to one target framework, the two relevant NuGet packages, and one navigation. Remove proxies, custom scripts, parallel pages, and unrelated middleware. Then capture:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Operating system and .NET SDK version.
  • Target framework.
  • Resolved PuppeteerSharp and PuppeteerExtraSharp versions from dotnet list package --include-transitive.
  • Complete compiler or exception text, including inner exceptions.
  • The smallest code sample that reproduces the failure.
  • The stage: build, launch, page creation, navigation, or post-navigation evaluation.

This information lets maintainers distinguish a missing reference from a version mismatch and a package exception from a target-site response.

Common errors and targeted fixes

“The type or namespace name PuppeteerExtraSharp could not be found”

Cause: the .NET wrapper is not installed or restore failed. Fix: add the PuppeteerExtraSharp package, run restore, and verify the resolved package list. Ensure the project is not accidentally referencing only JavaScript packages.

“StealthPlugin could not be found”

Cause: missing plugin namespace, wrong package version, or an incomplete package set. Fix: inspect the package’s documented namespaces for your version and let the IDE import the type from the referenced assembly.

“Method … does not exist”

Cause: API drift or incompatible PuppeteerSharp/PuppeteerExtraSharp versions. Fix: compare the exact signature with the matching API reference and plugin source. Investigate the expression-versus-function method report only after this check.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Launch fails before a page opens

Cause: browser executable, download, permissions, or launch-option problems. Fix: run the wrapper with default options, verify the browser installation expected by your PuppeteerSharp release, and then add options one at a time.

Navigation reaches a CAPTCHA or denial page

Cause: target-site detection or access policy, not necessarily plugin integration. Fix: log the final URL and page content, test a permitted page, and handle the block as a site-access issue.

Reliability and maintenance practices

  • Pin known-compatible package versions instead of floating ranges in production.
  • Check transitive dependencies after every upgrade.
  • Keep a startup health check that launches a browser and opens a harmless test URL.
  • Log package versions, target framework, launch stage, and inner exceptions without exposing credentials.
  • Use bounded navigation and operation timeouts so a failed site cannot hang a worker indefinitely.
  • Retest after browser, .NET SDK, or operating-system upgrades.

Stealth evasions can change upstream, and sites can change their detection systems. Treat the plugin as one component in a monitored automation system, not as a permanent compatibility guarantee.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your actual requirement is to obtain a clean image or PDF rather than control a browser session, ScreenshotNeo provides a website screenshot API and MCP server. One GET request returns PNG, JPEG, WebP, or PDF. Before capture it accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be disabled.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Only clean shots are billed. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and the response identifies the result with X-Page-Verdict and X-Billed headers. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients.

One-call cURL example

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the complete ScreenshotNeo API documentation for authentication, output formats, and options. The service also supports full-page captures with lazy images, CSS-selector elements, dark mode, device presets, custom viewports, retina scale, PDF paper and page settings, custom CSS or JavaScript, clicks, waits, ad/tracker/request blocking, headers, cookies, user agents, authorization, timezone, geolocation, transparent backgrounds, resizing, TTL caching, signed image links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, usage reporting, and an OpenAPI specification.

There is a free allowance of 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is included on every plan. Create a free ScreenshotNeo account if an API call is a better fit than maintaining PuppeteerSharp and browser dependencies.

Frequently Asked Questions

Can I use the Node.js stealth package directly from C#?

No. Use the .NET PuppeteerExtraSharp wrapper and its C# API; the Node package syntax is for a separate JavaScript runtime and package set.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Is changing EvaluateExpressionOnNewDocumentAsync enough to fix every error?

No. That substitution is only a reported lead. Verify the method, script type, and compatible package versions for your installation.

Does StealthPlugin guarantee that a site will not detect automation?

No. It makes automation harder to detect, but target sites can still challenge or block automated browsing.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.