then-purpleT
Apify & Crawlee3y ago
1 reply
then-purple

Playwright newContext() in incognito mode

Hey,

I'm facing this issue:
Error: Function newContext() is not available in incognito mode
at PlaywrightBrowser.newContext (xxxxx\node_modules@crawlee\browser-pool\playwright\playwright-browser.js:69:15)

Here's the code that triggers it:
const browser = await launchPlaywright();

try {
    const context = await browser.newContext({
    ...


As per Playwright docs:
Playwright allows creating "incognito" browser contexts with browser.newContext() method. "Incognito" browser contexts don't write any browsing data to disk.


ref: https://playwright.dev/docs/api/class-browsercontext

Why would it be not allowed in Crawlee if Playwright supports it?
* extends: [EventEmitter]
BrowserContext | Playwright
Was this page helpful?