All Questions
7,542 questions
1
vote
0
answers
10
views
Firebase functions not changing firestore database
I'm new to firebase functions and recently I was tasked with adding two new functions. One needs to run daily at midnight and the other runs whenever a budget for an order in a firebase collection (...
0
votes
1
answer
22
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 ...
0
votes
0
answers
34
views
+100
Firebase Dynamic Links losing app parameters in Capacitor Browser redirect chain on Heroku
I have a weird issue with Firebase Dynamic Links in my Capacitor app. When using deep links to authenticate users via SAML, it looks to be losing specific URL parameters but only in my staging ...
0
votes
1
answer
47
views
How do Firebase v1 functions access secrets?
I have been moving a set of Firebase functions to version 2 and I can access secrets in OnCall functions using this syntax:
export const fn = onCall({ secrets: getSecrets() }, () => ...
The ...
0
votes
1
answer
32
views
FireBase Push Notifications (FCM) Unity [duplicate]
I made a website enter information into the realtime Database through Firebase.
I want to create an app through Unity and make it get a push alarm whenever new information is entered in Firebase in ...
0
votes
0
answers
17
views
TypeError: (0 , _next_auth_firebase_adapter__WEBPACK_IMPORTED_MODULE_2__.default) is not a function
Receiving this error whenever i run npm run dev.
Full error:
⨯ TypeError: (0 , _next_auth_firebase_adapter__WEBPACK_IMPORTED_MODULE_2__.default) is not a function
at admin (c:\Users\user\Downloads\...
0
votes
1
answer
29
views
How can I fetch a set of documents whose ids match an array of ids in node.js using firebase?
I'm working with Firebase Firestore and I have the following code to fetch a set of "lines":
for (let i = 0; i < indexes.length; i++) {
const doc = await lineCollection.doc(indexes[i])...
2
votes
1
answer
77
views
Puppeteer Scraping: See XHR response data before request completes for real time data
I am using puppeteer to scrape a website for real time data in nodejs. Instead of scraping the page, I am watching the backend requests and capturing the JSON/TEXT responses so I have more structured ...
2
votes
1
answer
116
views
What does this mean "Error: Upgrading from 1st Gen to 2nd Gen is not yet supported
What does this mean?
Error: Upgrading from 1st Gen to 2nd Gen is not yet supported. See https://firebase.google.com/docs/functions/2nd-gen-upgrade before migrating to 2nd Gen.
We'd like to be able ...
0
votes
1
answer
19
views
Firebase serviceAccountKey.json not being read when containerizing NestJS backend - production
I'm learning Docker and trying to containerize my NestJS backend. My backend uses Firebase as a database, and I'm having issues loading the Firebase credentials.
Locally, everything works fine because ...
0
votes
1
answer
67
views
How to change Firestore database in Firebase Admin Node.js? [duplicate]
I'm using the Firebase Admin SDK with Node.js. My Firebase app has some Firestore databases. For example:
(default)
system.
But every time I save data, it always goes to the (default) database and I ...
0
votes
1
answer
177
views
Firebase messaging().sendMulticast(...) // <--- sendMulticast does not exist on type Messaging
Recently, I've been working on a new feature for my project.
But I encountered lot of issues with the back-end while implementing the feature.
// Use messaging() directly from firebase-admin ...
0
votes
0
answers
37
views
How to deploy firebase auth emulator on EC2 instance
I am trying to run firebase auth emulator on local and its running fine on local but not run on EC2 instance and i am facing issues that are stated below
{
"projectId": "bubble-dev-...
0
votes
1
answer
64
views
Firebase Optimistic Locking Duplicate Processing
I have two Firebase functions that run hourly and process the same list of users. They share a batch document(this.batchId: MM-dd-yyyy-HH so it's unique for each hour) and use transactions to ...
0
votes
1
answer
60
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 ...
6
votes
1
answer
109
views
Firebase stuck in ACCESS_TOKEN_EXPIRED even though key is new
Up until recently I was able to run queries with the Firebase SDK using Node.js. Now I am getting a message that ACCESS_TOKEN_EXPIRED but I created a new key and the expiration is never.
If I see in ...
4
votes
1
answer
149
views
How can I use octokit with commonJs
I am confused with how octokit is using imports. How can I use commonJs and not set the module and module resolution to Node16.
If I import the App like:
import {App} from "@octokit/app";
I ...
-1
votes
1
answer
38
views
How to implement role based google authentication using Firebase [closed]
I am developing a platform using Vite + React, Firebase Authentication where users (teachers and students) sign in using Google authentication. I need to implement role-based access control (RBAC) to ...
0
votes
0
answers
16
views
Firebase and google cloud YouTube integration access token regenerate issue
I am using Firebase and the Google Cloud API to integrate a YouTube account. By using Firebase's access token, I have fetched YouTube account data and uploaded videos to the channel using Google APIs. ...
0
votes
0
answers
81
views
Firestore onDocumentCreated Trigger in Firebase Functions Gen 2 Returning Undefined Data
I'm transitioning to Firebase Functions Gen 2 and deploying a Firestore trigger function to execute when a document is created in the messages collection. However, the event object I'm receiving ...
0
votes
1
answer
61
views
Getting 403 Forbidden Error in Firebase Cloud Function live deployment but working fine in emulator with localhost
I am designing an application using Firebase Functions to get response from an external API call usign Axios POST request and nodejs to display the response.
When I send the Axios POST request using ...
0
votes
0
answers
47
views
API Call From Postman Cloud Agent is getting 403 error but working with Postman Desktop Agent
I am trying to call an API from my Postman web app(https://web.postman.co/).
The Problem is that when I try to fetch data from an API using Postman Desktop Agent everything works fine and I get the ...
0
votes
1
answer
33
views
Getting "Error: Not Authorized to access this resource/api" when trying to create google groups through Firebase functions
I am trying to create a unique google group every time a new entry is created in the firestore database using google admin api within firebase functions.
The onCreate function within the functions ...
0
votes
0
answers
72
views
Error ffmpeg was killed with signal SIGSEGV in cloud run
I am currently upgrading Node.js version (18 to 20) and Firebase Functions (Gen 1 to Gen 2).
I encountered an issue during development:
import ffmpeg from "fluent-ffmpeg";
import ...
0
votes
1
answer
60
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 ...
0
votes
2
answers
70
views
TypeError: functions.storage.object is not a function with firebase
I am trying to use Firebase Functions to listen for file upload events in Cloud Storage, but I encountered an error during deployment that says:
functions.storage.object is not a function.
...
1
vote
0
answers
74
views
Error: Failed to load external module firebase-admin/firestore: Error: Cannot find module '@opentelemetry/api'
I'm encountering an issue when trying to use firebase-admin with Firestore in my project. Despite having both firebase and firebase-admin installed via npm, I'm seeing the following error when running ...
3
votes
1
answer
51
views
Where does Firebase Admin SDK / Firestore pick up its project ID from, if not specified?
I'm trying to debug why writes to the local Firestore emulator from a Node.js script on my laptop aren't visible in the emulator GUI, and why the Node.js script gets different data from what I see in ...
1
vote
1
answer
105
views
Validate Twilio signature in Firebase Functions
I'm having trouble validating the delivery status request from Twilio in a Firebase Function.
I have set the webhook url on both the phone number and the Message Service to https://<region>-<...
1
vote
0
answers
65
views
Upload file to firebase cloud function for further process on file using typescript?
I am trying to upload a file, and then after want to perform some operations on the file, which I am uploading to this function using this CURL:
curl --location 'http://127.0.0.1:5001/{PROJECT_ID}/us-...
2
votes
0
answers
56
views
How to use `external_account` credentials with the Firebase Admin Node.js SDK?
I'm trying to authenticate the Firebase admin SDK in Node.js using Workload Identity Federation credentials with AWS.
Here's the relevant part of my configuration:
{
"type": "...
0
votes
1
answer
188
views
Error: Package "@react-native-firebase/firestore" does not contain a valid config plugin and ERR_UNSUPPORTED_DIR_IMPORT in Expo project
I’m working on an Expo project using @react-native-firebase/firestore. When I run npx expo-doctor, I encounter the following errors:
PluginError: Package "@react-native-firebase/firestore" ...
0
votes
0
answers
22
views
i want get appid in this function exports.usercustomclaim = functions.auth.user().onCreate((user) => {});
I want get appid in this function
exports.usercustomclaim = functions.auth.user().onCreate((user) => {});
I am using app in my project and I want to set up custom claim for that app. That's why I ...
0
votes
1
answer
30
views
Firebase Emulators: How to emulate specific functions in subfolders
I'm trying to emulate only specific Cloud Functions within my Firebase project. My functions are organized in subfolders within a "functions" directory.
My folder structure looks like this:
...
1
vote
0
answers
49
views
FirebaseError: Limit value in the structured query is over the maximum value of 10000
Firebase limit issue: Error fetching records for page: 11 FirebaseError: Limit value in the structured query is over the maximum value of 10000.
When I fetch data from Firebase, I encounter the ...
0
votes
1
answer
43
views
How to block user sign-up when using signInWithPopup when exception is thrown in Firebase Authentication?
I’m using Firebase Authentication with Google Sign-In in my web app. I have a custom signUpWithGoogle method to handle user registration in my custom Backend. However, when calling signInWithPopup, it ...
0
votes
0
answers
24
views
next js error with liveblocks and yjs and cloudfare/firebase
I tried to make a yjs blockNote with liveblocks as provider but I have a problem that when the block note appear in the page the data not fetching so the block note looks blank and when I make any ...
0
votes
1
answer
29
views
Exception during Firebase set up in Microsoft Azure Function (Node)
I'm setting up firebase server side on my Azure Function App, using Node 20 and firebase-admin v13.0.1 (Firebase Admin Node.js SDK)
I'm having problem with setting up firebase.
This is the ...
0
votes
1
answer
236
views
Why do Firebase return "Analytics: Firebase Analytics is not supported in this environment" when connecting a NextJS app with Firebase Analytics?
I am currently building an web app using Firebase and Nextjs. I am having trouble adding analytics to the nextjs app in the firebase config file.
This is my Firebase config.ts file:
import { ...
1
vote
1
answer
103
views
How can I get traceId in a Firebase cloud function?
I would like to propagate traceId between a couple microservices in Firebase/GCP by 1) getting the traceId from the root service, and 2) propagating it using "x-cloud-trace-context" in the ...
0
votes
1
answer
54
views
Calling a cloud function "OnCall" from another function "OnCall" (with token)
I need to secure my Cloud Functions and I don't know how to call a function from another function by passing it the right Firebase token. How do I generate a valid idToken?
1°Function
const { ...
1
vote
0
answers
68
views
Firebase admin SDK in NodeJs FirebaseAppError: connect ETIMEDOUT
I am trying to integrate the Firebase Admin SDK into my backend Node.js service to send messages based on the official FCM documentation. However, every time I start the service, it gets stuck at the ...
0
votes
1
answer
94
views
How to View Firebase Cloud Messaging Notifications Sent via Cloud Functions?
I am currently using Firebase Cloud Functions to send notifications via Firebase Cloud Messaging (FCM). Notifications are being successfully sent, as confirmed by the logs in the Cloud Function and ...
1
vote
1
answer
245
views
Firebase Cloud Functions missing permission on the build service account
To deploy NodeJS (2nd Gen) cloud functions to a Firebase project, I use the firebase deploy —-only functions command. following is the code base.
import {onDocumentWritten} from "firebase-...
-1
votes
1
answer
57
views
How to handle authentication in a backend using Firebase Admin SDK and Express with TypeScript?
I am implementing sign-in logic for my app's backend, built using Express with TypeScript, and leveraging the Firebase Admin SDK. However, after exploring the methods provided by the auth instance and ...
-1
votes
1
answer
255
views
Firestore onDocumentWritten Trigger Not Firing on Document Writing in Cloud Functions with node
I am building a Firebase project where I need to run a cloud function whenever a document is created in a specific Firestore collection. I'm using Node.js with the Firebase Admin SDK and have set up ...
1
vote
0
answers
34
views
Firestore Admin SDK always gives "No QuerySnapshot Result" error
When doing a database query for my Firebase collection, it always gives me a "No QuerySnapshot Result" error, even if there are documents matching the query.
try {
const diaryReference = ...
0
votes
0
answers
31
views
Firebase Emulators cannot import module even when VSCode shows that the imported module has already been properly referenced
I have a Typescript project that is compiled to JS before being used to run as an emulated Firebase Functions.
My functions/lib/index.js
import ENV from './configs/dotenv';
import * as admin from '...
1
vote
1
answer
33
views
Firebase functions/Nodemailer sending email to myself when a form is submited
I want to use firebase functions with nodemailer to receive emails when a contact form is submited. The form is being saved in my database and then i want to use it in my index.js file with a function ...
0
votes
2
answers
240
views
Can't init firebase cloud storage due to cloud resource location
I’m using Firebase emulators to develop and test Cloud Functions locally, and one of my use cases involves uploading a file to Cloud Storage. As part of this process, I initialize Firebase emulators ...