page.setContent() hangs in CloakBrowser

Author: zenwavCreated Jun 7, 2026Updated Sep 14, 2026
Labelsbug

Description: page.setContent() hangs indefinitely and hits a timeout when using CloakBrowser, whereas the exact same operation succeeds instantly using standard Playwright Chromium.

CloakBrowser version: [email protected]

Wrapper: JavaScript ([email protected])

Environment: Windows 10 22H2

Launch options: Default launch() configuration.

Tested with a different IP or proxy? No

Works outside Docker / on host machine? Not using Docker

Steps to reproduce:

import { chromium } from 'playwright-core';
import { launch } from 'cloakbrowser';

async function testStandard() {
    console.log('\n--- 1. Testing Standard Playwright Chromium ---');
    const browser = await chromium.launch();
    const page = await browser.newPage();
    console.log('Calling page.setContent...');
    await page.setContent('<h1>Hello from Standard Chromium</h1>', { timeout: 5000 });
    console.log('✓ Succeeded on Standard Chromium!');
    await browser.close();
}

async function testCloak() {
    console.log('\n--- 2. Testing CloakBrowser Chromium ---');
    const browser = await launch();
    const page = await browser.newPage();
    try {
        console.log('Calling page.setContent...');
        await page.setContent('<h1>Hello from CloakBrowser</h1>', { timeout: 5000 });
        console.log('✓ Succeeded on CloakBrowser!');
    } catch (e) {
        console.error('✗ Failed on CloakBrowser:', e.message);
    } finally {
        await browser.close();
    }
}

async function run() {
    await testStandard();
    await testCloak();
}
run();

Error output / screenshots:

--- 1. Testing Standard Playwright Chromium ---
Calling page.setContent...
✓ Succeeded on Standard Chromium!

--- 2. Testing CloakBrowser Chromium ---
Calling page.setContent...
✗ Failed on CloakBrowser: page.setContent: Timeout 5000ms exceeded.
Call log:
  - setting frame content, waiting until "load"

Dockerfile (if applicable):

Additional notes: Standard Playwright Chromium handles this successfully in less than a second. The issue is isolated to CloakBrowser