Skip to content

AppImage Desktop fails to start: opencode-cli not found at hardcoded path #7612

@e792a8

Description

@e792a8

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:

  1. Bundle the opencode-cli binary within the AppImage
  2. Resolve the path dynamically to the correct location
  3. 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

  1. Download OpenCode Desktop AppImage
  2. Launch the AppImage
  3. Observe the error on startup

Suggested Fix

The desktop app should:

  1. Bundle opencode-cli within the AppImage and reference it using APPDIR environment variable
  2. Or dynamically resolve the CLI path relative to the AppImage location
  3. 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.

Metadata

Metadata

Assignees

Labels

webRelates to opencode on web / desktop

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions