All Questions
7,507
questions
0
votes
1
answer
18
views
Firestore error "User document does not exist"
I'm working on a project similar to Linktree and have implemented Firebase for authentication and Firestore for the database. The authentication system is functioning correctly, and user data is being ...
-2
votes
0
answers
31
views
HOW to improve this node express server code and its code ? and how to improve the recurring notification api [closed]
Title: Why is my API endpoint not pushing FCM notifications with schedule?
Body:
I'm working on a Node.js/Express API endpoint to schedule push notifications using Firebase Cloud Messaging (FCM). ...
0
votes
2
answers
28
views
Firebase autogenerated keys usage in Node.js json
So I am creating a project using a Firebase database and React / Node.js to consult it.
I created a couple of entries via POST request like this:
const res = await fetch(`${MYFIREBASE}/posts.json`, {
...
0
votes
0
answers
16
views
How does the one cart checkout from multiple websites in websites like revolve or apps like Styl.AI work? [closed]
I am currently beginning to learn web/app development and was curious as to how different multi-brand aggregation platforms like Revolve or the newly launched iOS app Styl.AI do this?
Do you need to ...
0
votes
2
answers
51
views
I'm having trouble configuring CORS
I'm working on a frontend application using React with Redux and a backend in NestJS with Firebase. I'm facing a CORS issue that I can't seem to resolve. I've configured CORS on the backend, but I'm ...
-3
votes
0
answers
38
views
API to create recurring notifications in Firebase node express [closed]
Title: Why is my API endpoint not pushing FCM notifications with schedule?
Body:
I'm working on a Node.js/Express API endpoint to schedule push notifications using Firebase Cloud Messaging (FCM). ...
0
votes
1
answer
27
views
I get Error TypeError: Cannot read properties of undefined (reading 'key')
I'm experiencing a couple of issues with configuring and using OpenAI in a Firebase function.
When trying to access the OpenAI API key in the openaiConfig.ts file, I get the error:
TypeError: Cannot ...
5
votes
1
answer
544
views
Google Cloud Run Firestore: [ERR_BUFFER_OUT_OF_BOUNDS]: "length" is outside of buffer bounds
I'm using the Google Cloud Run Firestore integration, which worked fine until recently. I can't do any CRUD operations aynmore, while I'm able to authenticate.
This only occurs on the Google Cloud Run ...
0
votes
1
answer
35
views
What's the system that I can create a new collection of a document in Firebase Firestore?
I explored the docs but couldn't figure out that how can I create a new collection of, suppose this default user which is located in users collection. Now I created a collection for this document ...
0
votes
1
answer
119
views
Error when seeking to run firebase init hosting (node:35097) [DEP0044] DeprecationWarning: The `util.isArray` API is deprecated
I am seeking to set up flutter on the web with firebase. I have followed the steps on the firebase website
I have installed Firebase CLI and then I run
firebase login
Then I run firebase init hosting ...
0
votes
0
answers
21
views
How to initate firebase command globally?
I have installed firebase CLI using the firebase website , (not the npm/node.js one) I have setup everything , now the problem is that firebase command only works in firebase CLI and not in cmd or ...
0
votes
0
answers
26
views
Convert pdf files to jpeg using Google Cloud Functions + GraphicsMagick
I have set up GraphicsMagick running on a Google Cloud Function, and it works with no issues when converting files, such as converting PNG to JPEG.
I am aware of the issue regarding Adobe PDF/PS files,...
4
votes
1
answer
49
views
Firebase Authentication not working with ADC (Application Default Credentials)
I am using Firebase Admin SDK from my development machine (Node.js/Fastify). So I am trying to do something like this:
Initialize Firebase App 👇:
import * as firebaseAdmin from 'firebase-admin'
...
0
votes
0
answers
16
views
Firebase migrate configuration from 1st gen to 2nd gen
I am trying to migrate some of firebase functions to 2nd gen and currently having issues on how to migrate the configurations.
The issue is there is an index.js file which fetches the configuration ...
0
votes
0
answers
29
views
How to separate express app routes into different source files in Cloud Functions? [duplicate]
I am currently developing an API with google's Cloud function, and wanted to know how arrange my Node.js index.ts file so that I can keep my callback functions in separated files while still handling ...
0
votes
0
answers
17
views
"How to Resolve `punycode` Deprecation Warning When Deploying Next.js Project?" [duplicate]
I'm trying to deploy my Next.js project to [Hosting Service] and I’m encountering a deprecation warning related to the punycode module. The warning message is:
This warning appears during the ...
0
votes
1
answer
54
views
Setup Configuration: Node.js / "npm start" doesn't work
npm command running in project path
Hello Developers,
I am trying to run the node.js commands - npm start and setting up a project with firebase the help of this article.
I have installed node.js ...
0
votes
1
answer
43
views
How to know when a cloud storage trigger retries?
I read this document and applied the best practices into my cloud function. I observed that it actually retries when an error occurs. But when I reread the doc, I feel a bit confused because when a ...
0
votes
0
answers
31
views
Getting "'crypto' module: error signing message" when attempting to send a message via a MongoDB server function
I am attempting to setup a trigger in my MongoDB cluster, that, when an object is updated, pushes out a notification to certain users. I have firebase-admin initialized properly, but am running into ...
0
votes
1
answer
21
views
Invitation to signup with firebase
I'm building an invitation signup in next js with firebase. Here is the flow I want to achieve:
admin enters email id to be invited and clicks enter. Then a invitation link should be sent to that ...
0
votes
0
answers
16
views
Unexpected Delays in HTTP Requests Using Fetch in Google Cloud Functions
Body:
I'm experiencing unexpected delays when making HTTP requests using fetch in Google Cloud Functions. Despite not awaiting any of the requests, they are not being executed concurrently as expected....
0
votes
1
answer
31
views
Firebase push notification using node js server
I am looking to develop a method to send notification to flutter app via my node.js server. (httpv1)
I managed to test via postman. while doing from node.js server how to make things dynamic. How to ...
-1
votes
0
answers
74
views
FCM access token: The registration token is not a valid FCM registration token
I am getting OAuth token when I call this Google Cloud function (using node.js) but it seems that I am not getting the correct OAuth token for messaging.
const MESSAGING_SCOPE = 'https://www....
0
votes
0
answers
31
views
My fetch requests are stuck on pending and never fulfill a response or make it to the backend
I'm making an application using react, node and firebase and am trying to connect my backend to my front end. I have developed out backend routes and api but when I try to make requests from the front ...
0
votes
2
answers
54
views
How do I add a field in the document stripe adds to fire store once checkout is completed?
I am trying to setup a tutorial content page where users pay through a stripe checkout and once, they have done so they can then view the content on the page.
I am using firebase's firestore and the ...
1
vote
0
answers
45
views
Firebase Functions deploy failed
I am developing an Firebase Functions.
I've been following along with the following official documentation (HERE)
However, I am getting an error when deploying the functions.
> firebase deploy --...
1
vote
1
answer
46
views
Can I use the firebase client auth sdk on the server?
I'm trying to figure out how Firebase works when I've got a client-server model. Usually the client performs a login/register request to the server. Firebase documentation https://firebase.google.com/...
0
votes
1
answer
21
views
Restricting a Firebase Function to just registered users [duplicate]
I have a v2 firebase callable function:
import { onCall } from "firebase-functions/v2/https";
/// Simple ping to test authentication
exports.ping = onCall(async (req) => {
return { ...
0
votes
0
answers
40
views
Error deploying the Firebase Cloud function
I am unable to deploy my Firebase cloud function. The function works perfectly when I run the cloud function locally using the Firebase emulator. However, when I attempt to deploy it, I receive the ...
0
votes
2
answers
53
views
How can I optimize my Cloud Function to react to Firestore document status changes more efficiently?
How can I optimize my Cloud Function to react to Firestore document status changes more efficiently? Is there a way to make this process event-driven rather than using periodic checks? I'm looking for ...
0
votes
0
answers
15
views
Live reload a shared Typescript Library during React + Firebase development
I am working on a small React + Firebase app and I am implementing some backend functions through firebase functions. There are some shared datatypes and logic between the front end and backend and, ...
0
votes
1
answer
55
views
How can I efficiently insert more than 1 million records into Firestore?
Description:
I am working on a project where I need to insert more than 1 million records into Google Firestore. Currently, my approach is not efficient enough and the process is extremely slow. I am ...
1
vote
0
answers
22
views
Does the ordering of fields in a composite index matter for performance?
I have a Firestore query which is taking a while to execute (> 4 seconds). The query is structured as follows:
db
.collection('testCollection')
.where('fieldA', '==', 1)
.where('fieldB', '==',...
0
votes
2
answers
51
views
Firebase Triggered Cloud Function is not aware of user
I have integrated a payment system to my Firebase app and their system sends a POST request to my backend. I handle that request as below:
app.post("/subscription", (req, res) => {
...
0
votes
0
answers
112
views
Getting a Failed to resolve import error even though I am mentioning the correct file path and have exported the variables
I am trying to make a chatting application using React with Vite and Firebase using Google authentication.
I created a firebase.js file to contain the firebase SDK and credentials, when I am importing ...
0
votes
1
answer
61
views
updating firestore document multiple times from event trigger function overwrites or stops updating after few triggers
I am trying to update the doc when a group of images are resized just to show the progress and keep track if any images could not transformed.
we have few images in dir where dir is doc id. using the ...
1
vote
0
answers
34
views
how to fix issues with package.json and package.lock.json files out of sync when deploying fiirebase cloud functions? [closed]
I am having several issues with deploying a firebase cloud function. I created a new folder, I have node js installed and I have all the necessary files when I open up the project in visual studio ...
0
votes
0
answers
32
views
Issues with React-App deployment using Firebase Hosting [duplicate]
I am trying to host a React Web Application using Firebase's Hosting service, but I am getting this error in console: Uncaught SyntaxError: Unexpected token '<'. When locally hosted and serving the ...
0
votes
0
answers
18
views
Firebase function error, It shows internal server error
exports.check_auth_exists = functions.https.onRequest(async (request, response) => {
let settingdata = await admin.database().ref('settings').once("value");
let settings = ...
0
votes
1
answer
132
views
Error “4 DEADLINE_EXCEEDED: Deadline exceeded after 102.893s”
I am encountering a “4 DEADLINE_EXCEEDED: Deadline exceeded after 102.893s” error when attempting to upload a large data set to Firestore using a Node.js application hosted on Cloud Run. The error ...
0
votes
1
answer
40
views
How to set the timezone in a Cloud Storage trigger? (Cloud Functions 2nd gen for Firebase)
Is there a way in the 2nd generation of Cloud Function to set a different timezone inside a Cloud Storage Trigger?
I have a trigger that generates and optimize images, it is a long process, but I'd ...
0
votes
1
answer
24
views
How to set the timezone in a Cloud Storage trigger? (Cloud Functions for Firebase)
Is there a way in the 2nd generation of Cloud Function to set a different timezone inside a Cloud Storage Trigger?
This is useful, specially when we use methods like FieldValue.serverTimestamp().
0
votes
1
answer
37
views
Why are Stripe Checkout sample amounts hardcoded? (How do we get basket specific unit price, quantity and currency?)
I don't understand the Stripe express checkout sample code: https://docs.stripe.com/elements/express-checkout-element/accept-a-payment.
Amounts and currency are hardcoded. What if someone buys more ...
0
votes
0
answers
40
views
Request to solve the problem of retrieving firestore data using firebase functions with node.js
The authorUID value appears as undefined. I don't know how to get the userUID field value of the board collection. The boardID value is imported correctly, but in the process of inserting it into ...
0
votes
1
answer
147
views
Getting error { code: 403,message: 'SenderId mismatch', status: 'PERMISSION_DENIED',details: [ [Object] ] } when sending fcm http v1 pushnotification
I am upgrading aws sns legacy Firebase Cloud Messaging (FCM) API to FCM http v1 api. for that in my lambda function (in nodejs) added below code.
const admin = require('firebase-admin');
const { ...
0
votes
1
answer
106
views
Firebase Analytics log custom events from server
I want to send firebase Analytics custom log event from Firebase Functions (with node.js).
I have searched a lot but I couldn't find any tutorial or ducumentation about it.
Is there any way to send ...
0
votes
0
answers
47
views
Add Popup message After Upload in Nextjs File Sharing APP
I'm building a file sharing app I have build till the upload section when file is uploaded to firebase the progress bar is show to 100% so I need to add a pop up msg after upload. also how to remove ...
0
votes
0
answers
28
views
Firebase functions v2 trigger times
I am trying to refactor some Firebase functions code from v1 to v2. The code watches for changes in a sensitive part of the database and logs information about each change, including the time it ...
1
vote
0
answers
23
views
Webapp dashboard not fetching data from firebase database sent by mobile app
I have a mobile app that sends user location (lat, long, timestamp) to the firebase database. I have a dashboard that should display this location in the browser. However the problem is that the data ...
0
votes
1
answer
133
views
Integrate Firebase into Medusajs
I'm new to Medusajs and I'm trying to integrate Firebase into Medusajs in order to add a register/login with a phone number in my Medusa app following Medusajs docs on how to create a custom endpoint ...