Skip to content
Guide

Puppeteer Stealth Not Working in 2026: Why Cloudflare Still Detects You and How to Fix It

NSLSolver TeamPublished Updated 9 min read

puppeteer-extra-plugin-stealth stops working on Cloudflare because it only rewrites JavaScript-visible properties such as navigator.webdriver, while Cloudflare also scores signals the plugin never touches: the CDP Runtime.enable leak, the headless browser itself, your IP reputation and how the script behaves. The plugin has not had a release since version 2.11.2 on 1 March 2023, so it has followed none of the Chrome, Puppeteer or Cloudflare changes since.

The fix is to remove the leaks at the library level (rebrowser-puppeteer, or patchright if you can move to Playwright), run real Chrome headful or in new headless mode behind a clean IP, and, when a Turnstile widget or managed challenge still will not clear, get the token or the cf_clearance cookie from a solver API instead of fighting it inside the browser.

Quick answer: match your symptom to the fix

These are the messages and symptoms people paste into search when the stealth plugin stops helping. Find yours:

Title stays "Just a moment..." and the page never loads
Cloudflare served a managed challenge and your browser did not pass it. The stealth plugin alone will not change that. Remove the Runtime.enable leak (rebrowser-puppeteer), run headful Chrome from a clean IP, or get a cf_clearance cookie from a challenge solver.
"Verify you are human" never completes, or the Turnstile widget spins forever
Turnstile scored the browser as automated and will not issue a token. Clicking again does not help. Fix the environment (sections below) or solve the widget server-side and write the token into cf-turnstile-response.
Turnstile error 600010 (or another 300xxx / 600xxx code)
Cloudflare documents both families as "Generic challenge failure" with "Bot behavior detected". Retrying the same setup rarely helps. Change the browser setup or the IP, or use a solver.
TypeError: page.waitForTimeout is not a function
Puppeteer removed waitForTimeout in v22.0.0 (February 2024), but the stealth README examples still call it. Replace it with await new Promise((r) => setTimeout(r, 5000)).
Error: Cannot find module 'puppeteer-extra-plugin-stealth/evasions/chrome.app'
The plugin loads each evasion with a dynamic require that bundlers (webpack, Vercel builds, pkg) do not follow. See issues #93, #523 and #538. Keep puppeteer-extra and its plugins out of the bundle (mark them as external) and ship node_modules as is.
Passes on my laptop, blocked on a VPS or in Docker
Same code, different environment: datacenter IP, no GPU, a virtual display. Issue #817 describes exactly this (Windows laptop passes, Debian + xvfb fails). Run the server script through a residential IP first. If it passes, the IP was the problem, not the plugin.
"Sorry, you have been blocked" / Error 1020
A firewall rule written by the site owner, not a challenge. No stealth plugin or solver changes a firewall rule. See our Cloudflare 1020 guide linked below.

Versions and release dates checked on npm and GitHub on 2026-12-01. Sources are listed at the end of the article.

Is puppeteer-extra-plugin-stealth still maintained?

Not actively. The latest version on npm is 2.11.2, published on 1 March 2023 together with puppeteer-extra 3.3.6 and playwright-extra 4.3.6. The last commit on the repository's master branch is from the same day. The repository is not archived and still collects issues and pull requests, but there has been no release for more than three and a half years.

In that time Puppeteer reached v25.19.0 (25 November 2026), Chrome replaced its old headless mode, and Cloudflare reworked its challenges more than once. The README still says the plugin "passes all public bot tests", but those are the classic test pages such as bot.sannysoft.com, not Cloudflare. Open issues tell the other half of the story: #908 ("can't passby cloudflare verify", August 2024) and #920 (April 2025) are still open with no fix.

What the stealth evasions cover, and what they miss

The plugin is a bundle of 17 evasion modules. Each one is a small script that rewrites something a page can read from JavaScript:

  • navigator properties: webdriver, plugins, languages, vendor, permissions and hardwareConcurrency.
  • The window.chrome object: chrome.app, chrome.csi, chrome.loadTimes and chrome.runtime.
  • WebGL vendor strings, media codecs, iframe.contentWindow and window.outerWidth / outerHeight.
  • user-agent-override: strips HeadlessChrome from the user agent, sets Accept-Language and, by default on Linux, rewrites the UA to claim Windows (the maskLinux option).
  • sourceurl: hides the pptr: sourceURL that Puppeteer appends to evaluated scripts.

The detections no JavaScript evasion can reach

This is why the plugin passes the old test pages and still fails on Cloudflare. The important signals sit below or beside the page:

  • The Runtime.enable leak. Puppeteer and Playwright call this CDP command to track execution contexts, and a few lines of page JavaScript can detect that it was used. The rebrowser-patches README says the technique is used by all major anti-bot vendors, Cloudflare and DataDome included. It happens in the protocol, so an injected script cannot hide it.
  • Tampering traces. Every evasion replaces a native property with a Proxy or defineProperty, and that is detectable in itself. The rebrowser README reports that adding the stealth plugin to an otherwise clean rebrowser-puppeteer turns its nativeTampering and workerConsistency checks red: the plugin can make a browser look more automated, not less.
  • Inconsistency. With maskLinux on, a Linux server claims Windows in its user agent while the rest of the machine (fonts, screen, GPU) is still a Linux server.
  • TLS and HTTP/2. These fingerprints come from the Chrome binary, not from page JavaScript, so the plugin cannot change them. With real Chrome they are genuine; they only become a problem when a TLS-intercepting proxy sits in between.
  • IP reputation and behaviour. Datacenter ASNs, instant clicks and zero mouse movement are scored whatever your fingerprint says.

