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
Sending intr (ctrl + c / interrupt) to ember serve doesn't fully terminate the app #8969
Comments
@pichfl - Can you help us track this down by providing as close to step by step instructions on reproducing? My guess is that ora isn't being reset properly in all pathways, but a repro will really help. I also use starship for my prompt atm, so hopefully I'll be able to get this to reproduce. |
I've been experiencing this for the last few versions, probably should have reported it, but many of the apps I work on do crazy things so it took me a while to realize I hit it with new apps too. |
I tried in the snippets above, it happens anytime I run an Ember project and stop it via ctrl+c. It doesn't matter if I enable starship or not. I tested bash, zsh, fish. Each with and without starship and each on both Terminal.app and iTerm. If it helps, these are the devDependencies in one of the projects:
|
Have you tried to reproduce it with a new app, so we can understand if that's related to some extra dependency or comes by default? |
Sure. Just did. Happens with a new project as well when using ember-cli @ 3.10, 3.11, 3.12, 3.13 and 3.14 (didn't check canary/betas). |
I've had it on a new app with betas recently |
ok, I found it reproduces to me when I run it via upd: yes, I can see you provide examples with |
Happens using globally installed (using Volta) ember-cli, also. |
Is there any way to help with this? I'm not even sure where to look in the first place. |
In general, I would guess this would be the result of a missign |
Would it be a bad idea to just throw in something like this? process.on('SIGINT', () => {
ui.stopProgress();
}); Edit This might not work on Windows, but I'm not sure if it's a problem there in the first place. |
Does that fix the issue you are seeing? |
No idea, I haven't worked on ember-cli in some time and I do not have it set up for development yet. I just remember using something like that in an internal tool I made years ago. |
I'm pretty sure this is the wrong way of solving this, but it *does* solve ember-cli/ember-cli#8969 to some extend.
Did some digging, made a PR for a possible fix. It's most likely that this is the wrong way of fixing the issue, but I wanted to get it out there so someone can find the correct place. |
If you run serve and wait until the build has completed, this can be triggered when using yarn.
Interesting, when trying to see if this is just a
It may be worth trying a minimal script, that starts of console-ui and kicks of progress on ctrl-c, and ends exists 1s later. Such an isolated example would be useful. |
Can confirm observations by @stefanpenner in a fresh project I started today (ember-cli 3.16.0). |
Same, just had the same experience with a brand new install.
One thing to add — I only used
But leads to a slightly disappointing first experience. Maybe just changing the wording from |
Debugging the same issue again today, this is almost certainly a yarn issue. I don't believe we can do anything from our side here, at-least to address the general case of the parent process not waiting for the child to exit correctly. |
Ya. 😭 I think at this point we should remove the suggestion to use |
Just to give an update on this issue. I’ve just updated everything to the latest versions...
os: darwin x64 And am still getting the same hang when cleaning up
|
This is a simple fix to solve the issue outlined here: ember-cli#8969 @rwjblue recommended this.
This is a simple fix to solve the issue outlined here: ember-cli#8969 @rwjblue recommended this.
The same thing happens when using |
Sending ctrl + c to a running
ember serve
should terminate the server and running ember-cli instance, but for some reason it does not completely clean up after itself and leaves my command prompt in an unfinished state, making it necessary for me to press return to actually get back to my regular prompt.(Ember project runs as expected)
ctrl + c
("❯ " character missing, no more autocompletion from my shell, etc)
I'm using fish, but the same thing happens on zsh and bash, both with my current prompt enabled and disabled.
It's really annoying and I wonder if it breaks more stuff beyond just me having to remember to do the extra key press which resets my prompt like that:
↩
Output from
ember version --verbose && npm --version && yarn --version
:The text was updated successfully, but these errors were encountered: