Skip to content
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

[WebToolsE2E] [Aspire] An unhandled exception was thrown after clicking the Stop and Start icons in the 'webfrontend' project on the Aspire dashboard. #7412

Closed
ymmendoza opened this issue Feb 5, 2025 · 4 comments
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
Milestone

Comments

@ymmendoza
Copy link

REGRESSION INFO:

  1. Worked in Aspire 8.2.2/9.0.1

INSTALL STEPS

  1. Clean machine: Win11 x64 23h2 ENU
  2. Install SDK 9.0.102
  3. Install Aspire 9.1.0-preview.1.25104.6
    Apply dotnet9 feed

REPRO STEPS:

  1. Open CMD, create an Aspire Starter App using following commands:
dotnet new aspire-starter --use-redis-cache -o AspireApp1
cd AspireApp1
cd AspireApp1.AppHost
  1. Dotnet run the project in CMD, and open URL in the browser.
dotnet build
Dotnet run
  1. Click the stop button of "cache" and "webfrontend" then click the start button of webfrontend.

ACTUAL
After clicking the start button of 'webfrontend' and the notification error will pop up with an error in CMD.

Image

Error Message:

      Failed to start resource webfrontend
      Aspire.Hosting.DistributedApplicationException: Resource 'cache' has entered the 'Exited' state prematurely.
         at Aspire.Hosting.ApplicationModel.ResourceNotificationService.<>c__DisplayClass14_0.<<WaitUntilHealthyAsync>g__Core|1>d.MoveNext() in /_/src/Aspire.Hosting/ApplicationModel/ResourceNotificationService.cs:line 170
      --- End of stack trace from previous location ---
         at Aspire.Hosting.ApplicationModel.ResourceNotificationService.WaitUntilHealthyAsync(IResource resource, IResource dependency, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/ApplicationModel/ResourceNotificationService.cs:line 146
         at Aspire.Hosting.ApplicationModel.ResourceNotificationService.WaitForDependenciesAsync(IResource resource, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/ApplicationModel/ResourceNotificationService.cs:line 308
         at Aspire.Hosting.Orchestrator.ApplicationOrchestrator.WaitForInBeforeResourceStartedEvent(BeforeResourceStartedEvent event, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Orchestrator/ApplicationOrchestrator.cs:line 76
         at Aspire.Hosting.Eventing.DistributedApplicationEventing.<>c__DisplayClass4_0`1.<<Subscribe>b__0>d.MoveNext() in /_/src/Aspire.Hosting/Eventing/DistributedApplicationEventing.cs:line 82
      --- End of stack trace from previous location ---
         at Aspire.Hosting.Eventing.DistributedApplicationEventing.PublishAsync[T](T event, EventDispatchBehavior dispatchBehavior, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Eventing/DistributedApplicationEventing.cs:line 69
         at Aspire.Hosting.Orchestrator.ApplicationOrchestrator.OnResourceStarting(OnResourceStartingContext context) in /_/src/Aspire.Hosting/Orchestrator/ApplicationOrchestrator.cs:line 133
         at Aspire.Hosting.Dcp.DcpExecutorEvents.PublishAsync[T](T context) in /_/src/Aspire.Hosting/Dcp/DcpExecutorEvents.cs:line 33
         at Aspire.Hosting.Dcp.DcpExecutor.<>c__DisplayClass74_0.<<StartResourceAsync>g__StartExecutableOrContainerAsync|0>d`1.MoveNext() in /_/src/Aspire.Hosting/Dcp/DcpExecutor.cs:line 1595
      --- End of stack trace from previous location ---
         at Aspire.Hosting.Dcp.DcpExecutor.StartResourceAsync(IResourceReference resourceReference, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Dcp/DcpExecutor.cs:line 1538

EXPECTED
No notification errors displayed when starting the project.

@davidfowl davidfowl added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Feb 6, 2025
@davidfowl davidfowl added this to the 9.1 milestone Feb 6, 2025
@davidfowl
Copy link
Member

@JamesNK can you look at this one.

@JamesNK
Copy link
Member

JamesNK commented Feb 6, 2025

Isn't it this: #7186

Your WaitForBehavior PR is already addressing it.

@danmoseley
Copy link
Member

closing as dupe as it seems so

@ymmendoza
Copy link
Author

I verified this issue on Aspire 9.1.0-preview.1.25111.2. I can no longer reproduce it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
Projects
None yet
Development

No branches or pull requests

4 participants