-
Notifications
You must be signed in to change notification settings - Fork 900
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
Port 5000 not actually in use #4628
Comments
Good catch, we could achieve this by appending The main purpose of this is to actually catch control center's use of port 5000, which Node is not detecting. |
Yeah that does appear to work:
|
I've been running into this annoyance multiple times per day when switching between different projects so submitted a quick PR to fix. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[REQUIRED] Environment info
firebase-tools: 11.0.1
Platform: macOS 12.3.1
[REQUIRED] Test case
Run
firebase serve
shortly after killing a previous run of the hosting emulator (and while Google Chrome still has a window open onlocalhost:5000
)[REQUIRED] Steps to reproduce
firebase serve
in cli window, wait for emulator to start up, connect in google chrome, ctrl-c, up arrow, enter in terminal window to restart emulator.[REQUIRED] Expected behavior
Emulator starts back up on port 5000
[REQUIRED] Actual behavior
Emulator starts on port 5005 with
Additional Context
#4415 from @jamesdaniels added checking on OSX for available ports using
lsof -i :${port}
but this needs to be filtered down toLISTEN
connections. Google Chrome shows up in this for a bit after the emulator is terminated with connections in aCLOSED
state:Port 5000 is available to
LISTEN
in this scenario.When the emulator is running, the output looks like this instead:
It's really the
node
processLISTEN
ing on port5000
that we care about, not theCLOSED
connections but the output is just being checked to see if lsof errored, not checking its output for whether the port is actually available or not.The text was updated successfully, but these errors were encountered: