{"record":{"id":"ba038819d2898f23","repo":"apify/crawlee","slug":"playwrightcrawleroptions-launchcontext-proxyurl-is","errorCode":null,"errorMessage":"PlaywrightCrawlerOptions.launchContext.proxyUrl is not allowed in PlaywrightCrawler.Use PlaywrightCrawlerOptions.proxyConfiguration","messagePattern":"PlaywrightCrawlerOptions\\.launchContext\\.proxyUrl is not allowed in PlaywrightCrawler\\.Use PlaywrightCrawlerOptions\\.proxyConfiguration","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/playwright-crawler/src/internals/playwright-crawler.ts","lineNumber":246,"sourceCode":"        launcher: schemas.anyObject.optional(),\n    };\n\n    /** @internal */\n    protected static override optionsSchema = z.strictObject(PlaywrightCrawler.optionsShape);\n\n    /**\n     * All `PlaywrightCrawler` parameters are passed via an options object.\n     */\n    constructor(\n        options: PlaywrightCrawlerOptions<ContextExtension, ExtendedContext, Routes, StatisticStateExtension> = {},\n    ) {\n        const parsedOptions = parseArgument(options, PlaywrightCrawler.optionsSchema, 'PlaywrightCrawlerOptions');\n\n        const { launchContext, headless, configuration, contextPipelineBuilder, ...browserCrawlerOptions } =\n            parsedOptions;\n\n        if (launchContext.proxyUrl) {\n            throw new Error(\n                'PlaywrightCrawlerOptions.launchContext.proxyUrl is not allowed in PlaywrightCrawler.' +\n                    'Use PlaywrightCrawlerOptions.proxyConfiguration',\n            );\n        }\n\n        if (options.browserPool) {\n            // The raw options, not the parsed ones: `launchContext` has a default, so by now it is always set.\n            assertBrowserPoolNotConfigured(new.target.name, {\n                launchContext: options.launchContext,\n                headless: options.headless,\n            });\n        }\n\n        super({\n            ...(browserCrawlerOptions as unknown as PlaywrightCrawlerOptions<\n                ContextExtension,\n                ExtendedContext,\n                Routes,","sourceCodeStart":228,"sourceCodeEnd":264,"githubUrl":"https://github.com/apify/crawlee/blob/dbe57fb09ca607ad59dcf998f3925ef9ac3bb26c/packages/playwright-crawler/src/internals/playwright-crawler.ts#L228-L264","documentation":"PlaywrightCrawler removed support for setting a per-crawler proxy via launchContext.proxyUrl; proxying must go through a ProxyConfiguration passed as proxyConfiguration, which supports rotation and session binding. The constructor eagerly rejects the legacy option so users don't silently get no proxy.","triggerScenarios":"Constructing new PlaywrightCrawler({ launchContext: { proxyUrl: 'http://proxy:8080' } }) in playwright-crawler.","commonSituations":"Migrating code from older Crawlee versions where launchContext.proxyUrl worked; following outdated tutorials or ChatGPT-generated snippets; mixing proxy config between launch options and crawler options.","solutions":["Replace launchContext.proxyUrl with the proxyConfiguration option: new PlaywrightCrawler({ proxyConfiguration: await ProxyConfiguration.create({ proxyUrls: [...] }) }).","For per-launch proxies, use ProxyConfiguration with rotation or newUrl/session handling instead of the launchContext field."],"exampleFix":"// before\nconst crawler = new PlaywrightCrawler({\n    launchContext: { proxyUrl: 'http://proxy.example.com:8080' },\n});\n// after\nconst proxyConfiguration = await ProxyConfiguration.create({ proxyUrls: ['http://proxy.example.com:8080'] });\nconst crawler = new PlaywrightCrawler({ proxyConfiguration });","handlingStrategy":"validation","validationCode":"function assertNoLaunchProxy(options: PlaywrightCrawlerOptions) {\n    if ((options as any)?.launchContext?.proxyUrl) {\n        throw new Error('Use proxyConfiguration instead of launchContext.proxyUrl');\n    }\n}\nassertNoLaunchProxy(options);\nconst crawler = new PlaywrightCrawler(options);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always proxy crawlers via proxyConfiguration / ProxyConfiguration.create.","Run TypeScript typechecking — the schema rejects unknown/legacy option combinations.","Search configs for 'proxyUrl' when migrating from older crawlee versions."],"tags":["configuration","proxy","playwright","crawlee"],"backgroundTag":"deprecated-option-rejected","analyzedSha":"dbe57fb09ca607ad59dcf998f3925ef9ac3bb26c","analyzedAt":"2026-08-30T22:22:28.328Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}