18,552 questions
2
votes
1
answer
47
views
Firebase Cloud Functions Deployment Fails: " <number>[email protected] not found" after Default Service Account Deletion
Problem:
I'm encountering an error when deploying Firebase Cloud Functions:
Error: <number>[email protected] not found
This error occurred after the default Compute Engine ...
0
votes
0
answers
28
views
Do Firestore Queries save time? [closed]
I'm creating an ecommerce app that has 100+ products. I want to show only 4 featured products on the homescreen.
Now, my question is, whether should I create a separate collection for featured ...
1
vote
3
answers
3k
views
Error: Unexpected end of form > at Multipart._final
This is the first time I'm deploying a NodeJS/ExpressJS API to Firebase functions and I'm getting this error:
Error: Unexpected end of form at Multipart._final (/.../functions/...
0
votes
2
answers
36
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
36
views
GCP Cloud Functions - How to import local scripts outside of cloud function? How to structure projects that use a global config.py file?
I have one giant repo folder which contains many more sub-repos, and each sub-repo contains multiple cloud functions, i.e.
|-repo_master
|-repo_a
|-cloud_function_a
|-....
0
votes
1
answer
25
views
The --update-labels argument of gcloud functions deploy does absolutely nothing
Maybe this is a bug because its suppose to work: https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--update-labels
This command completes without issue:
gcloud alpha functions deploy <...
0
votes
1
answer
985
views
How to auto delete messages on firebase
I'm new to Firebase Cloud Functions.
How can I auto-delete messages in Realtime Database after a certain time? For exemple, 1 minute,1 day etc.
I'm trying to use the sample available here (https://...
0
votes
0
answers
26
views
How to generate the Endpoint URL to cloud functions for push subscriptions on Google Pub/Sub?
I have a Cloud Function (v1) that is set to trigger every time a message is received in a specific topic. This part of the configuration is done correctly (since I've followed previous working cloud ...
0
votes
1
answer
38
views
Google Calendar Push Notification - Body is empty?
I have setup a push notification for calendar events like so:
const response = await calendar.events.watch({
auth: authClient,
calendarId: 'primary',
requestBody: {
id: 'calendar-...
19
votes
9
answers
22k
views
Setting up dotenv in firebase functions
I am trying to move the tiny node-express app I made into Firebase functions.
The files have dotenv variables. Earlier I thought If I just deployed and put the dotenv in dependency, It would work but ...
0
votes
1
answer
36
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
1
answer
25
views
Firebase v2 function loses admin rights
I have a firebase functions file that, in v1, worked perfectly. Upgrading to v2, I use:
const functions = require("firebase-functions/v2");
const admin = require("firebase-admin");
...
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, ...
1
vote
0
answers
63
views
Flutter Firebase Messaging not receiving messages from backend on iOS (works on Android and with Firebase Console)
I'm having an issue with Firebase Cloud Messaging in my Flutter app where:
On iOS: Messages only work when sent via Firebase Console, but not when sent from my backend
On Android: Messages ...
-1
votes
1
answer
351
views
Is it secure to send the user UID to firebase cloud functions
I have a firestore collection and every user has one document. The document name is equal to the user UID.
I write to these documents with a firebase function. So I pass the user UID to this firebase ...