cube-js/cube · critical
Something wrong with downloading Cube Store before running…
Error message
Something wrong with downloading Cube Store before running it.
What it means
Thrown by CubeStoreHandler.getBinary after attempting an automatic download of the Cube Store binary: even though downloadBinaryFromRelease() resolved, the expected executable at <cubestore>/downloaded/latest/bin/cubestored[.exe] still does not exist on disk. It is a sanity check indicating the download-or-extract step silently failed to produce the binary (or wrote it elsewhere).
Solutions
- Delete the stale downloaded directory (node_modules/@cubejs-backend/cubestool/downloaded or rust/cubestore/downloaded) and re-run install/start to force a clean re-download.
- Check filesystem permissions on the package directory; reinstall with a writable node_modules (avoid sudo/local permission mismatches; fix npm/yarn cache ownership).
- Disable/whitelist antivirus interception of cubestored and re-download.
- Check disk space and network/proxy settings; retry the install.
- As a workaround, build cubestored from source and place it at <package>/downloaded/latest/bin/cubestored, or run Cube Store separately via Docker instead of the auto-download path.
Example fix
// before rm -rf node_modules && yarn install # may reuse a corrupt cache entry // after cd node_modules/@cubejs-backend/cubestool rm -rf downloaded/latest ls -la downloaded/latest/bin/cubestored # verify binary exists after re-download
Defensive patterns
Strategy: fallback
Validate before calling
import fs from 'fs';
import { getBinaryPath } from '@cubejs-backend/cubestool/dist/process';
if (!fs.existsSync(getBinaryPath())) {
console.warn('cubestored missing; will trigger download — ensure writable node_modules and no AV interference.');
} Type guard
function binaryExists(path: string): path is string {
return fs.existsSync(path) && fs.statSync(path).size > 0;
} Try / catch
try {
await cubeStoreHandler.acquire();
} catch (e) {
if (/Something wrong with downloading Cube Store/.test(String(e))) {
await rmrf(path.join(cubestoolDir, 'downloaded', 'latest'));
await cubeStoreHandler.acquire(); // clean re-download
} else { throw e; }
} Prevention
- Delete the downloaded/ directory after failed installs before retrying
- Whitelist cubestored in antivirus/EDR so it is not quarantined post-extraction
- Ensure node_modules is writable and has sufficient disk space
- Prefer provisioning Cube Store via Docker in CI/containers instead of relying on auto-download
- Re-download cleanly rather than reusing partially extracted caches
When it happens
Trigger: acquire() -> getBinary(): fs.existsSync(getBinaryPath()) is false, downloadBinaryFromRelease() completes without throwing (e.g. download reported OK but extraction produced nothing, or a partially-failed download left no executable), and the post-download fs.existsSync check still fails.
Common situations: Antivirus/endpoint security quarantining cubestored.exe right after extraction; corrupted or interrupted tar.gz extraction into the download dir; disk-permission issues preventing write into the package's downloaded/ folder (read-only node_modules, CI caches); running in a container where the previous failed run left an empty downloaded/latest directory that confuses path resolution; network middleboxes returning HTML error pages that pass non-404 checks.
Related errors
- Stream init error
- There are no artifacts for Cube Store v
- CacheStore cannot be used on the worker node! cache_all was…
- CacheStore cannot be used on the worker node! cache_clear…
- CacheStore cannot be used on the worker node! cache_delete…
AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02).
Data as JSON: /api/errors/96356db49166949b.
Report an issue: GitHub.
Appendix: source
Thrown at rust/cubestore/js-wrapper/src/process.ts:128
// Promise that works as mutex, but can be rejected
protected cubeStoreStarting: Promise<ChildProcess> | null = null;
// Flag when release was requested, in this state, we skip restart on exit
protected releaseRequested: boolean = false;
public constructor(
protected readonly config: Readonly<CubeStoreHandlerOptions>
) {}
protected async getBinary() {
const pathToExecutable = getBinaryPath();
if (!fs.existsSync(pathToExecutable)) {
await downloadBinaryFromRelease();
if (!fs.existsSync(pathToExecutable)) {
throw new Error('Something wrong with downloading Cube Store before running it.');
}
}
return pathToExecutable;
}
public async acquire() {
if (this.cubeStore) {
return this.cubeStore;
}
if (this.cubeStoreStarting) {
return this.cubeStoreStarting;
}
const onExit = (code: number | null) => {
if (this.releaseRequested) {
return;View on GitHub (pinned to 7d981676b3)