Skip to content

Access Denied only when Camoufox is controlled via Playwright (works when launched directly) #450

@mmtylcn27

Description

@mmtylcn27

Website detecting Camoufox:

What happens:
When opening the site using Camoufox(), the page is blocked with Access Denied.
Launching the same Camoufox executable via Playwright also results in Access Denied.

Expected behavior:
The page should load normally.

Important observation (works without Playwright):
When the Camoufox executable is launched directly from the command line, the website loads without any issue:

C:\Users\Mehmet\AppData\Local\camoufox\camoufox\Cache\camoufox.exe https://bounty-nodejs.datashield.co/

This strongly suggests that the block only occurs when the browser is controlled via Playwright.

Suspected cause:
The website (or its WAF) appears to detect Playwright / Firefox juggler, not the Camoufox binary itself.

Environment:

  • OS: Windows
  • Proxy: No
  • Headless: False

Other questions:

  1. Are you using a proxy?
    No.

  2. Open the website in a private tab in your personal browser using the same IP. Does it work?
    Yes, the site loads normally in a private/incognito tab using the same IP.

To Reproduce:

Testing site:
https://bounty-nodejs.datashield.co/

Minimal reproduction script:

from camoufox.sync_api import Camoufox
from playwright.sync_api import sync_playwright

def test_camoufox_launch():
    with Camoufox() as browser:
        page = browser.new_page()
        page.goto("https://bounty-nodejs.datashield.co/")
        input()

def test_playwright_launch():
    with sync_playwright() as p:
        browser = p.firefox.launch(
            executable_path=r"C:\Users\Mehmet\AppData\Local\camoufox\camoufox\Cache\camoufox.exe",
            channel="firefox",
            headless=False,
            args=[]
        )
        context = browser.new_context()
        page = context.new_page()
        page.goto("https://bounty-nodejs.datashield.co/")
        input()

test_camoufox_launch()
test_playwright_launch()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions