Currently, my project is utilizing the Vue framework. I have integrated Firebase services, including Firestore, realtime database, triggered cloud functions, and onCall functions. Everything was functioning properly until recently when all of the callable functions suddenly stopped working. Whenever I try to invoke a callable function, the code breaks, and an unusual error appears in the console. Strangely, the Firebase functions logs do not show any activity, indicating that the function doesn't even start.
The error message displayed is as follows:
TypeError: Cannot use 'in' operator to search for 'Notification' in undefined
at ContextProvider.eval (index.esm.js?10fa:207)
at step (tslib.es6.js?40cb:102)
at Object.eval [as next] (tslib.es6.js?40cb:83)
at eval (tslib.es6.js?40cb:76)
at new Promise (<anonymous>)
at __awaiter (tslib.es6.js?40cb:72)
at ContextProvider.getInstanceIdToken (index.esm.js?10fa:204)
at ContextProvider.eval (index.esm.js?10fa:232)
at step (tslib.es6.js?40cb:102)
at Object.eval [as next] (tslib.es6.js?40cb:83)
The specific error involving the "'in' operator to search for 'Notification' in undefined" is within the Firebase code located in the node modules.
edit:
Below is the code snippet of the local function calling the cloud function:
async send(index) {
...
await serv_inviteMatch({invitation, myId:myUser.answers.id,
matchId:this.user.answers.id})
}
Code snippet from firebase/functions.js:
import Firebase from "firebase/app";
import 'firebase/functions';
...
export const serv_inviteMatch = Firebase.functions().httpsCallable('inviteMatch');
Code snippet from functions/index.js:
exports.inviteMatch = functions.https.onCall(async (invitationData) =>{...})