[PR #8231] fix(desktop): correct health check endpoint URL to /global/health #12667

Closed
opened 2026-02-16 18:17:33 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/8231

State: closed
Merged: Yes


Summary

Fixes the desktop app failing to start with "Failed to spawn OpenCode Server" even though the server is running and listening.

Root cause: The Tauri desktop app was checking /health for server readiness, but the actual endpoint in server.ts is /global/health.

Changes

  • Updated check_server_health() in lib.rs to use /global/health instead of /health

Fixes

  • #8149 - Desktop App Failing to Start server on Windows
  • #8200 - window install error Failed to spawn OpenCode Server
  • #8206 - Error: Failed to spawn OpenCode Server

Error Message (before fix)

Error: Failed to spawn OpenCode Server. Logs:
[STDOUT] opencode server listening on http://127.0.0.1:2731

    at castError (http://tauri.localhost/assets/index-DT7g4zby.js:2:11968)
    at http://tauri.localhost/assets/index-DT7g4zby.js:2:4662

The logs show the server is listening, but the health check was hitting the wrong endpoint, causing a 30-second timeout and the error.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/8231 **State:** closed **Merged:** Yes --- ## Summary Fixes the desktop app failing to start with "Failed to spawn OpenCode Server" even though the server is running and listening. **Root cause**: The Tauri desktop app was checking `/health` for server readiness, but the actual endpoint in `server.ts` is `/global/health`. ## Changes - Updated `check_server_health()` in `lib.rs` to use `/global/health` instead of `/health` ## Fixes - #8149 - Desktop App Failing to Start server on Windows - #8200 - window install error Failed to spawn OpenCode Server - #8206 - Error: Failed to spawn OpenCode Server ## Error Message (before fix) ``` Error: Failed to spawn OpenCode Server. Logs: [STDOUT] opencode server listening on http://127.0.0.1:2731 at castError (http://tauri.localhost/assets/index-DT7g4zby.js:2:11968) at http://tauri.localhost/assets/index-DT7g4zby.js:2:4662 ``` The logs show the server **is** listening, but the health check was hitting the wrong endpoint, causing a 30-second timeout and the error.
yindo added the pull-request label 2026-02-16 18:17:33 -05:00
yindo closed this issue 2026-02-16 18:17:33 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12667