{"record":{"id":"f7013d41d54ad685","repo":"moeru-ai/airi","slug":"godot-stage-exported-binary-not-found-expected-at","errorCode":null,"errorMessage":"Godot stage exported binary not found. Expected at: ${join(process.resourcesPath, 'godot-stage')}","messagePattern":"Godot stage exported binary not found\\. Expected at: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"apps/stage-tamagotchi/src/main/services/airi/godot-stage/index.ts","lineNumber":352,"sourceCode":"    throw new Error(\n      'GODOT4 must point to the Godot executable file, not a directory or app bundle.\\n'\n      + `Configured path: ${executable}\\n`\n      + 'Examples:\\n'\n      + '  Windows: C:\\\\Path\\\\To\\\\Godot_v4.x-stable_mono_win64.exe\\n'\n      + '  macOS: /Applications/Godot_mono.app/Contents/MacOS/Godot\\n'\n      + '  Linux: /path/to/Godot_v4.x-stable_mono_linux.x86_64',\n    )\n  }\n}\n\nasync function resolveGodotBinary(): Promise<GodotBinaryResolution> {\n  if (app.isPackaged) {\n    const exported = await resolveExportedGodotBinary()\n    if (exported) {\n      return { executable: exported, mode: 'exported' }\n    }\n\n    throw new Error(\n      'Godot stage exported binary not found. '\n      + `Expected at: ${join(process.resourcesPath, 'godot-stage')}`,\n    )\n  }\n\n  const envPath = process.env.GODOT4?.trim()\n  if (!envPath) {\n    throw new Error(\n      'GODOT4 is required to start Godot Stage in development mode.\\n'\n      + 'Set GODOT4 to the absolute path of your Godot 4.x .NET/Mono executable, then restart the Electron dev app.\\n'\n      + 'Examples:\\n'\n      + '  PowerShell: $env:GODOT4 = \"C:\\\\Path\\\\To\\\\Godot_v4.x-stable_mono_win64.exe\"\\n'\n      + '  Bash: export GODOT4=\"/path/to/godot\"',\n    )\n  }\n\n  await validateConfiguredGodotEnginePath(envPath)\n  return { executable: envPath, mode: 'engine' }","sourceCodeStart":334,"sourceCodeEnd":370,"githubUrl":"https://github.com/moeru-ai/airi/blob/27111382b4a79a7e983289d6e983a06af185ed0f/apps/stage-tamagotchi/src/main/services/airi/godot-stage/index.ts#L334-L370","documentation":"Thrown by resolveGodotBinary in a packaged Electron build when resolveExportedGodotBinary returns undefined — i.e. no platform-appropriate exported Godot stage sidecar was found under process.resourcesPath/godot-stage. Packaged builds rely on a pre-exported binary shipped in Electron resources rather than the dev-mode GODOT4 engine.","triggerScenarios":"app.isPackaged is true and the export step did not place (or the packaging config did not include) the godot-stage binary under resourcesPath for the current platform.","commonSituations":"Packaging pipeline (electron-builder config) omitted the extraResources entry for godot-stage; cross-platform build produced artifacts for a different OS than the one running; the sidecar was stripped by a cleanup step; running an unpackaged-as-packaged misconfiguration.","solutions":["Rebuild the package ensuring the godot-stage export for the target platform is included under resources/godot-stage (check electron-builder extraResources).","Verify the packaged app's resources directory actually contains the godot-stage binary for the running OS.","Run the export pipeline (engines/stage-tamagotchi-godot) for the target platform before packaging.","If you intended dev mode, ensure app.isPackaged reports false (run via the dev script, not the packaged bundle)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import { existsSync } from 'node:fs'\nimport { join } from 'node:path'\n\nfunction exportedBinaryPackaged(): boolean {\n  return existsSync(join(process.resourcesPath, 'godot-stage'))\n}","typeGuard":"function exportedBinaryPackaged(): boolean {\n  return existsSync(join(process.resourcesPath, 'godot-stage'))\n}","tryCatchPattern":null,"preventionTips":["Include the godot-stage export in electron-builder extraResources for each target platform.","Run the Godot export pipeline before packaging.","Verify the packaged resources directory contains the sidecar."],"tags":["godot-stage","packaging","electron","build","sidecar","distribution"],"backgroundTag":null,"analyzedSha":"27111382b4a79a7e983289d6e983a06af185ed0f","analyzedAt":"2026-08-12T18:33:34.132Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}