All Questions
Tagged with google-cloud-functions node.js
4,698 questions
0
votes
1
answer
27
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
24
views
Google Chat CardV2 with 'buttons' widget results in "Bot not responding" / API 400 Error
I'm developing a Google Chat bot using Node.js on Google Cloud Functions. I'm trying to respond to a slash command with an interactive card (CardV2) containing buttons.
What Works:
My function ...
0
votes
2
answers
63
views
Firebase Functions v2 onCall returns 401 Unauthorized despite "auth: VALID" in logs
I'm encountering a persistent issue with Firebase Callable Functions (v2, Node.js 20 runtime) where calls from my React frontend consistently fail with a 401 Unauthorized error, even though the server-...
0
votes
2
answers
84
views
Firebase Cloud Functions gen2 upgrade increased server costs
A few weeks ago I was forced to upgrade my Cloud Functions to gen2 and my node.js from version 16 to 22. After I made this update my firebase costs ballooned overnight by 4x. I have had to shut down ...
-2
votes
0
answers
21
views
How to run firebase cloud trigger functions locally for testing? [duplicate]
I have trigger functions in my project, but when I change in that then I need to deploy every time. I want to test it locally without deploying it.
Is there any way for it?
Ex:
OnUserCreated - ...
0
votes
3
answers
75
views
401 unauthorized response when calling a Cloud Function using google-auth-library
I'm calling a private http Cloud Function using the google-auth-library in Node.js. This works locally both when authenticated as myself and when impersonating the Cloud Run service account. However, ...
0
votes
0
answers
32
views
FIREBASE FATAL ERROR: Database initialized multiple times. Please make sure the format of the database URL matches with each database() call
I've written this js code for a firebase cloud function for a realtime database:
const { onValueUpdated } = require("firebase-functions/v2/database");
const admin = require("firebase-...
0
votes
0
answers
44
views
CORS Issues with GTM Server-Side Container on Cloud Run – Help Needed
I’m experiencing persistent CORS issues when trying to send events from my web container (GTM Web) to my GTM Server-Side container deployed on Cloud Run. Despite my best efforts and various tests, I ...
3
votes
0
answers
69
views
Error with Firebase deploy, service account format issue
Error Message
[info] Functions deploy had errors with the following functions:
addmessage(us-central1)
[debug] [2025-03-27T22:03:14.260Z] Not printing URL for HTTPS function. Typically this means it ...
0
votes
1
answer
33
views
Register Firebase Functions v2 by endpoint
I'm running Firebase Functions v2 with Express and I'm looking forward to understanding how I could register all endpoints so I can collect metrics independently. Hope I can get my self clear with the ...
0
votes
0
answers
44
views
Passing parameters to a cloud function in Flutter
I'm having an issue calling cloud functions through my flutter app. The function seems to be going through according to the logs, but the values I pass in through Flutter are not making it to the ...
0
votes
1
answer
126
views
firebase.auth.user().onCreate won't deploy because of "TypeError: Cannot read properties of undefined (reading 'user')"
This is my code:
exports.createExample = functions.auth.user().onCreate((testUser) => {
functions.logger.log("inside the auth trigger ", testUser.uid);
return null;
});
This trigger ...
-1
votes
1
answer
29
views
ES Modules JS not working in GCP functions
Below has the details , tried multiple updates, still no luck
works in VS code but not in gcp - cloud run
package.json
{
"name": "whatsappendpoint-test2",
"type" : &...
-1
votes
1
answer
53
views
Typescript types for onRequest() handler function in firebase functions
Where can I import the correct typescript types for the onRequest() handler function parameters request and response for firebase functions 2nd gen.
See this example:
export const sayHello = onRequest(...
0
votes
1
answer
66
views
What is the Response type of onRequest from firebase-functions/v2/https?
I am writing a simple code for Firebase Functions v2 in Node.js/TypeScript.
I am struggling with the type definition of Response.
According to documentation, HttpsFunction should be compatible to ...