Headless: new, shell, or headful

Puppeteer v22.0.0 (5 February 2024) made Chrome's new headless mode the default, so headless: true now runs the same browser as headful Chrome without a window. Since Chrome 132.0.6793.0 the old headless mode exists only as a separate binary, chrome-headless-shell, which Puppeteer launches when you pass headless: 'shell'. Puppeteer's own docs say chrome-headless-shell "does not match the behavior of the regular Chrome completely".

So if an old snippet set headless: 'shell' for speed, remove it on protected sites. Also note that headless Chrome still sends a HeadlessChrome token in its user agent unless something rewrites it; the stealth plugin's user-agent-override does that, rebrowser-patches deliberately does not. For a hard target, the safest order is headful Chrome (on a real or virtual display), then new headless, never the shell.

launch.mjs
// launch.mjs  (Puppeteer 22 or newer)
import puppeteer from 'puppeteer';

const browser = await puppeteer.launch({
  headless: false,   // or true (new headless). Avoid 'shell' on protected sites
  channel: 'chrome', // installed Google Chrome instead of Chrome for Testing
  args: ['--proxy-server=http://proxy.example.com:8080'],
  userDataDir: './profile', // keep cookies such as cf_clearance between runs
});
const page = await browser.newPage();
await page.authenticate({ username: 'user', password: 'pass' });

// page.waitForTimeout() was removed in Puppeteer v22
await new Promise((r) => setTimeout(r, 3000));

Fix 1: remove the CDP leaks with rebrowser-puppeteer

rebrowser-patches is the actively maintained answer to the leaks the stealth plugin cannot reach. Release 1.1.3 (2 November 2026) ships rebrowser-puppeteer and rebrowser-puppeteer-core 25.16.0, patched builds of Puppeteer 25.16.0. Runtime.enable is no longer called (the main-world context ID is looked up another way, mode addBinding by default), the pptr: sourceURL disappears from stack traces, --disable-blink-features=AutomationControlled is added so navigator.webdriver stays false, and --enable-automation is dropped.

The easiest switch is an npm alias, so your imports do not change. You can keep puppeteer-extra for other plugins with addExtra, but test with and without the stealth plugin: the rebrowser maintainers advise leaving it out. They are also explicit about the limits: the patches do not touch fingerprints, IP reputation or behaviour, and Cloudflare Turnstile scores all of those.

install.sh
# Same imports ("import puppeteer from 'puppeteer'"), patched code underneath
npm install puppeteer@npm:rebrowser-puppeteer puppeteer-core@npm:rebrowser-puppeteer-core

# Default fix mode is addBinding. If a page breaks, try the isolated mode:
REBROWSER_PATCHES_RUNTIME_FIX_MODE=alwaysIsolated node scrape.mjs

# Still need puppeteer-extra for other plugins? Wrap the patched core:
#   import { addExtra } from 'puppeteer-extra'
#   import rebrowserPuppeteer from 'rebrowser-puppeteer-core'
#   const puppeteer = addExtra(rebrowserPuppeteer)

Fix 2: patchright, only if you can move to Playwright

There is no patchright build for Puppeteer. Patchright is a patched drop-in replacement for Playwright (npm patchright 1.64.3 and PyPI patchright 1.64.4, both released 2 November 2026) and it only patches Chromium-based browsers. It removes the Runtime.enable and Console.enable leaks, adjusts the launch flags, and lists Cloudflare among the protections it passes "with the right setup".

That setup is specific: a persistent context, channel: 'chrome' (real Google Chrome), headless: false, viewport: null, and no custom user agent or headers. For a small scraper, porting to Playwright's API to get patchright is reasonable. For a large Puppeteer codebase, rebrowser-puppeteer is the cheaper change. Our Playwright stealth guide covers patchright in detail.

Fix 3: the environment, which no plugin can patch

  • IP first. Run the same script from a residential or mobile IP. If it passes there, the plugin was never the problem. Cloudflare's own Turnstile troubleshooting steps include turning off VPNs and proxies, which tells you how much the network weighs.
  • Server versus laptop. A VPS has no GPU, no audio device and a datacenter ASN. Issue #817 on the puppeteer-extra repo is a long thread of "passes on my laptop, fails on Debian with xvfb".
  • Keep the profile. Use a userDataDir so a passed challenge is not repeated on every run, and reuse cf_clearance with the same IP and user agent it was issued for.
  • Behave like a visitor. Do not click a widget within milliseconds of page load and do not fire requests in tight loops; rate limits (Cloudflare error 1015) are a separate rule from bot detection.

