aspire: Authentication errors when launching portal from VS.
Has anyone seen this when launching Aspire portal from VS? This is from Inspecting the portal page while it keeps trying to reload itself after the exception. I’m using Preview 6.
Grpc.Core.RpcException: Status(StatusCode=“Unauthenticated”, Detail=“Bad gRPC response. HTTP status code: 401”) at Grpc.Net.Client.Internal.Retry.RetryCallBase`2.GetResponseCoreAsync() at Aspire.Dashboard.Model.DashboardClient.<>c__DisplayClass27_0.<<EnsureInitialized>g__ConnectAsync|2>d.MoveNext() in //src/Aspire.Dashboard/Model/DashboardClient.cs:line 238 — End of stack trace from previous location — at Aspire.Dashboard.Components.ApplicationName.OnInitializedAsync() in //src/Aspire.Dashboard/Components/Controls/ApplicationName.razor.cs:line 32 at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync() at
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 22 (14 by maintainers)
Killing the “Aspire.Dashboard.exe” task worked for me.
@cecilphillip next time it happens, when you kill the apphost, see if the dashboard process is already running. I saw this randomly this week and it was an old dashboard instance trying to connect to the apphost with the wrong key. Each launch the apphost generates a new secret and gives it to the dashboard. If the dashboard doesn’t die properly, it’ll still be up and on the next launch, you’ll be using the stale instance with the wrong key.
Thanks all that really helped!
@davidfowl that was it. I found a few of those processes running. However… it seems stopping the
dotnet runprocess isn’t killing the dashboard (on my machine), so I have to manually end it on subsequent runsAspire 8.1 release contains the fixes mentioned above. Closing for now; if someone encounters this again, please open a new issue.
OK I can definitively reproduce the problem with an UDP endpoint. Looks like DCP is crashing 😞 Investigating…
Edit: I am going to open a separate issue for the repro that @cecilphillip reported, and keep open this one in case someone finds a repro for the original issue that @PaybackMan reported
cc @danegsta @timheuer @baronfel
I am also seeing this, but it was because of a partial deploy (the initial launch only spun up 2 of the projects because I stopped it in VS2022 instead of the conhost). After explicitly killing everything with Ctrl+C, the next time it launched everything was good.
Thanks David, you saved me some early morning headache 😎