question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Port 8080 is not open, could not start firestore emulator.

See original GitHub issue

[REQUIRED] Environment info

firebase-tools: 7.6.1

Platform: macOS Mojave 10.14.6

[REQUIRED] Test case

🤷‍♂ It needs to work or my functions can’t query the firestore to get my data…

[REQUIRED] Steps to reproduce

Run the following command: firebase serve --only firestore

[REQUIRED] Expected behavior

Expected behavior is to have the firestore emulated locally so I can preview my project before pushing it live.

[REQUIRED] Actual behavior

The server refuses to start because it claims that Port 8080 is not open despite the fact that I’m not using that port, I’m using 5000.

It worked fine about 3 weeks ago before I went on vacation, but today when I returned to work, it’s refusing.

PAR-MBP-K:functions oesterkilde$ firebase serve --only firestore --debug
[2019-10-21T13:53:26.421Z] ----------------------------------------------------------------------
[2019-10-21T13:53:26.424Z] Command:       /Users/oesterkilde/.nvm/versions/node/v10.16.0/bin/node /Users/oesterkilde/.nvm/versions/node/v10.16.0/bin/firebase serve --only firestore --debug
[2019-10-21T13:53:26.424Z] CLI Version:   7.6.1
[2019-10-21T13:53:26.424Z] Platform:      darwin
[2019-10-21T13:53:26.424Z] Node Version:  v10.16.0
[2019-10-21T13:53:26.425Z] Time:          Mon Oct 21 2019 15:53:26 GMT+0200 (Central European Summer Time)
[2019-10-21T13:53:26.425Z] ----------------------------------------------------------------------
[2019-10-21T13:53:26.425Z] 

Error: Port 8080 is not open, could not start firestore emulator.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Kosai106commented, Oct 21, 2019

Out of frustration I mistyped my command and wrote firebase serve instead of yarn serve (Which is aliased as firebase serve --only firestore) and somehow it works… I just spent 7 hours trying to get this to work.

1reaction
samtsterncommented, Oct 23, 2019

@Kosai106 firebase serve was originally a hosting-only command and before we came up with emulators:start we tried to bolt some emulator functionality onto serve. So, if I remember correctly, firebase serve by default starts only the Hosting and Functions emulators while firebase serve --only firestore (or --only database) is an opt-in command that will start the Firestore or Realtime Database emulators. Each emulator has its own port and this is why you only saw 8080 coming into play with you added the --only command.

I would recommend using emulators:start going forward I think you will find the behavior clearer. We are trying to make this recommendation more apparently in https://github.com/firebase/firebase-tools/pull/1732

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to connect to firebase emulator suite with exec
i Stoppping emulator hub ⚠ Port 8080 is not open on localhost, could not start firestore emulator. i To select a different host/port...
Read more >
Install, configure and integrate Local Emulator Suite - Firebase
If you don't configure these settings, the emulators will listen on their default ports, and the Cloud Firestore, Realtime Database and Cloud Storage...
Read more >
The Full Guide on how to use the Firebase Emulator for the Web
Remember, you can always check what ports you're using opening the firebase.json file. Once that's ready, make sure both the Firestore and Authentication ......
Read more >
Firebase Emulator で 8080 ポートにアクセスできない - Zenn
Error : TIMEOUT: Port 8080 on localhost was not active within 30000ms · Issue #2379 · firebase/fireba ... Node のバージョンを 16 に下げたら問題なく ...
Read more >
Firebase - Functions Emulator Error - 대부류 - [Dev u Ryu]
functions: The following emulators are not running, ... Port 8080 is not open on localhost, could not start Firestore Emulator. This error ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found