{"record":{"id":"d175ef7ade7d8c35","repo":"tinyhumansai/openhuman","slug":"openhuman-extraction-failed-binary-not-found-a","errorCode":null,"errorMessage":"[openhuman] Extraction failed — binary not found after unpack.","messagePattern":"\\[openhuman\\] Extraction failed — binary not found after unpack\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/npm/install.js","lineNumber":157,"sourceCode":"      ],\n      { stdio: 'inherit', env: { ...process.env, TC_SRC: tmpTarball, TC_DEST: binDir } }\n    );\n    const extracted = path.join(binDir, 'openhuman-core.exe');\n    if (fs.existsSync(extracted)) fs.renameSync(extracted, binDest);\n  } else {\n    execFileSync('tar', ['-xzf', tmpTarball, '-C', binDir], { stdio: 'inherit' });\n    const extracted = path.join(binDir, 'openhuman-core');\n    if (fs.existsSync(extracted)) {\n      fs.renameSync(extracted, binDest);\n      fs.chmodSync(binDest, 0o755);\n    }\n  }\n\n  // Clean up archive\n  fs.rmSync(tmpTarball, { force: true });\n\n  if (!fs.existsSync(binDest)) {\n    throw new Error('[openhuman] Extraction failed — binary not found after unpack.');\n  }\n\n  console.log(`[openhuman] Installed at ${binDest}`);\n}\n\nmain().catch((err) => {\n  console.error('\\n[openhuman] Installation failed:', err.message);\n  console.error('You can file a bug at https://github.com/tinyhumansai/openhuman/issues');\n  process.exit(1);\n});\n","sourceCodeStart":139,"sourceCodeEnd":168,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/packages/npm/install.js#L139-L168","documentation":"After unpacking, the installer expects the binary at binDest (binDir/openhuman-core renamed into place on unix, the expanded path on Windows); if extraction nominally succeeded but binDest still does not exist, the archive layout did not match expectations and install fails.","triggerScenarios":"The tarball unpacks a different binary name or a nested directory instead of ./openhuman-core at the archive root (release layout change, or a wrong-target artifact that still extracts); Windows PowerShell expand producing an unexpected path; a rename that failed silently.","commonSituations":"Cached old tarball paired with a newer installer; release published with a nested folder like openhuman-core-vX/openhuman-core.","solutions":["Clear the temp/cache directory and re-run install so a fresh, matching tarball extracts","Inspect what actually unpacked (list binDir) and check the archive layout with tar -tzf on the cached tarball","Verify the downloaded target triple matches your machine and check release notes for layout changes; file an issue with the tar -tzf output"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Inspect the cached archive layout before extraction:\n// tar -tzf openhuman-core-<target>.tar.gz  must list ./openhuman-core at the root\nconst { execFileSync } = require('child_process');\nconst listing = execFileSync('tar', ['-tzf', tmpTarball]).toString();\nif (!listing.split('\\n').some(l => l.replace(/^\\./, '') === '/openhuman-core')) {\n  throw new Error('unexpected archive layout');\n}","typeGuard":null,"tryCatchPattern":"try {\n  await install();\n} catch (e) {\n  if (String(e.message).includes('binary not found after unpack')) {\n    // stale/corrupt artifact: clear cache so the next install fetches a fresh one\n    await clearInstallCache();\n    return;\n  }\n  throw e;\n}","preventionTips":["Clear the installer temp/cache dir after a failed install so the next run re-downloads","Check tar -tzf output when pinning unusual versions to catch layout changes","Keep installer script and published release in the same version — never mix"],"tags":["npm","install","extraction","packaging"],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}