earendil-works/pi · error · Error
Failed to extract
Error message
Failed to extract ${assetName}: ${failures.join("; ")} What it means
Thrown by extractZipArchive when all extraction strategies for a downloaded .zip asset fail: PowerShell Expand-Archive on Windows, then unzip and tar elsewhere. The message aggregates each attempted command and its failure.
Solutions
- Review the aggregated failures for the root cause (corrupt archive, missing unzip/tar, PowerShell execution policy)
- Install unzip or ensure PowerShell expansion is permitted
- Retry the tool download; truncated archives fail extraction
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at packages/coding-agent/src/utils/tools-manager.ts:238 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of earendil-works/pi@4af9d21d3b (2026-08-24).
Data as JSON: /api/errors/ea847e93c2bc75ec.
Report an issue: GitHub.
Appendix: source
Thrown at packages/coding-agent/src/utils/tools-manager.ts:238
"Bypass",
"-Command",
script,
archivePath,
extractDir,
]);
if (!powershellFailure) return;
failures.push(powershellFailure);
} else {
const unzipFailure = runExtractionCommand("unzip", ["-q", archivePath, "-d", extractDir]);
if (!unzipFailure) return;
failures.push(unzipFailure);
const tarFailure = runExtractionCommand("tar", ["xf", archivePath, "-C", extractDir]);
if (!tarFailure) return;
failures.push(tarFailure);
}
throw new Error(`Failed to extract ${assetName}: ${failures.join("; ")}`);
}
// Download and install a tool
async function downloadTool(tool: "fd" | "rg"): Promise<string> {
const config = TOOLS[tool];
if (!config) throw new Error(`Unknown tool: ${tool}`);
const plat = platform();
const architecture = arch();
// Get latest version
let version = await getLatestVersion(config.repo);
if (tool === "fd" && plat === "darwin" && architecture === "x64") {
version = "10.3.0";
}
// Get asset name for this platform
const assetName = config.getAssetName(version, plat, architecture);View on GitHub (pinned to 4af9d21d3b)