firebase / firebase/firebase-tools-ui

Did not find any running emulators for project...

Open
#1,018 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
291
Forks
74
PR merge metrics
No merged PRs in 30d

Description

**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**

1. Run the emulator
2. Run a script that periodically calls `firebase emulators:export --force ./forced-backup`
3. 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.
```

2) 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):
```sh
#!/bin/sh

while :
do
firebase emulators:export --force ./emulator-backup
if [ $? -eq 0 ]; then
echo "saved"
else
osascript -e 'display notification "Save Failed" with title "Failed"'
fi

sleep 3600
done
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.