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

Painfully slow emulator start if no network is available #5054

Closed
stfsy opened this issue Oct 1, 2022 · 2 comments · Fixed by #5055
Closed

Painfully slow emulator start if no network is available #5054

stfsy opened this issue Oct 1, 2022 · 2 comments · Fixed by #5055
Assignees

Comments

@stfsy
Copy link
Contributor

stfsy commented Oct 1, 2022

[REQUIRED] Environment info

firebase-tools: 11.9.0

Platform: Windows

[REQUIRED] Test case

Disable WIFI / unplug ethernet and start the emulator.

[REQUIRED] Steps to reproduce

Disable WIFI / unplug ethernet and start the emulator. You'll notice the emulator starts very very slowly because the npm command (almost) never returns.

const child = spawn.sync("npm", ["show", "firebase-functions", "--json=true"], {

[REQUIRED] Expected behavior

The emulator actually starts in a reasonable amount of time.

[REQUIRED] Actual behavior

The emulator does not start in < 60s.

@stfsy stfsy added the bug label Oct 1, 2022
@stfsy
Copy link
Contributor Author

stfsy commented Oct 1, 2022

Hi everyone, i've been travelling a lot and noticed the emulator is unusable in the plane when there's no WIFI available. That is because the NPM command only returns after around a minute when no network is available. Quick and easy fix would be to add timeouts to the commands, or run them asynchronously.

@stfsy
Copy link
Contributor Author

stfsy commented Dec 10, 2022

@bkendall @inlined what do you think? I created also PR #5055

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

Successfully merging a pull request may close this issue.

3 participants