{"record":{"id":"4d41f13bcd28788b","repo":"apify/crawlee","slug":"crawlername-names-map-name-name","errorCode":null,"errorMessage":"${crawlerName}: ${names.map((name) => `\\`${name}\\``).join(', ')} cannot be combined with `browserPool`, ${names.length > 1 ? 'they configure' : 'it configures'} the browser pool the crawler would build for itself. Configure the pool you pass in instead.","messagePattern":"(.+?): (.+?)\\\\``\\)\\.join\\(', '\\)\\} cannot be combined with `browserPool`, (.+?) the browser pool the crawler would build for itself\\. Configure the pool you pass in instead\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/browser-crawler/src/internals/browser-crawler.ts","lineNumber":73,"sourceCode":" * The type of a browser pool the crawler builds (and therefore owns) for itself. It's an {@apilink IBrowserPool} that\n * additionally exposes `destroy()` — the crawler only ever tears down pools it created, which is why {@apilink IBrowserPool}\n * itself intentionally omits `destroy`.\n */\nexport type OwnedBrowserPool<Page> = IBrowserPool<Page> & { destroy: () => Promise<void> };\n\n/**\n * Rejects options that exist only to configure the browser pool the crawler would have built for itself.\n * Accepting them alongside a pre-built `browserPool` and quietly ignoring them is how `browserPoolOptions` grew\n * into a second, half-working way of configuring the same pool.\n */\nexport function assertBrowserPoolNotConfigured(crawlerName: string, ignoredOptions: Dictionary): void {\n    const names = Object.keys(ignoredOptions).filter((name) => ignoredOptions[name] !== undefined);\n\n    if (names.length === 0) {\n        return;\n    }\n\n    throw new Error(\n        `${crawlerName}: ${names.map((name) => `\\`${name}\\``).join(', ')} cannot be combined with \\`browserPool\\`, ` +\n            `${names.length > 1 ? 'they configure' : 'it configures'} the browser pool the crawler would build for ` +\n            'itself. Configure the pool you pass in instead.',\n    );\n}\n\ntype ContextDifference<T, U> = Omit<U, keyof T> & Partial<U>;\n\nexport interface BrowserCrawlingContext<\n    Page extends CommonPage = CommonPage,\n    Response extends BaseResponse = BaseResponse,\n    UserData extends Dictionary = any, // with default to Dictionary we cant use a typed router in untyped crawler\n    GoToOptions extends Dictionary = Dictionary,\n> extends CrawlingContext<UserData> {\n    /**\n     * The browser page object where the web page is loaded and rendered.\n     */\n    page: Page;","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/apify/crawlee/blob/dbe57fb09ca607ad59dcf998f3925ef9ac3bb26c/packages/browser-crawler/src/internals/browser-crawler.ts#L55-L91","documentation":"Browser-based crawlers (CheerioCrawler aside) can accept an externally constructed browserPool. Options that configure the internally built pool (e.g. launchContext, browserPoolOptions, proxyConfiguration) are mutually exclusive with a user-supplied browserPool. assertBrowserPoolNotConfigured throws when both are provided.","triggerScenarios":"Constructing e.g. new PuppeteerCrawler({ browserPool, launchContext: {...} }) or { browserPool, browserPoolOptions } / { browserPool, proxyConfiguration } - any pool-configuring option set alongside browserPool.","commonSituations":"Migrating from default construction to dependency-injected pools while leaving old launch/proxy options in place; copy-pasting crawler configs and adding browserPool.","solutions":["Remove the conflicting options (launchContext, browserPoolOptions, proxyConfiguration, etc.) and configure the browserPool instance directly instead","Or drop the browserPool argument and let the crawler build its own pool from those options","Configure the passed-in pool before handing it to the crawler (hooks, plugins, proxies on the pool itself)"],"exampleFix":"// before\nconst crawler = new PuppeteerCrawler({ browserPool: myPool, launchContext: { launchOptions: { headless: true } } });\n// after\nmyPool.hooks.onBrowserLaunched?.(...); // configure myPool itself\nconst crawler = new PuppeteerCrawler({ browserPool: myPool });","handlingStrategy":"validation","validationCode":"const poolOptions = ['launchContext','browserPoolOptions','proxyConfiguration'].filter(k => k in options && options[k] !== undefined);\nif ('browserPool' in options && poolOptions.length) throw new Error(`Options ${poolOptions} conflict with browserPool`);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["When passing browserPool, configure that pool instance directly","Strip pool-configuring options from shared config objects when injecting a pool"],"tags":["configuration","browser-pool","mutually-exclusive-options"],"backgroundTag":"conflicting-constructor-options","analyzedSha":"dbe57fb09ca607ad59dcf998f3925ef9ac3bb26c","analyzedAt":"2026-08-30T22:22:28.328Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}