Aspire.ResourceServer.Standalone
Aspire.ResourceServer.Standalone copied to clipboard
Null Reference Exception when running on Aprire Dashboard version 9.2
When running the Resource Server with the latest versions of the Aspire dashboard 9.2 you get an exception in the Aspire dashboard:
fail: Aspire.Dashboard.Model.DashboardClient[0]
Error loading data from the resource service.
System.InvalidOperationException: Error converting resource "/aspire-dashboard" to ResourceViewModel.
---> System.NullReferenceException: Object reference not set to an instance of an object.
at Aspire.ResourceService.Proto.V1.Resource.<ToViewModel>g__TranslateKnownUrlName|0_10(Url url) in /_/src/Aspire.Dashboard/ResourceService/Partials.cs:line 84
at Aspire.ResourceService.Proto.V1.Resource.<>c.<ToViewModel>b__0_13(<>f__AnonymousType1`2 <>h__TransparentIdentifier0) in /_/src/Aspire.Dashboard/ResourceService/Partials.cs:line 95
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.ToArray()
at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)
at Aspire.ResourceService.Proto.V1.Resource.<ToViewModel>g__GetUrls|0_4() in /_/src/Aspire.Dashboard/ResourceService/Partials.cs:line 92
at Aspire.ResourceService.Proto.V1.Resource.ToViewModel(IKnownPropertyLookup knownPropertyLookup, ILogger logger) in /_/src/Aspire.Dashboard/ResourceService/Partials.cs:line 23
--- End of inner exception stack trace ---
at Aspire.ResourceService.Proto.V1.Resource.ToViewModel(IKnownPropertyLookup knownPropertyLookup, ILogger logger) in /_/src/Aspire.Dashboard/ResourceService/Partials.cs:line 47
at Aspire.Dashboard.Model.DashboardClient.<>c__DisplayClass28_1.<<EnsureInitialized>g__WatchResourcesAsync|5>d.MoveNext() in /_/src/Aspire.Dashboard/ResourceService/DashboardClient.cs:line 338
--- End of stack trace from previous location ---
at Aspire.Dashboard.Model.DashboardClient.<>c__DisplayClass28_1.<<EnsureInitialized>g__WatchResourcesAsync|5>d.MoveNext() in /_/src/Aspire.Dashboard/ResourceService/DashboardClient.cs:line 319
--- End of stack trace from previous location ---
at Aspire.Dashboard.Model.DashboardClient.<>c__DisplayClass28_0.<<EnsureInitialized>g__WatchResourcesWithRecoveryAsync|3>d.MoveNext() in /_/src/Aspire.Dashboard/ResourceService/DashboardClient.cs:line 294
--- End of stack trace from previous location ---
at Aspire.Dashboard.Model.DashboardClient.<EnsureInitialized>g__ConnectAndWatchResourcesAsync|28_1(CancellationToken cancellationToken) in /_/src/Aspire.Dashboard/ResourceService/DashboardClient.cs:line
Seems the latest Aspire dashboard have added the ResourceGraph for which this may need to implement?
Thank you for reporting the issue. You might be right. I'll address this ASAP.
I appreciate your contribution.
@ricohomewood This is fixed now with #43