Skip to content

[DevServer CLI] After the Dev Server host dies, uno-devserver start comes back on a new port and the running app never reconnects #25686

Open

Description

@khaskoul

Current behavior

A desktop app is started through uno-devserver app start and is connected. Then its Dev Server host is killed, and uno-devserver start brings up a new host for the same solution. The running app never rejoins the new host: for 90 s, uno-devserver app info answers "No connected app instance".

The restarted host listens on a different port from the one the app was built with:

Uno.Sdk 7.0.0-dev.81 Uno.Sdk 6.7.30
First host --httpPort, port conveyed to the app's build 49556 55992
Restarted host --httpPort 57369 56629

The app keeps running after the host is killed, so the app itself is fine. But it has no way to find the new port, so Hot Reload and the App tools stay unavailable until the app is relaunched.

Logs
# Uno.Sdk 7.0.0-dev.81, Dev Server host 7.0.0-dev.2347, uno-devserver CLI 7.0.0-dev.2345
$ uno-devserver start
Starting DevServer in direct mode: ...\Uno.UI.RemoteControl.Host.exe --httpPort 49556 --solution ...\QaApp.sln ...
$ uno-devserver app info            (while the app was starting)
No connected app instance. ... DevServer port 49556 was conveyed to the build. ...
$ uno-devserver app wait --ready
Hot Reload: Ready (server Ready, local Ready) (waited 5.6s)
$ uno-devserver list
Process ID: <host pid> (Uno.UI.RemoteControl.Host)  Port: 49556
# the host process alone is killed (not the app); port 49556 closes; the app window stays open
$ uno-devserver start
Starting DevServer in direct mode: ...\Uno.UI.RemoteControl.Host.exe --httpPort 57369 --solution ...\QaApp.sln ...
$ uno-devserver app tools            -> 15 tools
$ uno-devserver app info             (every ~3 s for 90 s)
No connected app instance. No app has been started in this DevServer session - call uno_app_start first.

Expected behavior

The app should reconnect once a Dev Server for the same solution is available again. Then a developer whose host crashed, or who restarted it, doesn't have to relaunch the app to get Hot Reload back. Two ways this could work:

  • a restart for the same solution reuses the port the running app was built with, when that port is free; or
  • the app finds the new host some other way.

At minimum, the app or uno-devserver should say that the app is on a host that no longer exists.

How to reproduce it (as minimally and precisely as possible)

  1. dotnet new unoapp -n QaApp -preset blank -platforms desktop, then git init and dotnet build.
  2. uno-devserver start, then uno-devserver app start --projectPath QaApp/QaApp.csproj --targetFramework net10.0-desktop, then uno-devserver app wait --ready. Note the port in the start output (--httpPort N) and the app's process id from uno-devserver app info.
  3. uno-devserver list shows the host's process id. Kill only that process, for example Stop-Process -Id <host pid>, leaving its children and the app. The app window stays open.
  4. uno-devserver start again in the same folder. The output shows a different --httpPort. Wait until uno-devserver app tools lists the tools.
  5. Run uno-devserver app info every few seconds for a minute or more: it always answers "No connected app instance".

Reproduced in 4 of 4 runs on each version below. The ports in the table come from the run whose logs were inspected, one run per version.

Workaround

Relaunch the app after restarting the Dev Server. Freshly launched apps connect normally, but this exact sequence was not tested.

Affected platforms

Desktop (Windows)

Uno.Sdk version (and other relevant versions)

  • Uno.Sdk / Uno.Templates 7.0.0-dev.81 (Dev Server host 7.0.0-dev.2347) and 6.7.30 (host 6.7.135)
  • uno-devserver CLI 7.0.0-dev.2345
  • .NET SDK 10.0.401, Windows 11 Pro (26200), target net10.0-desktop

IDE version

None (CLI only)

Anything else we need to know?

  • Found by automated QA of the Uno SDK (kill the Dev Server mid-session, restart it, and expect the app to reconnect).
  • Not yet tested: whether the app reconnects when the new host happens to get the old port.
  • Possibly related: [DevServer] Restart the devserver when exited #17756 ("[DevServer] Restart the devserver when exited", closed).

Activity

  1. added
    kind/bug
    on Oct 25, 2026
  2. added this to the Platform 7.0 milestone on Oct 25, 2026
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

    kind/bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions