-
Notifications
You must be signed in to change notification settings - Fork 450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Authentication errors when launching portal from VS. #4247
Comments
Hi @PaybackMan we just released GA bits today! Can you update all packages to 8.0.0? |
I had the same issue via the command line after I updated to GA. I ended up recreating the app host project and copying the code over. Not sure what the source of that was. Checked browser session, checked packages, ran the project with and without an IDE.... |
@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. |
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 😎 |
@davidfowl that was it. I found a few of those processes running. However... it seems stopping the |
Killing the "Aspire.Dashboard.exe" task worked for me. |
Thanks all that really helped! |
Dug into this some more today. I think the issue I'm having is different from @PaybackMan and is happening because of an endpoint I'm trying to expose. I have a custom resource that looks like this. public class ConsulResource(string name) : ContainerResource(name);
public static class DistributedApplicationBuilderExtensions
{
public static IResourceBuilder<ConsulResource> AddConsulContainer(
this IDistributedApplicationBuilder builder, string name, int? port = null, int? dnsPort = null, string tag = "latest")
{
var consul = new ConsulResource(name);
return builder.AddResource(consul)
.WithImage("hashicorp/consul", tag)
.WithImageRegistry("docker.io")
.WithHttpEndpoint(port, 8500, "api")
.WithEndpoint("dns", ea =>
{
ea.Protocol = ProtocolType.Udp;
ea.Port = dnsPort;
ea.TargetPort = 8600;
});
}
} If I remove that last call to |
@karolz-ms I can reproduce this when using main and dotnet run. I haven't been able to reproduce in VS but it seems like something about using dotnet run slows down shutdown enough to make this happen. Turning on the dashboard logs via the apphost I get this on each run:
|
Had the same issue #4499 That was version 8.0.0 of the package. The aspire.dashboard was indeed still in my TaskManager, after closing. Killing it manually was also a solution on 8.0.0 |
I am unable to reproduce this using |
I am not able to reproduce either. What I did:
The dashboard comes up fine every dime... 🤔 |
@karolz-ms if the issue users are reporting is that the process isn’t stopped on close, can I reassign to you? We do not have any input in that process. |
@adamint sure. I just realised that there was another repro mentioned here #4247 (comment) need to try that. |
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 |
And it's not always. Always closing the process... |
For reference, that was #4518 |
We think this one should be done , but we never got to consistently repro. If folks are updating to 8.1 and still seeing this, please let us know. |
Moving this to high. |
Moving out of 8.1 as there were fixes made. If you can reproduce the issue, please let us know. If you are willing to try out daily builds to see if they solve your issues, go here: https://github.com/dotnet/aspire/blob/main/docs/using-latest-daily.md |
Aspire 8.1 release contains the fixes mentioned above. Closing for now; if someone encounters this again, please open a new issue. |
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.<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
The text was updated successfully, but these errors were encountered: