firebase / firebase/firebase-tools
Can't test HTTPS Callable functions against Emulator firestore/auth
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 84
Description
### [REQUIRED] Environment info
**firebase-tools:** 9.2.2
**Platform:** macOS
### [REQUIRED] Test case
When functions are started using functions:shell command, they don't seem to know that firestore and auth emulators are running, therefore they affect production.
### [REQUIRED] Steps to reproduce
1. Start firebase emulators with the following command: ```firebase emulators:start --only firestore,auth --import=backups/data/emulator-exit-data``` (i.e. without functions)
2. Start functions using: ```firebase functions:shell```
3. Run a function inside the functions shell CL: ```main.createProfile({uid: '8DFFrqmP52TAPYCTGxl6KGny9kF5', fullName:'chris', username:'new', location:'here'})```
4. Get the following response:
```
Sent request to function.
firebase > ⚠ functions: The Firebase Authentication emulator is not running, so calls to Firebase Authentication will affect production.
⚠ functions: The Cloud Firestore emulator is not running, so calls to Firestore will affect production.
⚠ Google API requested!
- URL: "https://oauth2.googleapis.com/token"
- Be careful, this may be a production service.
```
### [REQUIRED] Expected behavior
Expect that the functions will still be able to use the emulator firestore and auth.
### [REQUIRED] Actual behavior
functions use production instead
Contributor guide
Assessment
This issue has not been assessed yet.