Skip to content

Desktop first-run: 'No server detected' against a SETUP-state backend, then launches a second ciris-server on :8080 and fails on the collision #53

Description

@emooreatx

macOS, 0.5.217: on the with-AI first-run leg the app decided no backend was there, launched its own ciris-server on the same port, and then failed startup on the collision it had just created. CIRISAgent run 34312773554 (release/2.11.0 @ aea98e95d, ciris-server 0.5.204). Same family as #52 — "never a second node" — but a different path: the desktop first-run backend on :8080, not the node on :4243.

Our harness starts the backend and waits for it before launching the app:

Server PID: 29500
Agent state: SETUP, healthy: False   (x4)
[OK] Server ready (state: SETUP)
[3/3] Launching desktop app (CIRIS_TEST_MODE=true)...
[OK] desktop test server up at http://localhost:9091

The app then, from ciris_desktop_setup.20260909T051127.log:

115: [PythonRuntime.desktop] No server detected, launching backend...
116: [PythonRuntime.desktop] Launching local ciris-server node...
118: [PythonRuntime.desktop] Node home: /Users/runner/work/_temp/ciris-macos (node listens on :8079, API on :8080)
120: [ERROR][StartupViewModel] [STARTUP] Step 2 FAILED: startServer() -> Cannot start the CIRIS backend: port(s) [8080] are still held by another process a
126: [ERROR][StartupViewModel] [STARTUP] === Startup sequence FAILED: Cannot start the CIRIS backend: port(s) [8080] are still held by another process and 

So the probe concluded "No server detected" against a backend that was up and answering — in SETUP state with healthy: false, which is exactly what a first-run backend reports before the wizard completes. It then launched ciris-server with API on :8080, which cannot bind, and turned that into a hard startup failure: port(s) [8080] are still held by another process and nothing is answering. The wizard never appeared (our leg: wait_for_setup_wizard: Setup wizard did not appear within 45s (last screen 'Startup')), so the with-AI pass was 2/7.

Two observations that might separate cause from symptom:

  • healthy: false is not absent. A first-run backend is supposed to be unhealthy — it has no admin user and no configured LLM yet; that is what the wizard is for. If the detection keys on health rather than on "something is listening and answering", every first-run launch is one timing slip away from this.
  • The error text contradicts the situation: "still held by another process and nothing is answering" — something was answering on :8080, which is why the port was held. Whatever check produced "nothing is answering" disagrees with the one that found the port busy.

It is intermittent: macOS passed this same leg on the two previous runs, and windows/linux/android pass it every time. macOS is the slowest desktop in our matrix, which fits a race.

Not blocking us right now — I am re-running with an unrelated harness fix and will report whether it recurs. Raising it because a client that launches a second backend on a port it already found busy is the same shape as #52, and on a user's machine the visible result is an app that refuses to start with an instruction to kill -9 their own agent.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions