cube-js/cube · error
Empty response on QUEUE ${command}
Error message
Empty response on QUEUE ${command} What it means
CubeStoreQueueDriver.addToQueue expected the Cube Store QUEUE command to return at least one row; an empty rows array means the server responded without the queue entry data. The driver treats this as a protocol violation because a successful QUEUE call must always return the (possibly fast-tracked) queue status row. It throws a plain Error with the command name embedded for debugging.
Source
Thrown at packages/cubejs-cubestore-driver/src/CubeStoreQueueDriver.ts:164
const fastTrack = await this.useFastTrack(priority);
if (fastTrack) {
values.push(this.options.concurrency);
}
const command = fastTrack ? 'ADD_AND_RETRIEVE' : 'ADD';
const rows = await this.driver.query<CubeStoreRetrieveResponse & { added: string }>(`QUEUE ${command}${modifiers}${fastTrack ? ' ?' : ''}`, values);
if (rows && rows.length) {
return [
rows[0].added === 'true' ? 1 : 0,
rows[0].id ? parseInt(rows[0].id, 10) : null,
parseInt(rows[0].pending, 10),
addedToQueueTime,
// An item which already existed is never added twice, but it still can be retrieved
fastTrack ? this.decodeRetrievedFromRow(rows[0], 'addToQueue') : null,
];
}
throw new Error(`Empty response on QUEUE ${command}`);
}
public async getQueryAndRemove(hash: QueryKeyHash, queueId: QueueId | null): Promise<[QueryDef]> {
return [await this.cancelQuery(hash, queueId)];
}
public async cancelQuery(hash: QueryKeyHash, queueId: QueueId | null): Promise<QueryDef | null> {
const rows = await this.driver.query('QUEUE CANCEL ?', [
// queryKeyHash as compatibility fallback
queueId || this.prefixKey(hash),
]);
if (rows && rows.length) {
return this.decodeQueryDefFromRow(rows[0], 'cancelQuery');
}
return null;
}
View on GitHub (pinned to 7d981676b3)
Solutions
- Verify the Cube Store server version matches what the driver expects and upgrade both together
- Inspect Cube Store server logs at the time of the QUEUE command for internal errors
- Retry the query; if reproducible, capture the command and open an issue with Cube/cube-store logs
- Check for proxies/L4 load balancers between Cube and Cube Store that may truncate responses
Example fix
// before: driver throws on empty response
throw new Error(`Empty response on QUEUE ${command}`);
// after: caller-side guard with retry
try {
await queueDriver.addToQueue(queryKey, queryDef, true);
} catch (e) {
if (/Empty response on QUEUE/.test(e.message)) return retryAddToQueue();
throw e;
} Defensive patterns
Strategy: retry
Validate before calling
// no pre-call validation available (server-side response); wrap the call
if (!queueDriver) throw new Error('queue driver not initialized'); Type guard
const hasRows = (rows) => Array.isArray(rows) && rows.length > 0;
Try / catch
try {
await queueDriver.addToQueue(key, queryDef, true);
} catch (e) {
if (e.message.startsWith('Empty response on QUEUE')) {
return retryWithBackoff(() => queueDriver.addToQueue(key, queryDef, true), 3);
}
throw e;
} Prevention
- Keep Cube Store and cubejs-cubestore-driver versions aligned
- Monitor Cube Store server logs for internal queue errors
- Avoid proxies/LB between Cube and Cube Store that can truncate frames
- Add alerting on this error to catch Cube Store regressions early
When it happens
Trigger: Calling addToQueue when Cube Store returns an empty result set for the QUEUE command — e.g. a Cube Store bug/regression, a corrupted or incompatible Cube Store version, or an intermediary (proxy) dropping the response rows.
Common situations: Running a mismatched Cube Store server version against a newer driver; network/proxy layers truncating flatbuffer responses; internal Cube Store failures returning empty payloads during queue operations.
Related errors
- Field payload is empty, incorrect response for ${method} met
- Cube Store missed message id: ${httpMessage.messageId()}
- CacheStore cannot be used on the worker node! queue_all was
- CacheStore cannot be used on the worker node! queue_results_
- CacheStore cannot be used on the worker node! queue_add was
AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02).
Data as JSON: /api/errors/4742847c0b5ded3a.
Report an issue: GitHub.