Skip to content

fix(desktop): Desktop app fails to connect to authenticated remote server on startup #16123

@DaneelOlivaw1

Description

@DaneelOlivaw1

Description

When a remote server requiring authentication (username/password) is set as the default server, the desktop app fails to connect on startup with an error message.

The root cause is in packages/desktop-electron/src/main/index.ts, where the setupServerConnection() function calls checkHealthOrAskRetry(customUrl) without passing credentials. The checkHealth() function supports a password parameter, but it's not being used during the startup health check.

This is related to #16096, which has a similar issue in the CLI run --attach command path.

Plugins

None

OpenCode version

1.2.17 (Desktop app - Electron)

Steps to reproduce

  1. Add a remote server with authentication (username + password) in the desktop app
  2. Set this server as default using the dropdown menu ("Set as default")
  3. Restart the desktop app
  4. Observe connection failure error dialog

Screenshot and/or share link

No response

Operating System

macOS (also affects Windows and Linux desktop apps)

Terminal

N/A (Desktop app issue, not terminal-related)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions