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

Can't connect to functions shell when hosting emulator is running #3210

Closed
Hacksore opened this issue Mar 14, 2021 · 5 comments · Fixed by #3223
Closed

Can't connect to functions shell when hosting emulator is running #3210

Hacksore opened this issue Mar 14, 2021 · 5 comments · Fixed by #3223
Labels

Comments

@Hacksore
Copy link

[REQUIRED] Environment info

firebase-tools: 9.6.1

Platform: macOS

[REQUIRED] Test case

A project with all the emulators enabled (hosting, pubsub, functions, database, ui) - a good example is https://github.com/Hacksore/firebase-shell-bug

[REQUIRED] Steps to reproduce

See: https://github.com/Hacksore/firebase-shell-bug/blob/master/README.md

[REQUIRED] Expected behavior

I should be able to get the functions shell REPL while the hosting emulator is running.

[REQUIRED] Actual behavior

When all emulators are running via firebase emulators:start you will get a connection error when attempting to firebase functions:shell

Error: Port 5000 is not open on localhost, could not start functions emulator.
@samtstern
Copy link
Contributor

@Hacksore have you tried passing the --port argument to choose a different port? firebase functions:shell --port 5001 should do it.

@samtstern samtstern added the Needs: Author Feedback Issues awaiting author feedback label Mar 15, 2021
@Hacksore
Copy link
Author

@samtstern I did indeed try when the emulators are running and it yielded no success.

firebase functions:shell --port 5001

Error: Port 5001 is not open on localhost, could not start functions emulator.

Having trouble? Try firebase [command] --help

@google-oss-bot google-oss-bot added Needs: Attention and removed Needs: Author Feedback Issues awaiting author feedback labels Mar 15, 2021
@samtstern
Copy link
Contributor

samtstern commented Mar 15, 2021 via email

@Hacksore
Copy link
Author

Hacksore commented Mar 15, 2021

What if you do 5002?

This does work and I was able to get to the shell. Should this be required to do explicitly or is this a bug in the CLI?

@samtstern
Copy link
Contributor

@Hacksore I'd say a bit of both. We should probably scan for a free port when running the shell instead of failing fast.

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

Successfully merging a pull request may close this issue.

3 participants