Repository navigation
Description
Triage for microsoft/aspire#12572.
Repo filter: area-dashboard issues.
MihuBot version: 5f26bc.
Ping MihaZupan for any issues.
This is a test triage report generated by AI, aimed at helping the triage team quickly identify past issues/PRs that may be related.
Take any conclusions with a large grain of salt.
Tool logs
dotnet/aspire#12572: Running the new python starter template: Dashboard crashes by IEvangelist
[Tool] Searching for dashboard crashes, dashboard connection refused, python starter template dashboard, blazor dashboard error, _blazor negotiate connection refused, aspire dashboard intermittent, dashboard websocket closed, dashboard failed to fetch (IncludeOpen=True, IncludeClosed=True, IncludeIssues=True, IncludePullRequests=False, Repository=dotnet/aspire)
[Tool] Searching for Aspire.Hosting.Python, Aspire.Hosting.NodeJs, WithUvEnvironment, PublishWithContainerFiles, uvicorn dashboard, vite dashboard crash (IncludeOpen=True, IncludeClosed=True, IncludeIssues=True, IncludePullRequests=False, Repository=dotnet/aspire)
[Tool] Found 40 issues, 28 comments (30003 ms)
[Tool] Found 40 issues, 61 comments (31638 ms)
Here is a list of related issues and discussions relevant to issue #12572, "Running the new python starter template: Dashboard crashes" by IEvangelist. The issue describes intermittent failures when running the new Python starter template with Aspire, where the dashboard sometimes fails to load, showing Blazor connection errors and "ERR_CONNECTION_REFUSED" in the browser console.
Highly Relevant Issues
Dashboard Intermittent/Connection Issues
Issue #2198 (Feb 2024) – Aspire dashboard sometimes doesn't start but the app host boots successfully
- Describes a race condition where the dashboard fails to start due to port conflicts, especially after repeated restarts. The apphost may run, but the dashboard port is still held by a previous process, leading to connection errors.
- Discussion includes analysis of the race and suggestions for more robust dashboard startup/shutdown handling.
- Resolution: Closed in favor of #2422, which aims to make dashboard/DCP communication more robust.
Issue #2422 (Feb 2024) – Make dcp and dashboard communication reliable and robust
- Aggregates several issues around dashboard/DCP startup reliability, including port conflicts, health checks, and recovery from failure.
- Discussion includes logs of port-in-use errors and suggestions for retry/backoff and improved error reporting.
- Status: Closed as of April 2024, but this area is a known source of intermittent dashboard failures.
Issue #7812 (Feb 2025) – 9.1 Dashboard not loading after restarting project in Visual Studio
- Reports that after restarting the app host, the dashboard often fails to load, with connection errors in the browser and port-in-use errors in logs. Refreshing the browser sometimes resolves it.
- Discussion points to a race condition where the dashboard tries to start before the previous instance has released the port.
Issue #11000 (Aug 2025) – Aspire 9.4.x dashboard not connecting as expected
- After upgrading, users are unable to connect to the dashboard; connection is refused. Discussion covers port conflicts, proxy issues, and environment variable configuration.
- Discussion includes suggestions to change dashboard ports and check for port usage with
netstat.
Issue #4303 (May 2024) – Intermittent .NET Aspire Dashboard and Service Failure (Requires Restart)
- Reports periodic dashboard and service failures requiring a reboot. Suggests enabling dashboard error logs for more insight.
- Discussion references #4290 for improved error reporting.
Issue #4290 (May 2024) – AppHost should detect when Dashboard crashes and notify the user
- Requests better feedback when the dashboard fails to start, as users are left without actionable errors. Suggests surfacing dashboard logs in the apphost console.
- Discussion includes user reports of containers losing port bindings and random failures.
Blazor/SignalR Connection Errors
Issue #6637 (Nov 2024) – Fail to run the dashboard on azure container apps
- Reports Blazor failing to establish a connection, with 404s on negotiate endpoints and WebSocket errors. Discussion points to proxy/sticky session issues, but the error pattern is similar to what you see in #12572.
- Discussion
Issue #7592 (Feb 2025) – AppHost Project Dashboard always have exception from blazor.js: Microsoft.JSInterop.JSException: Could not find 'window.getWindowDimensions'
- While the root cause is different (missing JS interop), the pattern of Blazor failing to connect and the dashboard being blank is similar.
Python/NodeJs Template and Container Issues
Issue #11865 (Oct 2025) – Aspire Python Templates for Python Backend and Javascript Frontend
- Tracks the creation and stabilization of Python+JS templates. The comments reference the initial app and ongoing work, but do not mention dashboard crashes specifically.
- Discussion
Issue #2760 (Mar 2024, closed Jun 2024) – Python Support in Aspire
- Tracks the addition of Python support to Aspire. Comments discuss limitations and integration challenges, but not dashboard crashes.
Issue #12294 (Oct 2025) –
.WithUvEnvironmentin the Python extensions doesn't expose a way to add additional arguments- Feature request for more flexibility in the Python hosting extension, not directly related to dashboard crashes.
Other Intermittent Dashboard/Container Issues
Issue #5309 (Aug 2024) – Dashboard crashes:
The value cannot be an empty string or composed entirely of whitespace. (Parameter 'name')- Reports dashboard crashes when containers are loaded, but the error is different (environment variable parsing).
Issue #8870 (Apr 2025) – [Failing test]: Aspire.Hosting.NodeJs.Tests.NodeFunctionalTests.VerifyNpmAppWorks
- NodeJs functional test intermittently fails due to port-in-use errors, suggesting similar resource contention as seen in dashboard startup races.
Summary and Conclusions
- The most relevant issues are #2198, #2422, #7812, #11000, and #4303. All describe intermittent dashboard startup failures, often due to port conflicts or race conditions when restarting or running Aspire apps. The symptoms (connection refused, Blazor negotiation errors, dashboard sometimes working and sometimes not) match those in #12572.
- The Python template is new, but the underlying dashboard issue appears to be a general problem with Aspire's dashboard process management and port allocation, not specific to Python or NodeJs.
- Workarounds and suggestions from related issues include:
- Ensuring previous dashboard processes are fully terminated before restarting.
- Changing dashboard ports in
launchSettings.jsonto avoid conflicts. - Checking for port usage with
netstator similar tools. - Enabling dashboard error logs for more diagnostics.
- Waiting a few seconds between restarts to allow ports to be released.
References
- #2198 – Aspire dashboard sometimes doesn't start but the app host boots successfully
- #2422 – Make dcp and dashboard communication reliable and robust
- #7812 – 9.1 Dashboard not loading after restarting project in Visual Studio
- #11000 – Aspire 9.4.x dashboard not connecting as expected
- #4303 – Intermittent .NET Aspire Dashboard and Service Failure (Requires Restart)
- #4290 – AppHost should detect when Dashboard crashes and notify the user
- #6637 – Fail to run the dashboard on azure container apps
- #11865 – Aspire Python Templates for Python Backend and Javascript Frontend
- #2760 – Python Support in Aspire
- #12294 –
.WithUvEnvironmentin the Python extensions doesn't expose a way to add additional arguments - #5309 – Dashboard crashes:
The value cannot be an empty string or composed entirely of whitespace. (Parameter 'name') - #8870 – [Failing test]: Aspire.Hosting.NodeJs.Tests.NodeFunctionalTests.VerifyNpmAppWorks
In summary: The intermittent dashboard crashes seen with the new Python starter template are a manifestation of a broader class of issues in Aspire around dashboard process startup, port conflicts, and race conditions. These have been reported in various forms for .NET, NodeJs, and now Python projects. The team is aware and has made some improvements, but this remains an area of active development and occasional user pain. Workarounds focus on ensuring clean shutdowns and avoiding port conflicts.
Activity