You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SQL Server REPL reports "Terminal view is not connected" without useful failure diagnostics #20645
In the Terminals playground on Windows, running the SQL Server REPL command opens a sqlcmd (sqlserver) terminal dock tab, but reports “Terminal view is not connected” instead of providing a usable SQL prompt.
The available diagnostics do not identify why the session ended. The error originates from a disconnected-view guard in the Hex1b web-terminal client; it is not, by itself, evidence of SQL Server authentication or connectivity failure.
Expected Behavior
The REPL should show an interactive SQL prompt. If the underlying command or terminal session fails, its actual failure reason should be available in the terminal or diagnostic logs rather than only a generic disconnected-view message.
Run playground/Terminals/Terminals.AppHost/Terminals.AppHost.csproj on Windows.
Open the dashboard and run the sqlserver resource's REPL command.
Observe the sqlcmd (sqlserver) dock tab and the reported disconnected-view error.
This is the reported scenario; the underlying cause and reproduction frequency remain unconfirmed.
Exceptions (if any)
Reported terminal error:
Terminal view is not connected
The shared browser console also contained repeated warnings:
Dashboard terminal connection failed. Timed out waiting for the terminal's first frame
These warnings do not identify the terminal/view, so they cannot conclusively be attributed to the SQL Server REPL rather than another terminal on the page. No complete exception stack for the REPL failure was captured.
Aspire doctor output
Not collected for this investigation.
Anything else?
Observed in the Terminals playground on Windows, using VS Code and its integrated browser while testing #20255. The PR head when these details were recorded was 2756fc13a2a684a0991b4942a5294537e58527aa.
Evidence from the running app
The sqlserver resource was Running / Healthy.
The SQL Server dock view's snapshot reported connected: false, ended: true, and no screen text available to the viewer. This does not establish whether the producer emitted output before the viewer attached.
Searches of the dashboard console logs found no matching Failed to attach terminal or Terminal view failed entries.
Diagnostic locations
Browser DevTools → Console: connection failures, WebSocket close codes, first-frame timeouts, and input errors.
AppHost output: terminal lifecycle messages under Aspire.Hosting.ApplicationModel.TerminalService, including Starting terminal … (sqlcmd (sqlserver)) and unexpected workload exceptions.
Logging gap and investigation follow-up
RunTerminalAsync logs unexpected exceptions and cancellation, but does not log a process exit code when the workload simply completes. The current diagnostics therefore do not establish why the REPL session ended.
Investigate the producer/session lifecycle and correlate browser warnings with the terminal/view ID. Surface launch/completion diagnostics, including exit status when available, without exposing credentials or environment-variable values.
The root cause remains unconfirmed; no fix is claimed.
Is there an existing issue for this?
Describe the bug
In the Terminals playground on Windows, running the SQL Server REPL command opens a
sqlcmd (sqlserver)terminal dock tab, but reports “Terminal view is not connected” instead of providing a usable SQL prompt.The available diagnostics do not identify why the session ended. The error originates from a disconnected-view guard in the Hex1b web-terminal client; it is not, by itself, evidence of SQL Server authentication or connectivity failure.
Expected Behavior
The REPL should show an interactive SQL prompt. If the underlying command or terminal session fails, its actual failure reason should be available in the terminal or diagnostic logs rather than only a generic disconnected-view message.
Steps To Reproduce
playground/Terminals/Terminals.AppHost/Terminals.AppHost.csprojon Windows.sqlserverresource's REPL command.sqlcmd (sqlserver)dock tab and the reported disconnected-view error.This is the reported scenario; the underlying cause and reproduction frequency remain unconfirmed.
Exceptions (if any)
Reported terminal error:
The shared browser console also contained repeated warnings:
These warnings do not identify the terminal/view, so they cannot conclusively be attributed to the SQL Server REPL rather than another terminal on the page. No complete exception stack for the REPL failure was captured.
Aspire doctor output
Not collected for this investigation.
Anything else?
Observed in the Terminals playground on Windows, using VS Code and its integrated browser while testing #20255. The PR head when these details were recorded was
2756fc13a2a684a0991b4942a5294537e58527aa.Evidence from the running app
sqlserverresource was Running / Healthy.connected: false,ended: true, and no screen text available to the viewer. This does not establish whether the producer emitted output before the viewer attached.Failed to attach terminalorTerminal view failedentries.Diagnostic locations
Aspire.Dashboard.Terminal.TerminalWebSocketProxy.Aspire.Hosting.ApplicationModel.TerminalService, includingStarting terminal … (sqlcmd (sqlserver))and unexpected workload exceptions.Logging gap and investigation follow-up
RunTerminalAsync logs unexpected exceptions and cancellation, but does not log a process exit code when the workload simply completes. The current diagnostics therefore do not establish why the REPL session ended.
Investigate the producer/session lifecycle and correlate browser warnings with the terminal/view ID. Surface launch/completion diagnostics, including exit status when available, without exposing credentials or environment-variable values.
The root cause remains unconfirmed; no fix is claimed.
Related PR: #20255. Original investigation: #20255 (comment)