{"record":{"id":"ad4b3e9268d74f21","repo":"apify/crawlee","slug":"puppeteercrawleroptions-launchcontext-proxyurl-is","errorCode":null,"errorMessage":"PuppeteerCrawlerOptions.launchContext.proxyUrl is not allowed in PuppeteerCrawler.Use PuppeteerCrawlerOptions.proxyConfiguration","messagePattern":"PuppeteerCrawlerOptions\\.launchContext\\.proxyUrl is not allowed in PuppeteerCrawler\\.Use PuppeteerCrawlerOptions\\.proxyConfiguration","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/puppeteer-crawler/src/internals/puppeteer-crawler.ts","lineNumber":230,"sourceCode":"    /**\n     * All `PuppeteerCrawler` parameters are passed via an options object.\n     */\n    constructor(\n        options: PuppeteerCrawlerOptions<ContextExtension, ExtendedContext, Routes, StatisticStateExtension> = {},\n    ) {\n        const parsedOptions = parseArgument(options, PuppeteerCrawler.optionsSchema, 'PuppeteerCrawlerOptions');\n\n        const {\n            launchContext,\n            headless,\n            configuration,\n            proxyConfiguration,\n            contextPipelineBuilder,\n            ...browserCrawlerOptions\n        } = parsedOptions;\n\n        if (launchContext.proxyUrl) {\n            throw new Error(\n                'PuppeteerCrawlerOptions.launchContext.proxyUrl is not allowed in PuppeteerCrawler.' +\n                    'Use PuppeteerCrawlerOptions.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 BrowserCrawlerOptions<\n                Page,\n                HTTPResponse,\n                PuppeteerCrawlingContext,","sourceCodeStart":212,"sourceCodeEnd":248,"githubUrl":"https://github.com/apify/crawlee/blob/dbe57fb09ca607ad59dcf998f3925ef9ac3bb26c/packages/puppeteer-crawler/src/internals/puppeteer-crawler.ts#L212-L248","documentation":"PuppeteerCrawler mirrors PlaywrightCrawler: per-crawler proxy must be set through proxyConfiguration (a ProxyConfiguration instance), not launchContext.proxyUrl. The constructor validates parsed options and throws this error for the legacy option so misconfiguration fails fast instead of silently running without a proxy.","triggerScenarios":"new PuppeteerCrawler({ launchContext: { proxyUrl: 'http://proxy:8080' } }).","commonSituations":"Upgrading from older Crawlee versions where launchContext.proxyUrl was supported; porting Playwright proxy snippets; outdated documentation or examples.","solutions":["Move the URL into proxyConfiguration: new PuppeteerCrawler({ proxyConfiguration: await ProxyConfiguration.create({ proxyUrls: ['http://proxy:8080'] }) }).","Keep other launch options (args, executablePath) in launchContext — only proxyUrl is rejected."],"exampleFix":"// before\nconst crawler = new PuppeteerCrawler({\n    launchContext: { proxyUrl: 'http://proxy.example.com:8080' },\n});\n// after\nconst crawler = new PuppeteerCrawler({\n    proxyConfiguration: await ProxyConfiguration.create({ proxyUrls: ['http://proxy.example.com:8080'] }),\n});","handlingStrategy":"validation","validationCode":"function assertNoLaunchProxy(options: PuppeteerCrawlerOptions) {\n    if ((options as any)?.launchContext?.proxyUrl) {\n        throw new Error('Use proxyConfiguration instead of launchContext.proxyUrl');\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Configure proxies only through proxyConfiguration.","Grep codebase for 'launchContext' after upgrading crawlee.","Rely on TypeScript types to catch invalid option usage at build time."],"tags":["configuration","proxy","puppeteer","crawlee"],"backgroundTag":"deprecated-option-rejected","analyzedSha":"dbe57fb09ca607ad59dcf998f3925ef9ac3bb26c","analyzedAt":"2026-08-30T22:22:28.328Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}