cube-js/cube · warning
tar skipped an entry while extracting (${code}): ${message}
Error message
tar skipped an entry while extracting (${code}): ${message} What it means
When Cube extracts a downloaded archive (e.g. a driver/native binary via tar), non-fatal tar warnings are logged here with the format 'tar skipped an entry while extracting (<code>): <message>'. TAR_ENTRY_ERROR codes are escalated to internal exceptions; other codes are just printed.
Source
Thrown at packages/cubejs-backend-shared/src/http-utils.ts:105
* `TAR_ENTRY_ERROR` is not only the path-rejection code — measured, tar reports
* per-entry write failures through it too (a read-only target raises it once per
* entry, same as a `..` name does). Both belong on this side of the split: a
* half-extracted install is a real failure, and escalating it is what the opt-in
* `exit` setting asks for. Everything else is logged and ignored, as tar treats
* it.
*/
const tarOptions = {
preserveOwner: false,
onwarn: (code: string, message: string) => {
const warning = `tar skipped an entry while extracting (${code}): ${message}`;
if (code === 'TAR_ENTRY_ERROR') {
internalExceptions(new Error(warning));
return;
}
console.warn(warning);
},
};
/**
* Extract a downloaded archive into `cwd`, which is created if missing.
*
* Dispatches on magic bytes, not the filename, because there is no filename to
* dispatch on: `streamWithProgress` saves downloads as
* `crypto.randomBytes(16).toString('hex')`, with no extension.
*
* Handles gzip (`.tar.gz` / `.tgz`), uncompressed tar and zip. Two gaps are
* deliberate and both throw a named error rather than failing obscurely: bzip2,
* and pre-POSIX v7 tars, which carry no `ustar` magic at offset 257 to detect them
* by.
*
* Neither backend writes outside `cwd`: `tar` strips a leading `/` on extraction and
* drops entries containing `..`, and `extract-zip` rejects entries that resolve outside
* the target.View on GitHub (pinned to 7d981676b3)
Solutions
- Check the logged <code>/<message> to see which entry was skipped and why
- Re-download or clear the cached archive so it is extracted fresh
- Check disk space and permissions on the target directory
- If functionality breaks because of the skipped entry, report it — otherwise this warning can be ignored
Defensive patterns
Strategy: retry
Validate before calling
// after download, before extract
const stat = fs.statSync(archivePath);
if (stat.size === 0) throw new Error('Downloaded archive is empty; re-download'); Try / catch
try {
extractTar(archive, { cwd: targetDir });
} catch (e) {
// e.g. TAR_ENTRY_ERROR surfaced as internal exception
console.error('Extraction failed:', e);
fs.rmSync(targetDir, { recursive: true, force: true });
// retry with a fresh download
} Prevention
- Verify checksums/sizes of downloaded archives
- Ensure target filesystem supports all entry types
- Retry extraction once on failure with a clean directory
When it happens
Trigger: A tar warning callback fires during extractTar with a code other than TAR_ENTRY_ERROR, e.g. a skipped entry, unsupported file type, or duplicate entry while unpacking a downloaded artifact.
Common situations: Corrupted or partially downloaded archives; filesystems not supporting certain entries (symlinks, special files); permissions issues causing entries to be skipped.
Related errors
- tar skipped an entry (${code}): ${message}
- Unable to detect archive format from its contents. Supported
- Unable to find package.json file in current working director
- unexpected response ${response.statusText}
- Unable to find ${name} from path: "${value}"
AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02).
Data as JSON: /api/errors/742fa7094430277d.
Report an issue: GitHub.