microsoft / microsoft/aspire

### Is there an existing issue for this?

Open
#19,995 2 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

After upgrading to Aspire 13.5, the dashboard's Graph view throws an unhandled exception whenever a resource uses `storage.AddBlobs("blobs")`. The resources table view still works fine, only the graph view breaks.

### Expected Behavior

Graph is working

### Steps To Reproduce

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

var storage = builder
.AddAzureStorage("storage")
.RunAsEmulator(azurite => azurite.WithDataVolume());

storage.AddBlobs("blobs");

builder.Build().Run();
```

### Exceptions (if any)

```
Aspire.Hosting.Dashboard.ThirdParty.Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
Unhandled exception in circuit 'dfLU3mhJyuFSgKoptiboKUcoPKgKh_WwZH9BIUQ_o2I'.
System.Xml.XmlException: There are multiple root elements. Line 1, position 142.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.Linq.XElement.ReadElementFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XElement.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XElement.Parse(String text, LoadOptions options)
at Aspire.Dashboard.Model.ResourceGraph.ResourceGraphMapper.GetIconPathData(Icon icon) in D:\a\_work\1\s\src\Aspire.Dashboard\Model\ResourceGraph\ResourceGraphMapper.cs:line 90
at Aspire.Dashboard.Model.ResourceGraph.ResourceGraphMapper.MapResource(ResourceViewModel r, IEnumerable`1 graphResources, IDictionary`2 resourcesByName, IStringLocalizer`1 columnsLoc, Boolean showHiddenResources, IconResolver iconResolver) in D:\a\_work\1\s\src\Aspire.Dashboard\Model\ResourceGraph\ResourceGraphMapper.cs:line 41
at Aspire.Dashboard.Components.Pages.Resources.<>c__DisplayClass155_0.b__2(ResourceViewModel r) in D:\a\_work\1\s\src\Aspire.Dashboard\Components\Pages\Resources.razor.cs:line 406
at System.Linq.Enumerable.ListSelectIterator`2.Fill(ReadOnlySpan`1 source, Span`1 destination, Func`2 func)
at System.Linq.Enumerable.ListSelectIterator`2.ToList()
at Aspire.Dashboard.Components.Pages.Resources.UpdateResourceGraphResourcesAsync() in D:\a\_work\1\s\src\Aspire.Dashboard\Components\Pages\Resources.razor.cs:line 406
at Aspire.Dashboard.Components.Pages.Resources.OnAfterRenderAsync(Boolean firstRender) in D:\a\_work\1\s\src\Aspire.Dashboard\Components\Pages\Resources.razor.cs:line 393
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
```

### Aspire doctor output

Aspire
✅ Aspire CLI version 13.5.0 (channel: stable)
✅ Developer Control Plane (DCP) connection health checks succeeded

AppHost
✅ AppHost version 13.5.0 (IconBugAppHost1.csproj)

.NET SDK
✅ .NET 10.0.204 installed (x64)

Environment
✅ Operating system: Windows 10.0.26100.0
✅ HTTPS development certificate is trusted

Development Tools
✅ Aspire extension for VS Code is installed

### Anything else?

_No response_

_Originally posted by @MaikelOrisha in https://github.com/microsoft/aspire/issues/19489_ https://github.com/features/ai/github-app

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the supplied AppHost and inspect Aspire.Dashboard/Model/ResourceGraph/ResourceGraphMapper.cs around GetIconPathData at line 90. Trace how Resources.razor.cs updates graph resources around lines 393-406 and identify why the blob resource produces invalid icon XML. Done means the Graph view renders successfully with storage.AddBlobs("blobs") without an unhandled exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
devtools, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.