-
Notifications
You must be signed in to change notification settings - Fork 984
Closed
Description
[REQUIRED] Describe your environment
- Operating System version: MACOS 11.5
- Browser version: N/A
- Firebase SDK version: 9.0.0-beta.2
- Firebase Product: functions
[REQUIRED] Describe the problem
A simple node script calling a cloud function (handled by the functions emulator) doesn't terminate, even though I deleted the relevant app. If I remove the function call (line labelled (*)) and the call to deleteApp (line labelled (**)), then the script terminates normally.
Steps to reproduce:
Run the script below. "Done!" is logged too the console, but the process doesn't terminate.
Relevant Code:
let { initializeApp, deleteApp } = require("firebase/app")
let { getFunctions, useFunctionsEmulator, httpsCallable } = require("firebase/functions");
let config = {
// redacted!
};
async function f() {
let app = initializeApp(config)
let fns = getFunctions(app)
useFunctionsEmulator(fns, "localhost", 5001)
let helloWorld = httpsCallable(fns, "helloWorld")
console.log(await helloWorld()) // (*)
await deleteApp(app) // (**)
}
f().then(() => { console.log("Done!") })