Skip to content
Guide

Turnstile-Solver from GitHub Not Working in 2026: Errors, Fixes and Alternatives

NSLSolver TeamPublished Updated 11 min read

Theyka's Turnstile-Solver usually stops working for one of four reasons: the browser it drives is detected (headless mode, an old Chromium, a flagged IP or proxy), your client misreads its API (pending results are plain text and failures come back with HTTP 200), the token is used wrongly (too late, twice, or without the widget's action and cdata), or the page is not a Turnstile widget at all. Run api_solver.py headed on Python 3.10+, poll /result correctly, submit the token within seconds, and check the sitekey.

If you still get CAPTCHA_FAIL or rejected tokens after that, the limit is the approach itself, and the maintainer has said he has no time to maintain an open-source version. Below: the errors reported in the repo's issues, fixes that work, two other GitHub projects, and when an API is simpler.

Quick answer: match your Turnstile-Solver symptom to the fix

Most failures of Theyka/Turnstile-Solver show up as one of these responses or log lines. Find yours, then read the matching section for code.

{"elapsed_time": 16.26, "value": "CAPTCHA_FAIL"}
Ten click-and-read attempts produced no token. Usually headless mode, a flagged IP or proxy, or a wrong sitekey. Run headed, test without the proxy, re-check the sitekey. It arrives with HTTP 200, so check the value field.
CAPTCHA_NOT_READY (or JSONDecodeError on /result)
The task is still running. While pending, /result returns that plain string, not JSON. Keep polling; if it never changes, watch the browser with --debug True.
You must specify a User-Agent for Turnstile Solver or use camoufox without useragent
You passed --headless without --useragent. Add --useragent with the exact UA of the installed browser, use --browser_type camoufox, or drop headless entirely.
create_app() missing 1 required positional argument: 'proxy_support'
main.py's API-server option is out of date (issue #217). Start python api_solver.py directly, or add proxy_support=False to the create_app() call in main.py.
ScreenFingerprint.__init__() missing 6 required positional arguments
Camoufox's fingerprint data was broken upstream in mid-2025 (issue #45, camoufox #330). Upgrade camoufox and browserforge, run python -m camoufox fetch again, or use --browser_type chromium.
TurnstileError: [Cloudflare Turnstile] Error: 600010
The widget's challenge failed in that browser (issue #32). Per the maintainer: wrong sitekey or URL, or a full-page challenge this tool cannot solve. Otherwise it is IP, headless mode or browser build.
Token returned, but the site still says the captcha is invalid
The token was rejected at siteverify. It expired (300 s), was reused, or lacks the widget's action or cdata. Open issue #211 also reports stub-page tokens being rejected on some sites.
Stuck on "Just a moment..." / no sitekey to pass
That is Cloudflare's interstitial challenge, not a Turnstile widget. The maintainer says it is out of scope (issue #23): you need a cf_clearance cookie instead.

Responses and messages are quoted from api_solver.py, main.py and the project's GitHub issues; token rules from Cloudflare's server-side validation docs, all checked on 2026-12-01.

How Theyka/Turnstile-Solver works

