All Questions
3,010 questions
0
votes
2
answers
38
views
FCM push notification error: code: 'messaging/invalid-payload
I'm trying to implement FCM push notifications in a react.js app using Firebase Realtime Database Cloud functions, for the first time and stuck at this:
error: Message must be a non-null object
I've ...
0
votes
1
answer
39
views
Imported modules becoming undefined in TypeScript Firebase Functions
I'm using Firebase Functions in TS. When executing npm run-script build and starting the emulator, here's what it throws:
TypeError: Cannot read properties of undefined (reading 'user')
at Object.&...
0
votes
0
answers
25
views
Unable to get the context.uid from the Flutter client side to reach the Cloud Functions
Problem
The getPotentialMatches Cloud Function in my Firebase project fails with the error User must be authenticated because context.auth is consistently undefined. The client sends a valid token, ...
0
votes
1
answer
47
views
Declaring Firebase auth trigger error: "TypeError: Cannot read properties of undefined (reading 'user')"
I am trying to create a firebase function that essentially listens to an event where a user created using the firebase authentication and then it creates a new record in the real time database where ...
0
votes
1
answer
33
views
unable to get document data of onDocumentCreated
i'm trying to convert my firebase cloud functions from 1st Gen to 2nd Gen and i can't get the data out of the snapshot typically referred to as event. There must be a simple fix that i'm missing.
In ...
0
votes
1
answer
43
views
What does a triggering event for testing a (1st gen) Firestore triggered Cloud Function look like?
I have a (1st gen) Cloud (Run) Function that is triggered by a document being created in Firestore. I want to test this function with the TESTING functionality that is built into the Google Cloud ...
0
votes
0
answers
19
views
Deploying Firebase user().onCreate() Function, undefined 'user' error [duplicate]
This is my index.js file:
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp();
exports.createUser = functions.auth.user().onCreate((user) =...
1
vote
0
answers
26
views
Parameters of a function wrongly transmitted to firebase functions
exports.createUserProfileManual = functions.https.onCall(async (
data, context) => {
// Validate the data
const {uid, email} = data;
if (!uid || !email) {
throw new functions.https....
0
votes
1
answer
52
views
ERR_NETWORK_IMPORT_DISALLOWED when I run `firebase emulators:start`
I am implementing a payment gateway. I am using Firebase Cloud Functions to run these APIs. I have a functions folder that has my functions and everything is set up for them. I am emulating the ...
2
votes
2
answers
105
views
firebase-functions has no exported member 'auth' [duplicate]
This piece of code is watching for the user auth event:
export const onUserAuthenticated = auth.user().onCreate(async (userRecord) => {
const adminFirestore = getFirestore();
...
package.json
&...
0
votes
1
answer
90
views
Firebase Functions "TypeError: Cannot read properties of undefined (reading 'document')" Despite Correct Imports
I'm encountering a persistent "TypeError: Cannot read properties of undefined (reading 'document')" error when deploying my Firebase Cloud Functions, even though my import statements and ...
0
votes
0
answers
35
views
Firestore return 2 collection event instead the one specified in the OnDocumentCreated function
I have a structure with 2 collections course and partial_ingredients.
I deployed the function that when a new document is created in the course collection, it will take the partial information and do ...
0
votes
1
answer
53
views
How do I fix Firebase Functions CORS error for PaymentMethodManager on my React app?
I have a React application with Stripe payments. Under the payments tab in settings I want users to be able to view, add, edit, and remove their payment methods. To accomplish this, my front end calls ...
-1
votes
2
answers
137
views
How do I solve this 401 error whenever I run my firebase functions?
I don't have any software experience, I just started using AI to build something for myself in late November. I'm working with a React web app and I'm trying to deploy it in production. I'm trying to ...
0
votes
1
answer
62
views
Using asynchronous tasks and batch updates at the same time
I have a react native app connected to Firestore. I also use Cloud Functions to send notifications to each users. The following code works but I recently encountered timeout errors (even with 540 ...