openwork icon indicating copy to clipboard operation
openwork copied to clipboard

bug: Tauri sidecar resolution looks next to binary, not in `sidecars/` subdirectory

Open pedrohx26 opened this issue 8 months ago • 1 comments

Summary

The Tauri Shell Plugin v2 resolves sidecar("openwork-server") via exe_dir.join(program_name) — it looks for the binary directly next to the Tauri app binary, NOT in a sidecars/ subdirectory. This is contrary to what the Tauri documentation implies and what the build-time bundling convention uses (sidecars/<name>-<target-triple>).

For example:

  • Tauri binary at /usr/bin/OpenWork-Dev → resolves to /usr/bin/openwork-server
  • Tauri binary at ~/.local/bin/OpenWork-Dev-patched → resolves to ~/.local/bin/openwork-server

To Reproduce

  1. Install OpenWork from AUR
  2. Place working sidecar binaries in /usr/bin/sidecars/ (as the docs suggest)
  3. Launch OpenWork — sidecars are not found
  4. Place the same binaries directly next to the Tauri binary (e.g., /usr/bin/openwork-server next to /usr/bin/OpenWork-Dev)
  5. Launch OpenWork — sidecars are now found and spawned

Expected behavior

Runtime sidecar resolution should either:

  • Match the build-time bundling convention (sidecars/<name>-<target-triple>)
  • Be clearly documented that runtime uses exe_dir/<name> with no subdirectory and no target-triple suffix

Actual behavior

Sidecars placed in the sidecars/ subdirectory are never found at runtime. Only binaries placed directly next to the Tauri app binary are discovered. This took three iterations of diagnostic logging wrappers to discover.

OW version & Desktop info

  • OpenWork: 0.11.194-1 (AUR)
  • Tauri Shell Plugin: v2.3.5
  • OS: Arch Linux x86_64

Additional context

Relevant Tauri source (tauri-plugin-shell/src/process/command.rs):

let exe_dir = tauri::utils::platform::current_exe()?.parent();
let sidecar_path = exe_dir.join(program_name);

Workaround: create symlinks directly next to the Tauri binary on every launch:

BIN_DIR=$(dirname "$OPENWORK_BIN")
ln -sf /usr/local/bin/openwork-server-wrapper "$BIN_DIR/openwork-server"
ln -sf /usr/local/bin/openwork-orchestrator-wrapped "$BIN_DIR/openwork-orchestrator"

Note: this may also be a Tauri upstream issue rather than OpenWork-specific.

pedrohx26 avatar Mar 30 '26 17:03 pedrohx26

closed due to age, please reopen and tag me if still valid

OmarMcAdam avatar Oct 28 '26 22:10 OmarMcAdam