firebase / firebase/firebase-tools
Improper dart functions initialization in emulator
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 84
Description
### [REQUIRED] Environment info
**firebase-tools:** 15.16.0
**Platform:** macOS
### [REQUIRED] Test case
```dart
import 'package:firebase_functions/firebase_functions.dart';
void main(List args) {
fireUp(args, (firebase) {
firebase.https.onRequest(
name: 'helloWorld',
(_) async => Response(200, body: 'Hello from Dart Functions!'),
);
});
}
void byeWorld(Firebase firebase) {
firebase.https.onRequest(
name: 'byeWorld',
(_) async => Response(200, body: 'Goodbye from Dart Functions!'),
);
}
```
### [REQUIRED] Steps to reproduce
1. Run sample code with `firebase emulators:start`
2. See both `helloWorld` and `byeWorld` are initialized
3. Open the url for `byeWorld` function in a browser
4. See below message:
```
Function not found: bye-world
Available functions: hello-world
```
### [REQUIRED] Expected behavior
Only `helloWorld` should be initialized
### [REQUIRED] Actual behavior
Both `helloWorld` and `byeWorld` are initialized.
```
✔ functions[us-central1-hello-world]: http function initialized (http://127.0.0.1:5001/demo-no-project/us-central1/hello-world).
✔ functions[us-central1-bye-world]: http function initialized (http://127.0.0.1:5001/demo-no-project/us-central1/bye-world).
```
Contributor guide
Assessment
This issue has not been assessed yet.