cube-js/cube · error
Error during upload of ${fileName} create table: ${createTab
Error message
Error during upload of ${fileName} create table: ${createTableSqlWithoutLocation}: ${error.error} What it means
During stream import, temp files are POSTed to Cube Store's /upload-temp-file endpoint. If the server responds with non-200, the driver reads the JSON error body and throws this message including the file name and the CREATE TABLE SQL, surfacing the Cube Store-side error.
Source
Thrown at packages/cubejs-cubestore-driver/src/CubeStoreDriver.ts:392
if (!currentFileStream) {
const writer = csvWriter({ headers: columns.map(c => c.name) });
const tempFile = tempy.file();
tempFiles.push(tempFile);
const gzipStream = createGzip();
pipelinePromises.push(new Promise((resolve, reject) => {
pipeline(writer, gzipStream, createWriteStream(tempFile), (err) => {
if (err) {
reject(err);
}
const fileName = `${table}-${fileCounter++}.csv.gz`;
filePromises.push(fetch(`${baseUrl.replace(/^ws/, 'http')}/upload-temp-file?name=${fileName}`, {
method: 'POST',
body: createReadStream(tempFile),
}).then(async res => {
if (res.status !== 200) {
const error = await res.json();
throw new Error(`Error during upload of ${fileName} create table: ${createTableSqlWithoutLocation}: ${error.error}`);
}
return fileName;
}));
resolve(null);
});
currentFileStream = { stream: writer, tempFile };
}));
}
if (!currentFileStream) {
throw new Error('Stream init error');
}
return currentFileStream;
};
let rowCount = 0;
const endStream = (chunk, encoding, callback) => {View on GitHub (pinned to 7d981676b3)
Solutions
- Check Cube Store logs for the underlying `error` in the response body.
- Verify CUBEJS_CUBESTORE_HOST/PORT and that Cube Store is running/reachable.
- Restart the pre-aggregation build and confirm disk space on the Cube Store host.
- Align Cube Store and cube.js versions (cubestore upgrade).
Defensive patterns
Strategy: retry
Validate before calling
// check Cube Store reachability before heavy builds
const res = await fetch(`http://${cubestoreHost}:${cubestorePort}/v1/status`);
if (!res.ok) throw new Error('Cube Store is not reachable before pre-aggregation upload'); Try / catch
try {
await driver.uploadTable(table, columns, tableData);
} catch (e) {
if (e.message.startsWith('Error during upload of')) {
console.error('Cube Store rejected temp-file upload; check Cube Store logs and disk space');
await retryWithBackoff(() => driver.uploadTable(table, columns, tableData), 3);
}
throw e;
} Prevention
- Monitor Cube Store process health and disk space.
- Verify CUBEJS_CUBESTORE_HOST/PORT and auth token settings.
- Keep Cube Store and cube.js versions in sync.
- Add retries with backoff for transient network failures during builds.
When it happens
Trigger: POST to ${baseUrl}/upload-temp-file?name=... returns status != 200 — Cube Store unreachable/misconfigured, disk full on Cube Store side, rejected file name, or HTTP/WS proxy misrouting (baseUrl ws->http rewrite failing).
Common situations: Cube Store process down or restarted during pre-aggregation build; wrong CUBEJS_CUBESTORE_HOST/PORT; Cube Store version mismatch rejecting the request; network/firewall issues; auth token mismatch between cube.js and Cube Store.
Related errors
- There are no artifacts for Cube Store v${version}. Most prob
- connect timeout
- HTTP error! status: ${response.status}
- unexpected response ${response.statusText}
- ${this.constructor} driver supports only rows upload
AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02).
Data as JSON: /api/errors/2949e6583b560f80.
Report an issue: GitHub.