Port 5001 is not open on localhost, could not start Functions Emulator
See original GitHub issue[REQUIRED] Environment info
npm 6.13.7 node v12.11.1
firebase-tools: 8.4.3
Platform: mac os Catalina 10.15.5
[REQUIRED] Test case
- none
[REQUIRED] Steps to reproduce
firebase init (install firestore and functions) firebase emulators:start
[REQUIRED] Expected behavior
Firestore and Functions emulators should start
[REQUIRED] Actual behavior
Only Firestore starts, Functions emulator fails:
`$ firebase emulators:start --debug
[2020-06-28T17:43:53.149Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[2020-06-28T17:43:53.150Z] > authorizing via signed-in user
i emulators: Starting emulators: functions, firestore {"metadata":{"emulator":{"name":"hub"},"message":"Starting emulators: functions, firestore"}}
⚠ hub: emulator hub unable to start on port 4400, starting on 4401 instead. {"metadata":{"emulator":{"name":"hub"},"message":"emulator hub unable to start on port 4400, starting on 4401 instead."}}
[2020-06-28T17:43:53.173Z] [hub] writing locator at /var/folders/c1/vlr0jfwj3rn2rsfnp3ztlyjm0000gn/T/hub-practicelyapp.json
i emulators: Shutting down emulators. {"metadata":{"emulator":{"name":"hub"},"message":"Shutting down emulators."}}
i hub: Stopping emulator hub {"metadata":{"emulator":{"name":"hub"},"message":"Stopping emulator hub"}}
⚠ functions: Port 5001 is not open on localhost, could not start Functions Emulator. {"metadata":{"emulator":{"name":"functions"},"message":"Port 5001 is not open on localhost, could not start Functions Emulator."}}
⚠ functions: To select a different host/port, specify that host/port in a firebase.json config file:
{
// ...
"emulators": {
"functions": {
"host": "HOST",
"port": "PORT"
}
}
} {"metadata":{"emulator":{"name":"functions"},"message":"To select a different host/port, specify that host/port in a firebase.json config file:\n {\n // ...\n \"emulators\": {\n \"functions\": {\n \"host\": \"\u001b[33mHOST\u001b[39m\",\n \"port\": \"\u001b[33mPORT\u001b[39m\"\n }\n }\n }"}}
i emulators: Shutting down emulators. {"metadata":{"emulator":{"name":"hub"},"message":"Shutting down emulators."}}
Error: Could not start Functions Emulator, port taken.`
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Firebase serve error: Port 5000 is not open. Could not start ...
first, close all tab restart VS code then just go in firebase.json file then change ui port ...
Read more >[Solved] Port 5000 is not open, could not start functions emulator
Firebase is a backend platform to build web, mobile apps. If you get the following error message "Port 5000 is not open, could...
Read more >Port 8080 is not open on localhost, could not start Firestore ...
This error is because of the failed quitting from firebase emulator. You already have the process of previous firebase emulator.
Read more >Run functions locally | Cloud Functions for Firebase - Google
Run functions locally · On this page · Install the Firebase CLI · Set up admin credentials (optional) · Set up functions configuration...
Read more >how do u solve this error in firebase "Port 5000 is not open ...
how do u solve this error in firebase "Port 5000 is not open on localhost, could not start functions emulator.".
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@julianiaccopucci the problem and solution are both inside of the error message you posted. Port 5001 is busy on your machine so you need to choose another port. To do this, add an entry in your
firebase.json
like this:This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information.