{"record":{"id":"95846b2a076048ac","repo":"Yeachan-Heo/oh-my-codex","slug":"sparkshell-native-binary-not-found-checked-cach","errorCode":null,"errorMessage":"[sparkshell] native binary not found. Checked cached/native candidates under ${packageRoot}, ${repoLocal}, and ${nestedRepoLocal}. ${rejectedCache ? `Rejected managed cache entry ${rejectedCache.path} (${rejectedCache.state}). ` : ''}Reconnect to the network so OMX can fetch the release asset, or set ${OMX_SPARKSHELL_BIN_ENV} to override the path.","messagePattern":"\\[sparkshell\\] native binary not found\\. Checked cached/native candidates under (.+?), (.+?), and (.+?)\\. (.+?) \\((.+?)\\)\\. ` : ''\\}Reconnect to the network so OMX can fetch the release asset, or set (.+?) to override the path\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/sparkshell.ts","lineNumber":183,"sourceCode":"    const inspected = await inspectManagedNativeBinary(cached, env);\n    if (inspected.state === 'verified') return inspected.path!;\n    if (inspected.state !== 'missing') rejectedCache ??= { path: cached, state: inspected.state };\n  }\n\n  for (const packaged of packagedSparkShellBinaryCandidatePaths(packageRoot, platform, arch, env, linuxLibcPreference)) {\n    if (exists(packaged)) return packaged;\n  }\n\n  const repoLocal = repoLocalSparkShellBinaryPath(packageRoot, platform);\n  if (exists(repoLocal)) return repoLocal;\n\n  const nestedRepoLocal = nestedRepoLocalSparkShellBinaryPath(packageRoot, platform);\n  if (exists(nestedRepoLocal)) return nestedRepoLocal;\n\n  const hydrated = await hydrateNativeBinary('omx-sparkshell', { packageRoot, env, platform, arch });\n  if (hydrated) return hydrated;\n\n  throw new Error(\n    `[sparkshell] native binary not found. Checked cached/native candidates under ${packageRoot}, ${repoLocal}, and ${nestedRepoLocal}. `\n      + `${rejectedCache ? `Rejected managed cache entry ${rejectedCache.path} (${rejectedCache.state}). ` : ''}`\n      + `Reconnect to the network so OMX can fetch the release asset, or set ${OMX_SPARKSHELL_BIN_ENV} to override the path.`,\n  );\n}\n\nexport function runSparkShellBinary(\n  binaryPath: string,\n  args: readonly string[],\n  options: RunSparkShellBinaryOptions = {},\n): SpawnSyncReturns<string> {\n  const {\n    cwd = process.cwd(),\n    env = process.env,\n    spawnImpl = spawnSync,\n  } = options;\n\n  const configEnvOverrides = readConfiguredEnvOverrides(env.CODEX_HOME);","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/sparkshell.ts#L165-L201","documentation":"Same as the sync resolver but in the hydrating path: no cached/native binary found, and the on-demand network hydration (hydrateNativeBinary) also failed — possibly because a managed cache entry existed but was rejected (state/path reported). Fix by getting network access for the release-asset download or pointing the env var at a binary.","triggerScenarios":"resolveSparkShellBinaryPathWithHydration: all local candidates missing, hydrateNativeBinary returns falsy (offline, download failure), and optionally a cache entry was rejected (checksum/integrity state).","commonSituations":"Offline machine or proxy blocking GitHub release downloads, corrupted cache entry rejected by integrity checks, CI environments without network, or the platform package not shipped.","solutions":["Reconnect to the network (or fix proxy/firewall) so OMX can fetch the release asset, then retry","If a cache entry was rejected, clear the managed cache directory so it re-downloads cleanly","Set OMX_SPARKSHELL_BIN to a locally available binary to bypass download entirely"],"exampleFix":"# before\nomx sparkshell --json -- npm test\n# after\nOMX_SPARKSHELL_BIN=./bin/omx-sparkshell omx sparkshell --json -- npm test","handlingStrategy":"retry","validationCode":"import { existsSync } from 'node:fs';\nif (!existsSync(localCandidate) && !navigatorOnLine) { /* pre-download binary or set OMX_SPARKSHELL_BIN */ }","typeGuard":null,"tryCatchPattern":"catch (e) { if (String(e).includes('Reconnect to the network')) { await retryWithBackoff(run); /* or set OMX_SPARKSHELL_BIN */ } else throw e; }","preventionTips":["Pre-hydrate the binary cache before going offline","Clear a rejected managed cache entry so hydration retries cleanly","Pin OMX_SPARKSHELL_BIN in air-gapped environments"],"tags":["native-binary","sparkshell","network","download","cache"],"backgroundTag":"native-binary-download-failed","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}