18,503 questions
0
votes
0
answers
43
views
Firebase Functions Deployment Fails: npm ci Can't Install Packages - package-lock.json Out of Sync Despite Fresh Installation [closed]
I'm trying to deploy a Firebase Cloud Function (2nd gen) but keep getting the same npm ci error about package.json and package-lock.json being out of sync, even after completely deleting and ...
-1
votes
0
answers
52
views
CI/CD in github actions with firebase functions
So I have a simple project of firebase functions, I gonna put here the index:
import { onRequest } from "firebase-functions/v2/https";
import { initializeApp } from "firebase-admin/app&...
0
votes
1
answer
38
views
Firebase Functions v2 onCreate user [duplicate]
I can not for the life of me figure out why this is complaining. I was able to make an onCall function just fine (removed it here)... but when I make a firebase auth onCreate function, the get the ...
1
vote
0
answers
43
views
"permission denied" error in Cloud Function that imports gmail
I'm stuck getting a "permission denied" error when using the gmail googleapi in a firebase cloud function to "import" syntetic emails to a workspace email box.
I've followed this ...
1
vote
1
answer
65
views
GCloud Error: Caller is missing permission 'iam.serviceaccounts.actAs' on service account [closed]
Situation
This is pretty much my first experience with cloud tools. I'm trying to enqueue (schedule) a cloud task from a cloud function which gets called from my flutter app, the task would at the ...
1
vote
0
answers
65
views
Error in firebase cloud functions document trigger using V2 functions: Failed to decode protobuf and create a before snapshot
I am migrating my Firebase Cloud Functions project from v1 to v2.
Since Auth triggers are not yet available in v2, I still have auth triggers in v1 — but all my Firestore triggers are now v2.
All of ...
0
votes
0
answers
48
views
unable to deploy to firebase functions
package.json
{
"name": "functions",
"scripts": {
"lint": "tslint --project tsconfig.json",
"build": "tsc",
"...
0
votes
0
answers
63
views
Google Cloud error 429: The request was aborted because there was no available instance
I have a function in Cloud Run that takes files from a bucket, loads them to BigQuery and then deletes them.
It is activated using the Cloud Scheduler and an HTTP call.
To avoid processing the same ...
0
votes
0
answers
74
views
Unable to list accessible customers with Google Ads API (test acc)
I'm trying to access google ads accounts in js.
Here's how I do the callback mechanism:
...
const { clientId, userId } = JSON.parse(state);
const oauth2Client = new google.auth....
0
votes
0
answers
69
views
multer.memoryStorage() file undefined or Error: unexpected end of form
I'm trying to upload a file to the OpenAI API using Firebase Cloud Functions, Express and Multer. I have a React UI that I'm using to upload a file to my back end to then send to the OpenAI API, but I'...
0
votes
1
answer
41
views
Firebase Cloud Function returns "not-found" error when called from React Native app despite successful deployment
I'm trying to call a Firebase Cloud Function from my React Native Expo app to send invoice emails. The function deploys successfully, but when I call it from the app, I get a FirebaseError: not-found ...
1
vote
0
answers
72
views
Firebase Auth blocking function (Gen-2 / Cloud Run) returns 403 “not authenticated” from Identity Platform, despite Run Invoker granted
I am using Firebase Authentication blocking functions (Gen-2) with Cloud Run services for:
• beforeUserCreated
• beforeUserSignedIn
Problem
When Cloud Run security is set to Require authentication ...
1
vote
1
answer
56
views
Firebase onCall function returning null even though await is there
I was able to successfully send this email with a onRequest call, but I would like to convert these on onCall Firebase calls. Here in my function below.
For the sake of privacy, I removed the company ...
1
vote
0
answers
52
views
Google Apps Script getOAuthToken() times out when calling authenticated Cloud Function, despite all configurations checked
Goal:
I am trying to call a 2nd Gen Google Cloud Function (Python, private/requires authentication) from Google Apps Script (GAS).
The Problem:
The execution consistently fails. When ScriptApp....
0
votes
0
answers
135
views
Google Chat App with a Cloud Run Function - RenderActions and cardsV2 error
I am trying to build a Google Chat App that calls a Cloud Run function as the logic. I am assuming the GCP interfaces must have recently changed/updated because a lot of the guides and troubleshooting ...
1
vote
1
answer
76
views
Why would a firebase HTTP function deploy as a Cloud Run url?
I have a new project that I am just starting to build some Express endpoints for. It deployed with a URL in the format of https://app-[random string].run.app/ instead of the expected format of https:/...
1
vote
0
answers
105
views
Firebase Function Deployment Error: minScale
I can no longer deploy my Firebase functions. Starting sometime last week, my deployments fail with the following error:
"error": {
"code": 400,
"message": "...
0
votes
1
answer
109
views
How to pass auth token from web embedded vertex ai chat agent to playbook
I have created a Vertex AI chat agent and embedded it into the NextJS app using the conversation messenger. Below is the code snippet.
<df-messenger
location="xxxxxxx"
project-id=&...
2
votes
0
answers
122
views
Cloud Function Deployment Error: Instances Bug
I have a set of functions that we run on our QA project, our Staging Project and the Prod project. All the same Code. The exact same code deploys successfully on the QA project and the staging project....
0
votes
0
answers
47
views
Firebase User Auth Triggers Are Forcefully Deployed On us-central1 region
I specified the deployment region of all my v1 CFs to be europe-west1
import * as functions from "firebase-functions";
functions
.region(environment.DEPLOYMENT_LOCATION)
.runWith({
...
0
votes
1
answer
62
views
Publish to @google-cloud/pubsub topic from Firebase sdk is failing
With all nodejs packages updated, trying to publish message to topic ends on timeout with error:
GoogleError: Total timeout of API google.pubsub.v1.Publisher exceeded. Error: Getting metadata from ...
1
vote
1
answer
86
views
androidpublisher.purchases.products.get 401 Login required
Consider 2 Android projects with Firebase backends (identical code for purchase validation with onMessagePublished). First one is working correctly and the second is not.
androidpublisher.purchases....
0
votes
0
answers
17
views
Firebase Cloud Messaging only delivers self-push notifications, not cross-device pushes in Flutter [duplicate]
I’m building a Flutter app with Firebase (Firestore + FCM). Each user has an up-to-date FCM token stored in Firestore. I have verified that tokens are valid, and I can send push notifications ...
0
votes
0
answers
190
views
Is it possible to test concurrent HTTP calls and Firestore side effects in Firebase Cloud Functions (Python, Gen 2)?
My goal is to write tests that:
Simulate multiple concurrent HTTP POST requests to a cloud function endpoint (e.g., 2-3 identical webhooks arriving almost simultaneously).
Verify database side ...
1
vote
0
answers
65
views
Firebase Cloud Function 2nd Gen fail
I have an environment with Node.js in which I run some cloud functions from Firebase. I wanted to try to migrate them to V2, starting with the simplest of them. After changing a couple of lines of ...
0
votes
1
answer
59
views
Firebase Function Creates Stripe "Live" Session Despite Using "Test" Keys
I'm working on a simple order form using a single HTML/React front-end and a Firebase Cloud Function backend to handle Stripe payments. I'm stuck on a persistent issue where my backend function ...
0
votes
1
answer
67
views
React Native Expo App: Firebase Cloud function Call Error: Could not connect to the server
I'm using "@react-native-firebase/firestore": "^23.1.1",
"@react-native-firebase/functions": "23.1.1"
"@react-native-firebase/app": "^23.1.1"...
0
votes
2
answers
82
views
gunicorn.errors.HaltServer: <HaltServer 'App failed to load.' 4> in Google Cloud Run Function
I have deployed a Cloud Run Function and am frequently seeing this error:
2025-08-26 13:08:18.052 PDT DEBUG: False
2025-08-26 13:08:18.052 PDT Type of DEBUG: <class 'bool'>
2025-08-26 13:08:18....
0
votes
1
answer
89
views
Firebase secret manager v2 Function fails with "secretOrPrivateKey must be an asymmetric key when using ES256"
I have a Node.js 20 Cloud Function that uses the Firebase Admin SDK. One of the functions (checkExpiredActivities, a v2 scheduled function - Xcode Live Activity) needs to send an APNs push ...
0
votes
1
answer
96
views
Vertex AI Gemini 1.5 Pro returns 404 Not Found from Cloud Function despite correct IAM, region, and enabled API
I am encountering a persistent 404 Not Found error when attempting to call the gemini-1.5-pro-preview-0409 model from the Vertex AI API within a service in my Google Cloud project. This issue persists ...
0
votes
2
answers
290
views
Google Chat App on Cloud Functions (2nd gen) – response fails
I’m building a very simple Google Chat App on Cloud Functions (2nd gen) (Python). The app should just reply "OK" when I send a message from mail.google.com/chat.
But in the logging error ...
2
votes
1
answer
76
views
Flutter app call to a complex Python Cloud Function times out with no logs, but a simple function works
I'm building a Flutter app and I'm stuck on a very strange issue where a specific Firebase Cloud Function fails to run, while another one works perfectly.
The Goal:
I have a Flutter app that calls a ...
1
vote
1
answer
105
views
Firebase Functions (TypeScript) deploy fails with v2 type errors despite clean install
I'm building a Flutter app with a Firebase Cloud Functions backend using TypeScript. I'm running into persistent TypeScript errors when I try to deploy, even after a complete reinstallation of my ...
4
votes
1
answer
133
views
Firebase Cloud Functions return "internal" error with no logs after moving project in React Native
I have a React Native project using Firebase, and I’m facing an issue with Google Cloud Functions.
After moving my code to a new React Native project, every Cloud Function call returns an "...
6
votes
1
answer
236
views
Why can anyone call my Firebase callable Cloud Function via its HTTPS URL, outside my mobile app?
I have a Firebase project with a mobile app (Flutter) that uses callable Cloud Functions. From the app, I invoke them with the Firebase SDK like this:
const functions = firebase.functions();
const ...
0
votes
0
answers
120
views
401 Unauthenticated Error while calling cloud functions in Google Firebase
When I am trying to call a firebase cloud function from my react.js frontend using the onCall method, I am getting a 401 Error getting reply- User not authenticated error. I know this question has ...
0
votes
0
answers
42
views
Behavior Of Using GlobalOptions Method & Cloud Function Individual Configuration
General Question
If I use both setGlobalOptions() from Firebase Cloud Functions v2 with the CF individual configuration, to inject secrets on runtime. Will the setGlobalOptions() overwrite the ...
0
votes
1
answer
62
views
Firebase Cloud Function fails with "TypeError: func is not a function" on deployment
I'm building a football match prediction system using JavaScript and Firebase. Users can make predictions on match results, and for users who don’t submit a guess, I want to automatically assign a ...
0
votes
1
answer
74
views
How to control order in which functions are displayed in firebase console? [closed]
In the Firebase Console, when showing the list of functions, what determines the order in which the functions are displayed?
I am in the very early stages of a project and already have 16 functions, ...
0
votes
1
answer
79
views
Firebase Functions v2 onCall() returns 401 Unauthorized—even though request.auth is valid and proper IAM role assigned
I’m facing a puzzling issue with a Firebase callable function (onCall) deployed via Cloud Functions v2 (on Cloud Run, Node.js 18/20). Even though:
the client is signed in (getAuth().currentUser is ...
1
vote
1
answer
32
views
Deploy/update file without functions in it - Firebase Functions
I am trying to update a file named blues.cts because a function named fetchAllPacks uses it to update the client. I was wondering if, without updating the functions, I could update the JSON data in ...
0
votes
0
answers
55
views
Unable to load environment variables after upgrading firebase-tools, firebase-admin, and firebase-functions
I recently upgraded to the latest versions of firebase-tools -> 14.10.1, firebase-admin -> 13.4.0, and firebase-functions -> 6.3.2. After the upgrade, I am no longer able to deploy the ...
2
votes
1
answer
69
views
Firebase Cloud Functions: Document deletion not working properly and execution timing issues [closed]
I have two Firebase Cloud Functions with onDocumentCreated triggers. The issue is that when my delete function tries to delete a document that doesn't exist, it somehow triggers the checker function, ...
1
vote
1
answer
60
views
firebase function fails to send push notification with socket disconnect
i am trying to send push notification like below:
const { getFirestore } = require('firebase-admin/firestore');
const { initializeApp } = require('firebase-admin/app');
const { https } = require('...
0
votes
0
answers
48
views
Firebase Cloud Functions FAILED_PRECONDITION error when handling Razorpay webhook with Firestore collection group query
I'm implementing Razorpay webhooks using Firebase Cloud Functions and running into a FAILED_PRECONDITION error when querying Firestore. The webhook handles Razorpay account status updates (activated, ...
1
vote
1
answer
76
views
Google Cloud Function gets 401 Error from Play Developer API despite Admin permissions
I have a Google Cloud Function (v2) written in Node.js/TypeScript that is triggered by a Pub/Sub topic for Google Play Store notifications. The function's goal is to verify a purchaseToken with the ...
0
votes
1
answer
142
views
Problems when setting up a CI/CD for Cloud Functions using Google Cloud Build and Github
Problem
I'm trying to create a CI/CD pipeline for a set of Cloud Functions stored in a GitHub repository. I've already linked the repository to Cloud Build and created YAML files for each function ...
1
vote
0
answers
33
views
Firebase Functions deployment fails with "Cannot find module" when using organized folder structure
I'm facing a persistent deployment issue after refactoring my Cloud Functions from a single large index.js file into an organized folder structure as recommended in the documentation. The deployment ...
0
votes
1
answer
70
views
Invertase Stripe Payment Extension Issue: Metered Pricing
I am trying to get the invertase extension to work with metered pricing but I keep getting the error: {message: 'Quantity should not be specified where usage_type is metered. Remove quantity from ...
0
votes
0
answers
54
views
Flutter passes data to Cloud Functions, but it still returns Data: undefined
I am trying to add a function to my mobile application to send e-mails with registration code to the users of the app and it's always failing with the same error, E-mail=undefined. I will show also ...