-
-
Notifications
You must be signed in to change notification settings - Fork 233
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
SIGINT is sent twice when pressing Ctrl-C, causing dirty shutdown #283
Comments
Any ideas on this? |
@alimony I have seen this, but wasn't considering It may well be. In that case, debugging it means having a project with Firebase CLI and concurrently both in the mix. Maybe we should create a minimal project that showcases this? I can reproduce it:
macOS 11.4, |
I'll create a minimal test case. |
I can provide a reproducible, negative test case.
Tried ~6 times, not a single time there is I'll try to compare with my other project, where I do see these, and try to spot the difference.
macOS 11.4 |
The positive case comes here. If I launch: concurrently -> Docker -> Firebase CLI (which I do in a web app project, all the time), the double Ctrl-C occurs.
Detailed log
Note: This is just my 2c. I am not really troubled by this error message, since if running things under Docker, things get cleaned up, anyhow. |
I have not been able to create a small test case that consistently shows this error, but I have discovered that skipping the pubsub emulator makes the error go away. For example, using this:
will send SIGINT twice when quitting concurrently, while this:
will not. |
Hi, I have the same problem and investigated a little bit. It looks like |
hi there! However, if my I can't use full command in scripts since I construct // package.json
"scripts": {
"firebase:emulators": "firebase emulators:start",
} and then call the command via
for me this is a legit workaround, hope it helps someone else |
Running into this problem myself, here's a bit from my "scripts": {
"build": "tsc",
"build:watch": "tsc -w",
"format": "prettier --write src/**/*.ts",
"emulate": "firebase emulators:start --import=./emulator-data --export-on-exit",
"serve": "concurrently 'npm run build:watch' 'npm run emulate'"
}, If I run |
Hey all. I've briefly looked at this today, it seems that @akauppi it seems you did a fair amount of research in firebase/firebase-tools#3578. I see people mentioned the removal of things like passing |
@gustavohenke I moved from |
Same issue with firebase export |
A solution i came up with is like this: {
"emulator-start": "./node_modules/.bin/firebase emulators:start --import=emulatorData/localEmulatorData --export-on-exit=emulatorData/localEmulatorData",
"start": "npm run emulator-start & npm run start-servers",
"start-servers": "concurrently -c gray.dim --kill-others \"npm run api\" \"npm run scheduler\""
} |
@jakeleventhal So you just replaced My understanding is that the |
@jasonkylefrank kind of - i am running the emulators outside of as for windows - i don't use windows so idk lol |
I noticed this today as now I can't exit the shell with pressing running Adding docker to mix with
concurrently process seems to be stuck itself so I cant exit the shell anymore |
I'm also have this problem that double SIGINT cause emulator unable to export on exit gracefully. |
This comment was marked as off-topic.
This comment was marked as off-topic.
I think this may be due to Concurrently's use of I wanted to verify this by writing a minimal wrapper for the Concurrently API and passing |
I have a
package.json
with the following scripts:Running the
emulate
script works as expected, but pressing Ctrl-C to shut the processes down gives me this:So for some reason, a second SIGINT is sent to the
firebase
command specified in the first script. How come?The text was updated successfully, but these errors were encountered: