Bug description
aspire run crashes while rendering resource state when it is launched through VS Code Remote SSH without a real TTY. The AppHost and dashboard start successfully, but the CLI exits while updating the live resource list.
Environment
- Aspire CLI:
13.4.6
- .NET SDK:
10.0.302
- OS: Linux (kernel 6.8)
- Launch context: VS Code Remote SSH
SSH_CONNECTION is set
VSCODE_IPC_HOOK_CLI is set
TERM=dumb
- stdout/stderr are not TTYs and the terminal height is reported as zero
Reproduction
Run an AppHost with a larger resource graph from a Remote SSH/non-TTY session:
pnpm start
# equivalent to:
aspire run --project <AppHost-project>.csproj
The AppHost builds, the dashboard begins listening, and resource state processing starts. Then the CLI exits with code 2:
System.ArgumentException: Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.
at System.Collections.Generic.List`1.RemoveRange(Int32, Int32)
at Spectre.Console.LiveRenderable.<Render>d__25.MoveNext()
at Spectre.Console.Rendering.RenderableExtensions.GetSegments(...)
at Spectre.Console.LegacyConsoleBackend.Write(IRenderable)
at Spectre.Console.LiveDisplayContext.Refresh()
at Spectre.Console.LiveDisplayContext.UpdateTarget(IRenderable)
at Aspire.Cli.Commands.RunCommand.ProcessResourceState(...)
Expected behavior
The CLI should avoid live rendering when stdout is not a usable TTY, or otherwise render resource state without throwing. The AppHost should remain running after the dashboard becomes available.
Workarounds verified
- Running the same command in a real PTY works.
env -u VSCODE_IPC_HOOK_CLI pnpm start works as a one-command workaround.
- The direct .NET AppHost fallback works.
- Setting
CI=1 or only setting COLUMNS/LINES does not fix it because those do not create a real TTY.
This appears related to non-interactive Spectre rendering issues discussed in #17410, #15203, #13875, #18010, and #12134, but I could not find an exact duplicate for this exception and Remote SSH environment.
Bug description
aspire runcrashes while rendering resource state when it is launched through VS Code Remote SSH without a real TTY. The AppHost and dashboard start successfully, but the CLI exits while updating the live resource list.Environment
13.4.610.0.302SSH_CONNECTIONis setVSCODE_IPC_HOOK_CLIis setTERM=dumbReproduction
Run an AppHost with a larger resource graph from a Remote SSH/non-TTY session:
The AppHost builds, the dashboard begins listening, and resource state processing starts. Then the CLI exits with code 2:
Expected behavior
The CLI should avoid live rendering when stdout is not a usable TTY, or otherwise render resource state without throwing. The AppHost should remain running after the dashboard becomes available.
Workarounds verified
env -u VSCODE_IPC_HOOK_CLI pnpm startworks as a one-command workaround.CI=1or only settingCOLUMNS/LINESdoes not fix it because those do not create a real TTY.This appears related to non-interactive Spectre rendering issues discussed in #17410, #15203, #13875, #18010, and #12134, but I could not find an exact duplicate for this exception and Remote SSH environment.