Theyka/Turnstile-Solver is the best-known "turnstile solver" repository on GitHub: about 1,000 stars and 230+ forks as of 1 December 2026, created in October 2024, not archived, no tagged releases. Its LICENSE file is Creative Commons Attribution-NonCommercial 4.0, so commercial use is not covered. api_solver.py was last changed on 8 April 2025; later commits only touch the README and issue templates. The maintainer says to use api_solver.py, not the older sync and async scripts (issue #210).

api_solver.py is a small Quart server with a pool of patchright browsers (chromium, chrome or msedge) or Camoufox, one per --thread. For each task it opens a fresh context, intercepts your target URL with page.route() and serves a minimal page containing only the Turnstile widget with your sitekey, action and cdata. It then clicks the widget and reads the hidden cf-turnstile-response input, up to ten times. The token gets the right hostname without the real site ever loading.

  • GET /turnstile?url=...&sitekey=... (optional action, cdata) returns {"task_id": "..."} with HTTP 202, or 400 "Both 'url' and 'sitekey' are required".
  • GET /result?id=... returns the plain string CAPTCHA_NOT_READY while pending, {"elapsed_time": ..., "value": "0.xxx"} on success and {"value": "CAPTCHA_FAIL"} on failure. Results are also saved to results.json.
  • Flags: --headless, --useragent, --debug, --browser_type, --thread (default 1), --host (127.0.0.1), --port (5000) and --proxy.

Why it stops working

  • Headless detection. Headless needs a --useragent, and even then the maintainer says patchright headless is detected by Turnstile (issue #48). The early-2025 workaround of pinning an old patchright (issue #10) is now stale.
  • IP and proxy reputation. In issue #27 automated clicks fail from an IP where manual clicks pass; in #47 residential proxies give CAPTCHA_FAIL while the same setup works without them.
  • Dependency drift. requirements.txt is unpinned and the README still says Python 3.8+, but current patchright (1.64.4) and camoufox (0.5.9) need 3.10+; on 3.8 pip stops at patchright 1.48.0.post0 from November 2024 (see issue #214).
  • The stub-page approach. In issue #211 (open since August 2025) users report tokens sites reject; the maintainer blames Turnstile rate-limiting token generation per user, and a fork author argues the real page now has to be loaded.
  • Token rules. Cloudflare tokens are valid for 300 seconds and single-use; siteverify also returns the hostname, action and cdata for the site to check.
  • Wrong target. "Just a moment..." pages give no token (issues #18, #23); a wrong sitekey or URL gives 600010 or nothing (#31, #32).

Fix 1: install it cleanly and run it headed

Use a fresh virtual environment on Python 3.10+ and launch api_solver.py itself: main.py's API option crashes with the create_app() error (issue #217). Run headed; on a Linux server, run it inside Xvfb, as the project's Docker script does with xvfb-run. In issue #215, Camoufox on a GUI-less server only started after installing missing system packages.

--browser_type chrome and msedge need the real browser installed. For headless, copy the User-Agent from a headed run of the same browser (the maintainer's advice in issue #10), and never write --headless False: the flags use type=bool, so any value turns them on.

install_and_run.sh
git clone https://github.com/Theyka/Turnstile-Solver.git
cd Turnstile-Solver

# Use Python 3.10+ (3.11 or newer is safest): current patchright and camoufox
# releases require 3.10, so an older interpreter silently gets old browsers.
python3.11 -m venv venv
source venv/bin/activate              # Windows: venv\Scripts\activate
pip install -r requirements.txt
python -m patchright install chromium # or: python -m camoufox fetch

# Desktop: headed browser (the default), start api_solver.py directly, not main.py
python api_solver.py --browser_type chromium --thread 2 --debug True

# Linux server with no display: stay headed inside a virtual display
sudo apt install -y xvfb
xvfb-run -a python api_solver.py --browser_type chromium --thread 2

# Headless only if you must, with the exact UA of the installed browser.
# Careful: these flags are argparse type=bool, so "--headless False" also turns
# headless ON. Omit a flag to keep it off.
python api_solver.py --headless True \
  --useragent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<your version> Safari/537.36"

Fix 2: poll /result correctly and use the token fast

Many "not working" reports are client bugs. A pending task returns the bare text CAPTCHA_NOT_READY, so calling .json() on every poll throws. A failure returns HTTP 200: the code means to send 422, but its check ("CAPTCHA_FAIL" in result) tests the dict's keys, so it never fires. Branch on the value field.

Then use the token once, within 300 seconds, with the action and cdata the real widget uses (data-action and data-cdata on the page). Tokens read back from results.json are almost certainly expired. Our guide to cf-turnstile-response invalid errors covers siteverify rejections, and the Turnstile error code reference explains 600010 and the other widget codes.

turnstile_solver_client.py
import time

import requests

SOLVER = "http://127.0.0.1:5000"


def get_token(url, sitekey, action=None, cdata=None, timeout=60):
    params = {"url": url, "sitekey": sitekey}
    if action:
        params["action"] = action  # must equal the widget's data-action
    if cdata:
        params["cdata"] = cdata    # must equal the widget's data-cdata
    r = requests.get(f"{SOLVER}/turnstile", params=params, timeout=10)
    r.raise_for_status()           # 400 = url or sitekey missing
    task_id = r.json()["task_id"]

    deadline = time.time() + timeout
    while time.time() < deadline:
        time.sleep(2)
        res = requests.get(f"{SOLVER}/result", params={"id": task_id}, timeout=10)
        if res.status_code == 400:
            raise RuntimeError(res.text)  # unknown task id
        try:
            data = res.json()
        except ValueError:
            continue  # pending: the body is the plain string CAPTCHA_NOT_READY
        if data.get("value") == "CAPTCHA_FAIL":  # arrives with HTTP 200
            raise RuntimeError(f"no token after {data['elapsed_time']} s")
        return data["value"], time.time()
    raise TimeoutError("solver did not answer in time")


token, issued_at = get_token("https://example.com/login", "0x4AAAAAAA...")

# Submit immediately: a Turnstile token is single-use and expires
# 300 seconds after it was generated.
if time.time() - issued_at < 240:
    requests.post("https://example.com/login",
                  data={"email": "me@example.com", "cf-turnstile-response": token})

Fix 3: proxies, Docker and Camoufox

  • Proxies: --proxy is a switch, not a path. It reads proxies.txt from the current directory (protocol://ip:port or protocol://ip:port:username:password per line) and picks one at random per task. If it fails only with proxies, the exit IP is the usual suspect.
  • Docker: the theyka/turnstile_solver image runs an RDP desktop on port 3389 (login root/root) and installs the current code with unpinned requirements at start. -e RUN_API_SOLVER=true runs xvfb-run api_solver.py --browser_type chrome --host 0.0.0.0 for you. The API has no authentication: never publish ports 3389 or 5000 to the internet.
  • Camoufox: the ScreenFingerprint error came from broken upstream fingerprint data, fixed in camoufox issue #330 (closed June 2025). Run pip install -U camoufox browserforge, then python -m camoufox fetch. More in Camoufox not working.
  • If Chromium will not launch at all, see our patchright troubleshooting guide.

Other Turnstile solver projects on GitHub

Searching GitHub for "turnstile solver" returns hundreds of repositories, many of them forks of this one. Two others with real traction, checked on 1 December 2026:

  • D3-vin/Turnstile-Solver-NEW (about 330 stars), suggested by its author in issue #211: the same browser-based idea as a REST API on port 5072, headless by default, with a stub page plus real-page fallback and a /cf_clearance endpoint for Under Attack pages. Its licence is "Educational use", not a standard open-source licence.
  • chris124567/cfsolve (about 1,000 stars, MIT): a Rust library and CLI that solves Turnstile widgets and challenge pages without a browser by impersonating a recorded browser profile. Building needs Rust and BoringSSL, and its author writes that he will stop maintaining it within weeks.
  • For a wider comparison, see our comparison of open-source Turnstile and Cloudflare solvers.

When to switch to an API

Keep the GitHub solver for a handful of widgets on a desktop where you can watch the browser. It becomes the wrong tool when a sitekey keeps returning CAPTCHA_FAIL after these fixes, when tokens are rejected as in issue #211, or when you run Xvfb, browser pools and proxies just to fill one form field.

Then move only the token step to a managed solver: your code still posts cf-turnstile-response, but the token comes from one HTTP call instead of a browser you maintain. Only automate sites you own or are explicitly authorised to access.

NSLSolver example: a Turnstile token without a browser

NSLSolver solves Turnstile server-side with plain requests: no browser on your side or ours. Send type turnstile with the widget's site_key and page url, plus action and cdata only if the widget sets them. The call is synchronous, about 250 ms on average, $0.80 per 1,000, billed only on success (a 503 is free and safe to retry). Email verification gives free credit with Google, Gmail or Proton sign-up, no card. Details are on the Cloudflare Turnstile solver API page and the pricing page.

If the page is a full-page "Just a moment..." challenge instead, use type challenge, which returns cf_clearance plus the user_agent to replay through the same proxy (see cf-clearance-scraper not working for the browser route). NSLSolver does not solve reCAPTCHA v2, hCaptcha, image CAPTCHAs or DataDome.

nslsolver_turnstile.py
import requests

resp = requests.post(
    "https://api.nslsolver.com/solve",
    headers={"X-API-Key": "nsl_YOUR_API_KEY"},
    json={
        "type": "turnstile",
        "site_key": "0x4AAAAAAA...",   # the widget's data-sitekey
        "url": "https://example.com/login",
        # "action": "login",           # only if the widget sets data-action
        # "cdata": "...",              # only if the widget sets data-cdata
    },
    timeout=120,
)
if resp.status_code == 503:
    raise SystemExit("not completed this time: retry, failed solves are not billed")
resp.raise_for_status()  # 400 names the bad field, 401 bad key, 402 balance
token = resp.json()["token"]

# Same place the GitHub solver's token went: the cf-turnstile-response field
requests.post("https://example.com/login",
              data={"email": "me@example.com", "cf-turnstile-response": token})

Full /solve API reference

Related guides

Frequently asked questions

Does Theyka's Turnstile-Solver still work in 2026?

It still runs and can return tokens, especially headed on a clean IP, but results vary by site. The solver code was last changed in April 2025, issue #211 about rejected tokens is open since August 2025, and the maintainer has said he has no time to maintain it. Test on your target first.

Why does Turnstile-Solver return CAPTCHA_FAIL?

It clicked the widget ten times without a token appearing. Usual causes: headless mode, a flagged IP or proxy, an old browser build, or a wrong sitekey or URL. Run headed (Xvfb on servers), test without proxies, and confirm the page's data-sitekey.

Why does /result keep returning CAPTCHA_NOT_READY?

That is the pending state, returned as plain text rather than JSON. If it never changes, the browser is stuck: start with --debug True and watch the window. A failure ends as {"value": "CAPTCHA_FAIL"} with HTTP 200.

Why is my token from Turnstile-Solver rejected by the website?

Tokens expire 300 seconds after generation, are single-use, and the site may check action and cdata. Submit at once, pass the widget's action and cdata, and never reuse values from results.json. If fresh tokens are still rejected, see issue #211.

Can Turnstile-Solver bypass the Cloudflare "Just a moment..." page?

No. The maintainer states that the interstitial challenge gives no token and needs a cf_clearance cookie, which is outside the project's scope (issue #23). Use a browser that clears the challenge or a challenge solver that returns cf_clearance.

What can replace Turnstile-Solver without running a browser?

A request-based solver API. NSLSolver's turnstile type takes site_key and url (plus action and cdata if set) and returns the token in about 250 ms for $0.80 per 1,000, billing only successful solves; chris124567/cfsolve is a self-hosted, browserless Rust option.

Get Turnstile tokens without running a browser

One HTTP call returns a cf-turnstile-response token in about 250 ms. Free credit with Google, Gmail or Proton sign-up, no card, and you only pay for successful solves.