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
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
Run the emulator
Run a script that periodically calls firebase emulators:export --force ./forced-backup
Wait
Expected behavior
The script should print the following each time it runs:
i Found running emulator hub for project PROJECT_NAME at http://127.0.0.1:4400
i Exporting data to: PATH/forced-backup
✔ Export complete
Screenshots
1)
...multiple save messages
╭───────────────────────────────────────────────────────────────────╮
│ │
│ Update available 13.0.2 → 13.1.0 │
│ To update to the latest version using npm, run │
│ npm install -g firebase-tools │
│ For other CLI management options, visit the CLI documentation │
│ │
│ │
│ │
╰───────────────────────────────────────────────────────────────────╯
Error: Did not find any running emulators for project PROJECT_NAME.
after update
...multiple save messages
Error: Did not find any running emulators for project grazeful-demo.
╭───────────────────────────────────────────────────────────────────╮
│ │
│ Update available 13.1.0 → 13.3.1 │
│ To update to the latest version using npm, run │
│ npm install -g firebase-tools │
│ For other CLI management options, visit the CLI documentation │
│ │
│ │
│ │
╰───────────────────────────────────────────────────────────────────╯
Error: Did not find any running emulators for project PROJECT_NAME.
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):
#!/bin/shwhile:do
firebase emulators:export --force ./emulator-backup
if [ $?-eq 0 ];thenecho"saved"else
osascript -e 'display notification "Save Failed" with title "Failed"'fi
sleep 3600
done
The text was updated successfully, but these errors were encountered:
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:
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/
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)
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):
The text was updated successfully, but these errors were encountered: