cube-js/cube · error

Only 'cubestore' or 'memory' are supported for cacheAndQueue

Error message

Only 'cubestore' or 'memory' are supported for cacheAndQueueDriver option, passed: ${cacheAndQueueDriver}

What it means

A startup guard in QueryOrchestrator's constructor: detectQueueAndCacheDriver returned a value outside the allowed set, so the requested cacheAndQueueDriver option is unsupported. It duplicates the same validation done in QueryCache/QueryQueue and fails before any queue is created. The input at fault is a cacheAndQueueDriver option string other than 'memory' or 'cubestore'.

Source

Thrown at packages/cubejs-query-orchestrator/src/orchestrator/QueryOrchestrator.ts:81

  protected queryCache: QueryCache;

  protected readonly preAggregations: PreAggregations;

  protected readonly rollupOnlyMode: boolean;

  protected readonly cacheAndQueueDriver: string;

  public constructor(
    protected readonly redisPrefix: string,
    protected readonly driverFactory: DriverFactoryByDataSource,
    protected readonly logger: LoggerFn,
    options: QueryOrchestratorOptions = {}
  ) {
    this.rollupOnlyMode = options.rollupOnlyMode;
    const cacheAndQueueDriver = detectQueueAndCacheDriver(options);

    if (!['memory', 'cubestore'].includes(cacheAndQueueDriver)) {
      throw new Error(
        `Only 'cubestore' or 'memory' are supported for cacheAndQueueDriver option, passed: ${cacheAndQueueDriver}`
      );
    }

    const { externalDriverFactory, continueWaitTimeout, skipExternalCacheAndQueue } = options;

    this.cacheAndQueueDriver = cacheAndQueueDriver;

    const cubeStoreDriverFactory = cacheAndQueueDriver === 'cubestore' ? async () => {
      if (externalDriverFactory) {
        const externalDriver = await externalDriverFactory();
        if (externalDriver instanceof CubeStoreDriver) {
          return externalDriver;
        }

        throw new Error('It`s not possible to use Cube Store as queue/cache driver without using it as external');
      }

View on GitHub (pinned to 7d981676b3)

Solutions

  1. Set CUBEJS_CACHE_AND_QUEUE_DRIVER (or the equivalent option) to 'memory' or 'cubestore'
  2. Check detectQueueAndCacheDriver() — an external driver type can be inferred as the cache/queue driver; use CubeStoreDriver or keep external store separate
  3. Correct typos in the driver option value
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/cubejs-query-orchestrator/src/orchestrator/QueryOrchestrator.ts:81 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02). Data as JSON: /api/errors/c77b6d8a30210817. Report an issue: GitHub.