{"record":{"id":"d95c958f744fed55","repo":"aaif-goose/goose","slug":"no-goose-binary-available-for-key-set-goose-bi","errorCode":null,"errorMessage":"No goose binary available for ${key}. Set GOOSE_BINARY to the path of a goose binary.","messagePattern":"No goose binary available for (.+?)\\. Set GOOSE_BINARY to the path of a goose binary\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"ui/sdk/src/resolve-binary.ts","lineNumber":28,"sourceCode":"};\n\n/**\n * Resolves the path to the goose binary.\n *\n * Resolution order:\n *   1. `GOOSE_BINARY` environment variable (explicit override)\n *   2. Platform-specific `@aaif/goose-binary-*` optional dependency\n *\n * @throws if no binary can be found\n */\nexport function resolveGooseBinary(): string {\n  const envBinary = process.env.GOOSE_BINARY;\n  if (envBinary) return envBinary;\n\n  const key = `${process.platform}-${process.arch}`;\n  const pkg = PLATFORMS[key];\n  if (!pkg) {\n    throw new Error(\n      `No goose binary available for ${key}. Set GOOSE_BINARY to the path of a goose binary.`,\n    );\n  }\n\n  try {\n    const require = createRequire(import.meta.url);\n    const pkgDir = dirname(require.resolve(`${pkg}/package.json`));\n    const binName = process.platform === \"win32\" ? \"goose.exe\" : \"goose\";\n    return join(pkgDir, \"bin\", binName);\n  } catch {\n    throw new Error(\n      `goose binary package ${pkg} is not installed. Set GOOSE_BINARY or install the native package.`,\n    );\n  }\n}\n","sourceCodeStart":10,"sourceCodeEnd":44,"githubUrl":"https://github.com/aaif-goose/goose/blob/3810898a7447ec3299be72e223d3570a7aabf0ab/ui/sdk/src/resolve-binary.ts#L10-L44","documentation":"resolveGooseBinary() in the @aaif/goose SDK first honors GOOSE_BINARY, then looks up a platform key `${process.platform}-${process.arch}` in the PLATFORMS map to find the optional @aaif/goose-binary-* dependency. This error means the key itself is unknown — the SDK has no binary package name for this OS/architecture combination at all (e.g. linux-arm64, freebsd-x64), so installation of a native package cannot even be attempted.","triggerScenarios":"Importing @aaif/goose (or calling resolveGooseBinary()) on a machine whose `${platform}-${arch}` key (e.g. linux-arm64, freebsd-x64) has no entry in PLATFORMS; GOOSE_BINARY unset so the env override is skipped and the map lookup is the last resort.","commonSituations":"Running the SDK on Linux ARM servers/boards, BSD, or exotic libc variants; Docker images with unusual arch mappings; CI matrix jobs that include unsupported targets.","solutions":["Set GOOSE_BINARY to an absolute path of a goose binary you built or downloaded for this platform — it short-circuits before the PLATFORMS lookup","Verify the exact key in the message (e.g. 'linux-arm64') against the SDK's PLATFORMS table; if missing, that platform is genuinely unsupported in this version","Upgrade the SDK — newer releases add platform entries","Run under Rosetta/qemu-user on a supported arch as a stopgap"],"exampleFix":"# before\nnode -e \"require('@aaif/goose')\" # throws: No goose binary available for linux-arm64\n# after\ngo build --release # or download goose for this platform\nexport GOOSE_BINARY=/usr/local/bin/goose\nnode -e \"require('@aaif/goose')\"","handlingStrategy":"validation","validationCode":"import { PLATFORMS } from '@aaif/goose'; // if exported; otherwise check key\nconst key = `${process.platform}-${process.arch}`;\nif (!process.env.GOOSE_BINARY && !PLATFORMS[key]) {\n  throw new Error(`Unsupported platform ${key}; set GOOSE_BINARY`);\n}","typeGuard":"const isSupportedPlatform = (): boolean =>\n  Boolean(process.env.GOOSE_BINARY) ||\n  `${process.platform}-${process.arch}` in PLATFORMS;","tryCatchPattern":"try {\n  bin = resolveGooseBinary();\n} catch (e) {\n  if (String(e).includes('No goose binary available')) {\n    bin = '/usr/local/bin/goose'; // pre-validated fallback for this deployment\n  } else throw e;\n}","preventionTips":["Set GOOSE_BINARY in deployment envs outside the supported matrix","Assert resolveGooseBinary() succeeds in a container healthcheck before traffic arrives","Track the platform key in telemetry to know which platforms to support"],"tags":["platform-support","environment","binary","sdk","configuration"],"backgroundTag":null,"analyzedSha":"3810898a7447ec3299be72e223d3570a7aabf0ab","analyzedAt":"2026-08-16T10:14:26.282Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}