apify/crawlee · error · Error

The `requestManager` option cannot be used in conjunction wi

Error message

The `requestManager` option cannot be used in conjunction with `requestList` and/or `requestQueue`

What it means

BasicCrawler expects exactly one request source. The newer `requestManager` option and the legacy `requestList`/`requestQueue` options are mutually exclusive because the constructor would not know which provider owns the crawl. Supplying both aborts construction immediately.

Source

Thrown at packages/basic-crawler/src/internals/basic-crawler.ts:1088

        }

        try {
            serviceLocatorScope.enterScope();
            this.#contextPipelineOptions = {
                contextPipelineBuilder: parsedOptions.contextPipelineBuilder,
                extendContext: parsedOptions.extendContext,
            };

            this.#log = serviceLocator.getLogger().child({ prefix: this.constructor.name });

            // Initialize the Configuration instance to avoid lazy loading in the components
            serviceLocator.getConfiguration();

            const instanceIndex = BasicCrawler.instanceCount++;
            this.#identity = { instanceIndex, hasExplicitId: id !== undefined, id: id ?? String(instanceIndex) };

            if (requestManager !== undefined && (requestList !== undefined || requestQueue !== undefined)) {
                throw new Error(
                    'The `requestManager` option cannot be used in conjunction with `requestList` and/or `requestQueue`',
                );
            }

            const suppliedManager = requestManager ?? requestQueue;

            // Offered before building a pacer of our own: anything that paces takes the floor - through any
            // number of wrappers, since they all forward - so no domain ends up with two clocks.
            const floorTaken =
                sameDomainDelaySecs > 0 &&
                (suppliedManager?.recordPacingSignal({
                    reason: 'minIntervalEverywhere',
                    intervalMs: sameDomainDelaySecs * 1000,
                    // What `sameDomainDelaySecs` has always meant: one clock per site, subdomains included.
                    scope: 'registrableDomain',
                }) ??
                    false);

View on GitHub (pinned to dbe57fb09c)

Solutions

  1. Remove `requestList`/`requestQueue` and keep only `requestManager`.
  2. Or remove `requestManager` and keep only the legacy `requestList`/`requestQueue` option.
  3. Wrap a legacy RequestList/RequestQueue in a request manager if you need the new API.

Example fix

// before
const crawler = new BasicCrawler({ requestManager: manager, requestQueue: queue });
// after
const crawler = new BasicCrawler({ requestManager: manager });
Defensive patterns

Strategy: validation

Validate before calling

const sources = [opts.requestManager, opts.requestList, opts.requestQueue].filter(Boolean);
if (sources.length > 1) {
  throw new Error('Provide only one of requestManager, requestList, requestQueue.');
}

Prevention

When it happens

Trigger: Calling `new BasicCrawler({ requestManager, requestQueue })` or `new BasicCrawler({ requestManager, requestList })` — any combination of requestManager with requestList and/or requestQueue.

Common situations: Refactoring old code from requestQueue to the unified requestManager while keeping the original option; merging two crawler configs into one.

Related errors


AI-assisted analysis of apify/crawlee@dbe57fb09c (2026-08-30). Data as JSON: /api/errors/a7f6fc1c10b5abfc. Report an issue: GitHub.