{"record":{"id":"08e676e440c07fef","repo":"apify/crawlee","slug":"experimental-containers-are-only-available-with-pl","errorCode":null,"errorMessage":"Experimental containers are only available with Playwright","messagePattern":"Experimental containers are only available with Playwright","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/browser-pool/src/puppeteer/puppeteer-plugin.ts","lineNumber":70,"sourceCode":"        } catch {\n            // ignore\n        }\n\n        const { useIncognitoPages, proxyUrl, ignoreProxyCertificate } = launchContext;\n\n        let browser: PuppeteerTypes.Browser;\n\n        if (this.remoteConnection) {\n            browser = await this.connectToRemoteBrowser(launchContext, async (url) => {\n                const connectOptions = this.remoteConnectionParameters?.connectOptions ?? {};\n                this.log.info('Connecting to remote browser via connect (CDP).');\n                return this.library.connect({ ...connectOptions, browserWSEndpoint: url });\n            });\n        } else {\n            const { launchOptions, userDataDir, experimentalContainers } = launchContext;\n\n            if (experimentalContainers) {\n                throw new Error('Experimental containers are only available with Playwright');\n            }\n\n            launchOptions!.userDataDir = launchOptions!.userDataDir ?? userDataDir;\n\n            if (launchOptions!.headless === false) {\n                if (Array.isArray(launchOptions!.args)) {\n                    launchOptions!.args.push('--disable-site-isolation-trials');\n                } else {\n                    launchOptions!.args = ['--disable-site-isolation-trials'];\n                }\n            }\n\n            if (launchOptions!.headless === true && oldPuppeteerVersion) {\n                launchOptions!.headless = 'new' as any;\n            }\n\n            {\n                const [anonymizedProxyUrl, close] = await anonymizeProxySugar(proxyUrl, undefined, undefined, {","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/apify/crawlee/blob/dbe57fb09ca607ad59dcf998f3925ef9ac3bb26c/packages/browser-pool/src/puppeteer/puppeteer-plugin.ts#L52-L88","documentation":"Experimental containers is a Playwright-specific LaunchContext feature. When launching with Puppeteer, the plugin checks for it and refuses to launch if enabled, because Puppeteer has no equivalent container support.","triggerScenarios":"Creating PuppeteerPlugin with a LaunchContext that has experimentalContainers: true, then starting the pool (plugin _launch runs).","commonSituations":"Sharing one LaunchContext/config object between Playwright and Puppeteer setups; toggling experimentalContainers on for testing and switching engines; copy-pasted Playwright config applied to Puppeteer.","solutions":["Set experimentalContainers: false (or remove it) from the LaunchContext used with PuppeteerPlugin.","Use a separate LaunchContext per engine: enable experimentalContainers only in the Playwright LaunchContext.","Switch to PlaywrightPlugin if browser containers are a hard requirement."],"exampleFix":"// before\nnew PuppeteerPlugin(new LaunchContext({ puppeteer, experimentalContainers: true }));\n// after\nnew PuppeteerPlugin(new LaunchContext({ puppeteer })); // containers are Playwright-only\n// or use PlaywrightPlugin to keep experimentalContainers: true","handlingStrategy":"validation","validationCode":"const lc = new LaunchContext({ puppeteer, experimentalContainers: false });\nif (usingPuppeteer && lc.experimentalContainers) {\n  throw new Error('experimentalContainers requires PlaywrightPlugin');\n}","typeGuard":"function containersSupported(plugin: 'puppeteer' | 'playwright', lc: { experimentalContainers?: boolean }): boolean {\n  return plugin === 'playwright' || !lc.experimentalContainers;\n}","tryCatchPattern":"try {\n  await pool.init();\n} catch (err) {\n  if (err instanceof Error && err.message.includes('Experimental containers')) {\n    // rebuild plugin without experimentalContainers or switch to PlaywrightPlugin\n  } throw err;\n}","preventionTips":["Never share a single LaunchContext across Puppeteer and Playwright plugins.","Treat experimentalContainers as Playwright-only in config schema/docs.","Validate engine/feature combinations at config load time, not at pool init."],"tags":["browser-pool","puppeteer","playwright","unsupported-feature"],"backgroundTag":"feature-not-supported-by-engine","analyzedSha":"dbe57fb09ca607ad59dcf998f3925ef9ac3bb26c","analyzedAt":"2026-08-30T22:22:28.328Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}