microsoft / microsoft/aspire

Better handle dashboard crashes

Open
#16,012 3 comments 0 reactions 0 assignees View on GitHub
area-dashboard
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the bug

If the dashboard crashes for any reason, it leaves the AppHost / CLI hanging, which can be confusing - the console shows you a dashboard url, but clicking it does nothing..

Note, I'm still trying to troubleshoot exactly why my app host is failing, and will have a separate issue(s) once I can work that out. This issue is to make the app host handle the general scenario of a dashboard crash)

### Expected Behavior

`aspire run` / `dotnet run` / debug in VS should so something to react to the dashboard failing - such as

- Write a warning to the CLI output
- try to auto restart the dashboard.
- exit the entire CLI / apphost process

### Steps To Reproduce

1. Start with a basic app host
2. Simulate a dashboard crash - get the dashboard's pid by showing hidden resources on the dashboard, then kill the process

```cs
var builder = DistributedApplication.CreateBuilder(args);

var app = builder.Build();
app.Run();
```

### Exceptions (if any)

_No response_

### Aspire doctor output

Aspire Environment Check
========================

.NET SDK
✔ .NET 10.0.200 installed (x64)

Container Runtime
✔ Docker Desktop detected and running (version 29.3.1)

Environment
✔ HTTPS development certificate is trusted

Summary: 3 passed, 0 warnings, 0 failed

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.