AppImage Desktop fails to start: opencode-cli not found at hardcoded path
this issue is written by opencode
Bug Description
OpenCode Desktop AppImage fails to start with error:
[PasError: Failed to spawn OpenCode Server. Logs:
[STDERR] bash: /home/tsan/Downloads/opencode-cli: No such file or directory
The app is attempting to spawn opencode-cli from /home/tsan/Downloads/, which is a hardcoded or incorrectly resolved path.
Environment
- OS: Linux (AppImage)
- Platform: AppImage
- OpenCode Version: 1.1.11
Error Logs
[PasError: Failed to spawn OpenCode Server. Logs:
[STDERR] bash: 无法设定终端进程组 (7287): 对设备不适当的 ioctl 操作
[STDERR] bash: 此 shell 中无任务控制
[STDOUT] HINT: COMPILER_PATH points to gcc 14 # <- printed from my .bashrc
[STDERR] bash: /home/tsan/Downloads/opencode-cli: No such file or directory
zu@tauri://localhost/assets/index-Bv3YnF19.js:2:11977
@tauri://localhost/assets/index-Bv3YnF19.js:2:4664
Expected Behavior
The AppImage should either:
- Bundle the
opencode-clibinary within the AppImage - Resolve the path dynamically to the correct location
- Download the CLI to the correct location if needed
Actual Behavior
The AppImage tries to execute /home/tsan/Downloads/opencode-cli, which does not exist. The path appears to be hardcoded or incorrectly resolved.
Steps to Reproduce
- Download OpenCode Desktop AppImage
- Launch the AppImage
- Observe the error on startup
Suggested Fix
The desktop app should:
- Bundle
opencode-cliwithin the AppImage and reference it usingAPPDIRenvironment variable - Or dynamically resolve the CLI path relative to the AppImage location
- Or properly configure the CLI path via user settings/environment variables instead of hardcoding
~/Downloads/
Relevant code location: The path resolution likely happens in the desktop app's server spawning logic (packages/desktop/src-tauri/)
Additional Context
The bash warnings about terminal process group are expected when running outside a terminal, but the critical issue is the path to opencode-cli.
This issue might be a duplicate of existing issues. Please check:
- #6168: Open code Amd64 Linux appimage fails to launch (AppImage startup errors on Linux with 'Script not found "serve"' and similar path resolution issues)
- #6258: OpenCode desktop unable to run in Bazzite Linux using AppImage and RPM (AppImage launch failures with 'Server not running' and path resolution issues)
- #7475: Error: Failed to spawn OpenCode Server (Generic server spawn failure with missing error details, may share the same root cause)
Feel free to ignore if your specific case differs from these issues.