When to stop patching and use a solver

If a site still loops on "Just a moment..." after all of the above, or refuses to issue a Turnstile token, you are now matching Cloudflare's detection updates one release at a time. That is the point where a managed solver costs less than your time.

NSLSolver's challenge type solves a Cloudflare challenge through your own proxy and returns the cf_clearance cookie plus the user_agent it was issued for, in about 3.3 seconds on average, at $1.00 per 1,000 successful solves. The turnstile type returns a token in about 250 ms for $0.80 per 1,000. Only successful solves are billed, and sign-ups with Google, Gmail or Proton get $0.10 of free credit (about 125 Turnstile solves), no card required.

Be clear about scope: NSLSolver covers Cloudflare Turnstile, Cloudflare Challenge, reCAPTCHA v3, Kasada and Akamai (beta). It does not solve reCAPTCHA v2, hCaptcha, image or text CAPTCHAs, FunCaptcha, GeeTest or DataDome. And only automate sites you own or are authorised to access.

Example: get cf_clearance and drop the browser

The clearance is issued for an iPhone Safari User-Agent, so leave user_agent out of the request (or send an iPhone Safari UA) and replay with the user_agent the response returns, through the same proxy. If the wall is a Turnstile widget inside a page you are already driving with Puppeteer, request a turnstile token instead and write it into cf-turnstile-response, as shown in our Node.js Turnstile guide.

cf-clearance.mjs
// cf-clearance.mjs  (Node 18+, npm i undici)
import { fetch, ProxyAgent } from 'undici';

const API_KEY = process.env.NSLSOLVER_API_KEY;
const PROXY = 'http://user:pass@sticky-proxy.example.com:8080'; // same exit IP for solve and replay
const TARGET = 'https://protected-site.example.com/';

// 1) Solve the Cloudflare challenge through your proxy
const res = await fetch('https://api.nslsolver.com/solve', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json', 'X-API-Key': API_KEY },
  body: JSON.stringify({
    type: 'challenge',
    url: TARGET,
    site_key: '0x4AAAAAAA...', // the challenge widget id (0x...)
    proxy: PROXY,
    // no user_agent: the clearance is issued for the solver's iPhone Safari UA
  }),
});
const data = await res.json();
if (!res.ok || !data.success) throw new Error(res.status + ' ' + JSON.stringify(data));

// 2) Replay cf_clearance with the returned user_agent, through the same proxy
const cookie = Object.entries(data.cookies).map(([k, v]) => k + '=' + v).join('; ');
const page = await fetch(TARGET, {
  dispatcher: new ProxyAgent(PROXY),
  headers: { 'User-Agent': data.user_agent, Cookie: cookie },
});
console.log(page.status, (await page.text()).slice(0, 200));

Related guides

Frequently asked questions

Is puppeteer-extra-plugin-stealth still maintained in 2026?

Not actively. The last npm release is 2.11.2 from 1 March 2023, and the master branch has had no commit since that day. The repository is not archived, but Cloudflare-related issues such as #908 and #920 remain open without a fix.

Why does Cloudflare still detect Puppeteer with the stealth plugin?

The plugin only rewrites properties a page can read from JavaScript. Cloudflare also detects the CDP Runtime.enable call that Puppeteer makes, the headless browser, overridden native functions, the IP reputation and the timing of your actions. None of those can be fixed from an injected script.

Does puppeteer-extra-plugin-stealth bypass Cloudflare Turnstile?

No. It can make the widget render, but it has no logic to produce a cf-turnstile-response token, and Turnstile keeps refusing a browser it scores as automated. You need a cleaner browser stack or a Turnstile solver that returns the token.

Should I use headless: true, 'shell' or false?

Since Puppeteer v22, headless: true is Chrome's new headless mode, which is the real browser without a window. 'shell' launches chrome-headless-shell, which Puppeteer says does not fully match regular Chrome. On protected sites use headful (false) first, then true, and avoid 'shell'.

Is there a patchright for Puppeteer?

No. Patchright is a drop-in replacement for Playwright only (Node.js, Python and a community .NET port) and patches Chromium-based browsers. For Puppeteer, the equivalent is rebrowser-puppeteer from the rebrowser-patches project.

Can I use rebrowser-puppeteer together with puppeteer-extra?

Yes, wrap it with addExtra(rebrowserPuppeteer). But the rebrowser README warns that adding the stealth plugin turns its nativeTampering and workerConsistency checks red, so test whether you are better off without it.

What does NSLSolver return for a Cloudflare challenge, and what does it cost?

A cf_clearance cookie (in cookies) and the user_agent it was issued for, solved through the proxy you pass. Replay both through the same proxy. It averages about 3.3 seconds and costs $1.00 per 1,000 successful solves; failed solves are not billed and sign-ups with Google, Gmail or Proton get free credit.

Stop patching a browser Cloudflare already flags

Get cf_clearance or a Turnstile token from one HTTP call. Free credit with Google, Gmail or Proton sign-up, no card, and only successful solves are billed.