You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
firebase serve Error: TIMEOUT: Port 5001 on localhost was not active within 5000ms #7091
Execute firebase init with Firestore, Function, Hosting and Storage enabled.
[REQUIRED] Steps to reproduce
Open the command line interface (CLI).
Navigate to the root directory of the Firebase project.
Execute the command firebase serve.
[REQUIRED] Expected behavior
The Firebase development server starts successfully within a reasonable time frame.
[REQUIRED] Actual behavior
[info] i hosting[foo]: Serving hosting files from: public {"metadata":{"emulator":{"name":"hosting"},"message":"Serving hosting files from: \u001b[1mpublic\u001b[22m"}}
[info] ✔ hosting[foo]: Local server: http://localhost:5000 {"metadata":{"emulator":{"name":"hosting"},"message":"Local server: \u001b[4m\u001b[1mhttp://localhost:5000\u001b[22m\u001b[24m"}}
[error]
[error] Error: TIMEOUT: Port 5001 on localhost was not active within 5000ms
Hey folks, thanks for reaching out, sorry to hear you encountered this issue. I’m currently working on replicating this but so far I haven’t encountered any errors with starting the emulators.
Could anyone share the emulators section of their firebase.json file so that I can try to reproduce this locally? In addition, to help us narrow what could be causing the issue, could you try downgrading to firebase-tools v13.7.5 to see if you’d be able to run the emulators?
Reacted by Jack Lawrence-Jones and Stanley Illidge
Upon further investigation, I've encountered a persistent compatibility issue between Firebase Serve and TCP6 in my environment. Specifically, while Firebase Serve listens on TCP6, my environment does not fully support TCP6 connections.
Before utilizing the -o 0.0.0.0 flag, the netstat -l command revealed the following:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp6 0 0 localhost:5001 [::]:* LISTEN
tcp6 0 0 localhost:5000 [::]:* LISTEN
However, by employing the -o flag and specifying 0.0.0.0, I managed to execute Firebase Serve as a workaround. Nonetheless, it's crucial to acknowledge that this workaround merely masks the issue and does not address the underlying compatibility issue:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:5001 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5000 0.0.0.0:* LISTEN
Para mi tambien funciono usar la version npm i -g [email protected] de la CLI, pero tambien tuve que cambiar la variable de sistema JAVA_TOOL_OPTIONS -Xmx10240m
Activity
jacklj commentedon May 2, 2024
We're having the same issue on CI only, when starting the emulators with
firebase emulators:exec:N.B. setting the host in firebase.json explicitly didn't work, as suggested here: #2379 (comment)
aalej commentedon May 2, 2024
Hey folks, thanks for reaching out, sorry to hear you encountered this issue. I’m currently working on replicating this but so far I haven’t encountered any errors with starting the emulators.
Could anyone share the
emulatorssection of theirfirebase.jsonfile so that I can try to reproduce this locally? In addition, to help us narrow what could be causing the issue, could you try downgrading to firebase-tools v13.7.5 to see if you’d be able to run the emulators?jacklj commentedon May 2, 2024
We've downgraded to
13.7.5and seems promising so far, just running our test suite again as it could have been a fluke.From our
firebase.json:Thanks for your help @aalej :)
jacklj commentedon May 2, 2024
Yes that seems to have worked :)
RaheutRahwana commentedon May 2, 2024
@aalej
Unfortunately, I didn't enable the emulator during
firebase initas usual.RaheutRahwana commentedon May 3, 2024
Dear @aalej @leemhenson
Upon further investigation, I've encountered a persistent compatibility issue between Firebase Serve and TCP6 in my environment. Specifically, while Firebase Serve listens on TCP6, my environment does not fully support TCP6 connections.
Before utilizing the -o 0.0.0.0 flag, the
netstat -lcommand revealed the following:However, by employing the -o flag and specifying 0.0.0.0, I managed to execute Firebase Serve as a workaround. Nonetheless, it's crucial to acknowledge that this workaround merely masks the issue and does not address the underlying compatibility issue:
Warm regards.
stanleyillidge commentedon May 7, 2024
Para mi tambien funciono usar la version npm i -g [email protected] de la CLI, pero tambien tuve que cambiar la variable de sistema JAVA_TOOL_OPTIONS -Xmx10240m
Thanks for your help @aalej :)