Apify Discord Mirror

Updated 5 months ago

Playwright newContext() in incognito mode

At a glance

The community member is facing an issue where the newContext() function is not available in incognito mode when using the Playwright library in the Crawlee framework. The community member notes that the Playwright documentation states that the newContext() method can be used to create "incognito" browser contexts, but it is not working in the Crawlee framework. A comment suggests that the community member should try filing an issue, as the issue may be related to the use of a different launcher in the Crawlee framework.

Useful resources
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:
Plain Text
const browser = await launchPlaywright();

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


As per Playwright docs:
Plain Text
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?
L
1 comment
Hello, try filling an issue. I believe it is using differnet launcher
Add a reply
Sign up and join the conversation on Discord