flat-fuchsia
flat-fuchsia2y ago

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({
...
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.
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?
BrowserContext | Playwright
* extends: [EventEmitter]
1 Reply
Lukas Krivka
Lukas Krivka2y ago
Hello, try filling an issue. I believe it is using differnet launcher

Did you find this page helpful?