firebase-tools
firebase-tools copied to clipboard
Painfully slow emulator start if no network is available
[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.
https://github.com/firebase/firebase-tools/blob/9e524c18f4038dfcadbab637c9f661165feb1753/src/deploy/functions/runtimes/node/versioning.ts#L62
[REQUIRED] Expected behavior
The emulator actually starts in a reasonable amount of time.
[REQUIRED] Actual behavior
The emulator does not start in < 60s.
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.
@bkendall @inlined what do you think? I created also PR #5055