'Firebase Functions v.9 - Internal Error after using connectFunctionsEmulator()
I'm trying to setup Emulator for my firebase functions but I receive this annoying internal error. Let's begin with code.
const requestApi = () => {
const functions = getFunctions(app);
connectFunctionsEmulator(functions, "127.0.0.1", 5001);
const helloWorld = httpsCallable(functions, "helloWorld");
helloWorld()
.then((result) => {
console.log(result);
})
.catch((error) => {
console.log(error.message, error.code, error.details);
});
};
So this function works great, except when I add connectFunctionsEmulator(functions, "127.0.0.1", 5001); to it.
The catch block logs only this useless message.
internal functions/internal undefined
I also receive warning about Timer.
Setting a timer for a long period of time, i.e. multiple minutes, is a performance and correctness issue on Android as it keeps the timer module awake, and timers can only be called when the app is in the foreground. See https://github.com/facebook/react-native/issues/12981 for more info. (Saw setTimeout with duration 70000ms)
That's all. Pretty strange, isn't it :/ ?
-- Cloud Function
exports.helloWorld = functions.https.onRequest(async (req, res) => {
res.json({ result: `Check` });
});
I add this here cause someone can be curious about this. But, as I mentioned before, function work great when it's deployed. I'm almost sure that it's client side issue.
I receive this error no matter what host or port has been provided. Error is thrown even when Emulator is off.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
