Closed
Description
[REQUIRED] Describe your environment
- Operating System version: MacOS Catalina 10.15.5
- Browser version: Chrome 83.0.4103.116
- Firebase SDK version: 7.15.5
- Firebase Product: Functions
- Issue persists with Node 12.18.1 and 14.4.0
[REQUIRED] Describe the problem
Steps to reproduce:
This is a continuation from issue #2746, and I'm experiencing the same deadline-exceeded
error even after Promise.race successfully returns a promise (as evidenced by the callable function returning data as I expect).
Function Relevant Code: [Typescript]
import * as functions from "firebase-functions";
import * as admin from "firebase-admin";
admin.initializeApp();
export const helloUser = functions.https.onCall((data, context) => {
if (context.auth) {
return { response: "There's a user!", data };
} else {
throw new functions.https.HttpsError("permission-denied", "You must be logged in.");
}
});
Frontend (React)
async function testFunction() {
try {
let functionTest = functions.httpsCallable("helloUser");
let response = await functionTest();
console.log(response);
} catch (error) {
console.log(error);
}
}