Open stemarco opened 4 months ago
I've started reading the emulator code hoping to find a signal that could bring export back to life. If I follow correctly, the update message is emitted only on process.exit
, but the emulator is still running. It seems the file hub-PROJECT-NAME.json in os.tmpdir()
is getting deleted on this signal. Copying a new json file with the content {"version":"13.1.0","origins":["http://127.0.0.1:4400","http://[::1]:4400"]}
restores exports. This json was copied fom an instance running emulator v12.3.1, but localhost:4400 has the following slightly different json:
{
"version": "13.1.0",
"origins": [
"http://127.0.0.1:4400",
"http://[::1]:4400"
],
"host": "127.0.0.1",
"port": 4400
}
Untested, but I think this should work to restore the hub file of a running emulator:
wget -O $(node -e "console.log(os.tmpdir())")/hub-PROJECT-NAME.json http://localhost:4400/
Just noticed this issue was filed under firebase-tools-ui instead of firebase-tools. Can it be moved?
Describe the bug The emulator export script will on occassion not find a running emulator even though the emulator is still running.
This error seems to correlate to periodic update checks
To Reproduce
firebase emulators:export --force ./forced-backup
Expected behavior The script should print the following each time it runs:
Screenshots 1)
2) after update
Desktop (please complete the following information): Ventura 13.6 uname -a: Darwin stp.local 22.6.0 Darwin Kernel Version 22.6.0: Fri Sep 15 13:41:28 PDT 2023; root:xnu-8796.141.3.700.8~1/RELEASE_ARM64_T6000 arm64
Example Save Script (MacOS):