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

Angular process started with AddNpmApp does not stop when host stops or when stop button is clicked on MacOS #6749

Open
1 task done
danroot opened this issue Nov 21, 2024 · 0 comments

Comments

@danroot
Copy link

danroot commented Nov 21, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I have an angular app set up in Aspire and working fine. However when I shut down the app host, the process is not stopped. When the app host is run again, a second process is started. Looking in Activity Manager, I see multiple 'ng serve' tasks. After repeated app host restarts, before I realized the cause, this has even resulted in out-of-memory issues on my laptop (M1 mac).

In addition, clicking 'stop' in the Aspire dashboard for the resource does not result in the process stopping. The UI shows 'command stop successful', and the resource log shows "Successfully executed command 'resource-stop'." The App Host log shows:

fail: Aspire.Hosting.Dcp.dcpctrl.os-executor[0]
      could not stop root process       {"root": 97599, "error": "context deadline exceeded"}
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
      could not stop the Executable     {"Executable": {"name":"spike-angularaspire-ui-ymchkcks"}, "Reconciliation": 11, "RunID": "97599", "error": "context deadline exceeded"}

App host

 builder.AddNpmApp("mycompany-project-webui", "../MyCompany.Project.WebUI", scriptName:"aspire-osx")
    .WithReference(api)
    .WithHttpsEndpoint(44304,env:"PORT")
    .WithExternalHttpEndpoints();

package.json:

 "aspire-osx": "ng serve --port $PORT --configuration=local",

Expected Behavior

Stopping the app host or clicking stop stops the process.

Steps To Reproduce

https://github.com/danroot/Spike.AngularAspire

I ran this in windows environment also and it behaved as expected, stopping the angular proces.

Exceptions (if any)

fail: Aspire.Hosting.Dcp.dcpctrl.os-executor[0]
      could not stop root process       {"root": 97599, "error": "context deadline exceeded"}
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
      could not stop the Executable     {"Executable": {"name":"spike-angularaspire-ui-ymchkcks"}, "Reconciliation": 11, "RunID": "97599", "error": "context deadline exceeded"}

.NET Version info

.NET SDK:
Version: 9.0.100
Commit: 59db016f11
Workload version: 9.0.100-manifests.3068a692
MSBuild version: 17.12.7+5b8665660

Runtime Environment:
OS Name: Mac OS X
OS Version: 14.2
OS Platform: Darwin
RID: osx-arm64
Base Path: /usr/local/share/dotnet/sdk/9.0.100/

Anything else?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant