Questions tagged [firebase]

Firebase is an innovative platform that offers a serverless solution for seamlessly creating and managing applications across mobile devices and the web.

An unexpected type error occurred: Unable to read the undefined property 'map' when utilizing Highcharts

I am currently working on developing highcharts using data from Firebase. I came across a helpful example here: However, when I try to integrate it into my application, I encounter the following error: firebase.js:43 Uncaught TypeError: Cannot read pr ...

Error loading module - Firebase Cloud Functions module not found

Currently, I am in the process of developing a Node.js function that will be deployed within Firebase Cloud Functions. This particular function requires the use of faker.js to aid in generating mock testing data. Unfortunately, an issue arose while trying ...

Issue: Encounter StaticInjectorError while working with deployed Angular CLI project

We encountered an issue while attempting to deploy our Angular CLI (v.1.7.1) project on GitHub Pages and Firebase, resulting in the same outcome for both platforms. The ng serve command functions flawlessly on localhost:4200, and everything goes smoothly ...

Having difficulties in Vue while attempting to access a particular row

I encountered an error message stating Uncaught TypeError: snapShotChnaged.forEach is not a function. My goal is to retrieve specific row data, which is why I am utilizing the doc method. retrieveSpecificDonation() { firestore .collection('d ...

React-snap causing trouble with Firebase

I'm having trouble loading items from firebase on my homepage and I keep running into an error. Does anyone have any advice on how to fix this? I've been following the instructions on https://github.com/stereobooster/react-snap and here is how ...

Cloud function -> time stamps evaluation

I've been working on a cloud function to delete items in the "links" collection that have an end time older than the current timestamp. Although my function runs without any errors, it's not deleting the items as expected and is causing me quite ...

Learn the steps to extract information from a specific ID on a webpage using Firebase

I am facing an issue with retrieving information from my Firebase database in Angular. As a beginner in both Angular and Firebase, I'm not sure how to achieve this. Below are the relevant code snippets: Address list HTML <ion-card *ngFor="let item of ...

Managing dynamic paths using Next.JS on Firebase (server-side)

I've encountered a problem with dynamic routes. Here is the file structure I'm working with: app members [memberID] page.tsx When I run: % npm run dev And visit this URL in my browser: http://localhost:3000/members/AA66 ...

Utilize flexbox to create a list that is displayed in a column-reverse layout

I am facing a challenge in displaying the latest chat person in the 1st position (active) using Firebase. Unfortunately, Firebase does not have a date field which makes it difficult to achieve this. I have attempted converting the date into milliseconds an ...

Bind a collection of Firestore documents dynamically using Vuexfire

I currently have a collection of firebase documents stored in a vuex state that is dynamically updated. My goal is to bind these documents with vuexfire dynamically as they are added or removed from the list. state: { docsToBind: [], // This array is dy ...

Is there a way to prevent the admin from invoking Firebase functions?

I currently have two triggers set up in my Firebase functions: user onUpdate owner onUpdate When the owner onUpdate trigger is activated, it performs an operation and updates the user document accordingly. The user onUpdate trigger is invoked by the pr ...

Separating screens for logged in and logged out users in React Router with Firebase is not possible

I'm currently developing an application using React and Firebase. The app has a requirement for user authentication to access their own timeline. To achieve this, I have decided to split the app into LoggedIn screens and LoggedOut screens. In the App.js f ...

Issue with a Firebase and React tutorial

Currently, I am in the process of learning Firebase and React to create a single-page-application that retrieves data from a Realtime Database hosted on Firebase. I am following a tutorial by Google/Firebase where they explain how to start with Firebase a ...

Having trouble getting Firestore/Firebase to work with Next.js?

Hey everyone, I could really use some help here. I've been working on integrating Firebase into my Next.js app for the API. Everything works well when I build and run locally, but once I deploy to Vercel for production, I encounter a 500 - Internal Server ...

Challenges when it comes to exporting files using Firebase Cloud Functions

I've been working with Firebase Cloud Functions using JavaScript, but I'm encountering issues with the import and export statements. Is there a solution to replace them? const firebase = require('firebase'); const config = { apiKe ...

Is there a way to establish a connection with a secondary Firestore database in Node.js, allowing for the use of multiple Firestore databases

I have set up multiple firestore databases within my project. Using the command line, I created these databases and can view them in the Firestore Databases preview by following the instructions outlined here: https://cloud.google.com/blog/products/databas ...

Ways to access information from doc.data()

<template> <div> {{ id }} {{ title }} </div> </template> <script> import { useRoute } from 'vue-router' import 'firebase/firebase-firestore' import { db } from '@/fdb' export default { props: ['id'], data () { ...

Access to Firebase using Google authentication is currently restricted (permission denied)

Currently, I am utilizing Firebase to authenticate users with Google in my Angular project, "project1." When signing anonymously into Firebase, everything runs smoothly. However, if I attempt to sign in with Google using the popup feature, an error occurs: ...

Issue with Firebase authentication during registration for a React application

Every time I attempt to register locally, I encounter the following error: "auth/network-request-failed", message: "A network error (such as timeout, interrupted connection or unreachable host) has occurred."} After registration, I'm simply directin ...

Avoiding conflicts in user registration with Firebase

I'm currently working on a Firebase/Next.js application deployed via Firebase hosting. In this project, I am focused on developing a user registration feature. When a new user registers, they are assigned a document containing their data, with one of ...

I encountered a SyntaxError in Jest while using NextJS, and it complained about an unexpected token 'export'

Currently, I am facing an issue while testing a NextJs page that contains a firebase context provider responsible for initializing firebase and managing access to firebase/auth. In the Auth Context, I directly import necessary items as shown below: import ...

Mastering Firebase pagination with RxJS - the ultimate solution

I came across this helpful post on Cloud Firestore pagination with RXJS at Cloud Firestore - How to paginate data with RXJS While it is exactly what I need, I am struggling to understand how to implement the following code snippet: import { UsersService } ...

What is the process for retrieving the component along with the data?

As I work on compiling a list of div elements that require content from my firebase cloud storage, I find myself unsure about how to effectively run the code that retrieves data from firebase and returns it in the form of MyNotes. Consider the following: ...

What is the process for removing a document with the 'where' function in Angular Fire?

var doc = this.afs.collection('/documents', ref => ref.where('docID', '==', docID)); After successfully retrieving the document requested by the user with the code above, I am unsure of how to proceed with deleting that do ...

Unable to retrieve real-time data from Firestore using getStaticPaths in Next.js

While fetching data from Firebase Firestore using getStaticProps is successful, I encounter a 404 page when attempting to implement the logic for retrieving details of individual items with getStaticPaths. The current state of my [id].js code appears as fo ...

"Unspecified error in Angular" encountered when implementing Mobile Angular UI in conjunction with Angularfire

I am currently working on developing a mobile app using Mobile Angular UI and integrating it with a Firebase database. However, I keep encountering an error when trying to include Firebase: Uncaught ReferenceError: angular is not defined at angularfire.m ...

What is the best way to create a compound query in Firebase?

I am working on a TypeScript script to search for a city based on its population... import { getFirebase } from "react-redux-firebase"; ... get fb() { return getFirebase(); } get fs() { return this.fb.firestore(); } getCollection(coll ...

Using the set() method in Firestore with the merge option does not function properly when implemented in Node.js

const user = {name : myUsername}; databaseRef.set(user, { merge: true }); An error is occurring which states: Invalid use of type "undefined" as a Firestore argument. Despite following the Firebase documentation here, and seeing others use it in online ...

Encountering errors: Time-zone discrepancies arise when making API calls from AngularJS and querying results from Firebase using NodeJS

Whenever I try to query with a date range, the results returned are incorrect. I have implemented DateRangePicker jQuery for selecting both date and time ranges. After that, I make an API call and send my date/Moment JS object to my Node.js API where I q ...

Error encountered in AngularFire WebSocket: Network Error 12152, The server provided an unacceptable or unknown response

Just a heads up: The code is still functional, but there's this persistent error that I just can't shake off. I've been trying to dive into Firebase, but even the Quickstart code doesn't seem to be running smoothly. Found it here: I also gave the latest ...

Is there a more efficient method for a logged-in user to trigger a cloud function and retrieve data from Firestore in Firestore?

I manage a website that stores data in Cloud Firestore. In order to keep the database updated with fresh information, I regularly pull data from various APIs and store it. However, my current method of providing users with this real-time data involves thei ...

Exploring Angular 10: Managing Two Promises in ngOnInit

I am currently working on integrating the Strava API into my Angular app. To summarize briefly: When a user clicks on a button to connect to Strava They are redirected to Strava for authentication (using PKCE) Strava then redirects back to my app with a ...

The Next.js application encounters a crash when trying to integrate Google Firebase authentication

I'm encountering an issue while trying to integrate authentication using firebase (via Google) in my next.js application, and the app crashes consistently. I will provide the code for the auth.js page component, as well as where I set up firebase and ...

Is the state of the React.js component empty?

HTML: <!-- index.html --> <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>React Tutorial</title> <script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.6/react.js"></script> ...

Instructions on how to modify a document's content by its unique identifier using Firebase Modular SDK (V9)

I am trying to figure out how to update an existing document for the same user ID in V9 Firebase whenever they log in, rather than creating a new one each time. Any suggestions on how to achieve this? Current Code setDoc( query(collectionRef), // ...

Issues with Firebase-admin preventing writing to the database are occurring without any error messages being displayed

Issues with Firebase admin writing to the database. The database is instantiated as follows: var db = admin.database(); A reference to the desired table is then set up: var systemsRef = db.ref("systems/"); A function is created to check if a 'sys ...

Discover the method of invoking a Firebase Cloud Function which utilizes ExpressJS in conjunction with cloud_functions

I have integrated a Firebase Cloud Function with ExpressJS that I want to access from my mobile application. Instead of making a simple http request, I am considering using the cloud_firestore package in Dart/Flutter as it may handle authentication more s ...

The admin.messaging() function in Firebase notifications is throwing an error - Firebase Cloud Messaging is not working correctly

Check out my code below: const admin = require("firebase-admin"); const serviceAccount = require("./google-services.json"); admin.initializeApp({ credential: admin.credential.cert(serviceAccount) }); module.exports.admin = admin; This is my API file ...

When a promise is executed, it runs the code synchronously regardless of the promise

Essentially, I have a web application that fetches data from Firebase. Due to the time it takes to retrieve this data, I've implemented promises in JavaScript to ensure my code executes at the appropriate times. Within the function getDataFirebase, informa ...

Issue TS2339: The object does not have a property named 'includes'

There seems to be an issue that I am encountering: error TS2339: Property 'includes' does not exist on type '{}'. This error occurs when attempting to verify if a username is available or not. Interestingly, the functionality works fine if I comment ou ...

Unable to bind Firebase snapshot.val() to $scope variable

Utilizing FireBase, I am attempting to perform queries where data is logging in successfully, but not appearing visually within the HTML $scope. var shopRef = firebaseDataService.intro; $scope.shops = []; var taskRef = shopRef.orderByChild("cat").equalT ...

What is preventing my data from generating a table in BootsrapVue?

My Vue script looks like this: export default { name: 'app', components: { }, data(){ return{ image: null, isLoaded: false, items: [] } }, created(){ this.divtest() this.getTimeTable() }, methods ...

Why does the property of {{hero.name}} function properly in a <h> tag but not in an <img> tag?

Within this template, the code below functions correctly: <h3>{{hero.name}}</h3> It also works for: <a routerLink="/details/{{hero.id}}">{{hero.name}}</a> However, there seems to be an issue with the following image path ...

Timestamps Update in Cloud Functions Triggered by Warnings

My Firebase Cloud Functions setup looks like this: index.js const functions = require('firebase-functions'); const trackVote = require('./trackVote') const admin = require('firebase-admin'); admin.initializeApp(); exports.trackVote = trackVote.handler; ...

There seems to be an issue with the location.href function in the server-side code of

I'm encountering an issue in the code below where I am attempting to redirect to the login page, but it seems to not be functioning as expected. app.get('/current-pass', (req, res) => { res.sendFile(path.join(staticPath, "currentPass ...

Encountering an endless loop while attempting to retrieve data from Firebase in Next.js through the use of useEffect

Currently, I am in the process of setting up a video section for a project using NextJS. The videos are stored in firebase storage. I have implemented a dynamic route that retrieves all videos from a specific reference within the bucket. For instance, if ...

Firestore experiencing difficulty fetching / showing data

For some reason, Firestore is unable to retrieve or display data from a Collection named data. This issue emerged after I attempted to simplify my code. Take a look at the code snippet: Filename: database.component.ts import { Component, OnInit } from & ...

Unable to create a new collection in Firebase Firestore

I encountered an issue while trying to add a collection in Firebase Firestore using the function .collection(doc).set. Despite finding the new user in authentication in Firebase, the collection was not created and the console displayed an error message. ...

Executing multiple instances of a Firebase cloud function

I am working with a Firebase (Google) cloud function that is structured like this // Initialize the Auth0 client var AuthenticationClient = require('auth0').AuthenticationClient; var auth0 = new AuthenticationClient({ domain: 'familybank.auth0.c ...

Unable to redirect Firebase Hosting root to a Cloud Function successfully

Currently I am utilizing Firebase Hosting along with a Firebase.json file that is configured to direct all traffic towards a cloud function (prerender) responsible for populating meta and og tags for SEO purposes. { "hosting": { "public": "dist/pr ...

The Firebase database reference function is not recognized in Node.js

Could someone help me identify the issue in my code before I revert back to MongoDB? The project is built with Node.js (Next.js) This is how I've configured Firebase (works for Google Login authentication): import { initializeApp } from 'firebase/app'; ...

In TypeScript, Firestore withConverter may return a QueryDocumentSnapshot instead of the expected Class object

I'm currently exploring the usage of Firestore's withConverted method in Typescript to retrieve queries as instances of my customized class. Custom EventConverter Class import Event from "@/models/Event"; class EventConverter implements Firesto ...

The error message "InvalidPipeArgument: '[object Object]' for pipe 'AsyncPipe' in Angular 6 and Firebase" indicates a problem with the data being passed to the AsyncPipe in

**Error: InvalidPipeArgument: '[object Object]' for pipe 'AsyncPipe'. ** I am encountering a problem with unsubscribing from the observable. My Angular-cli version is 6.0.3 This is the HTML code in home.component.html <div class="starter-templ ...

Updating Firebase token in Angular when it has expired

Currently working on a website using Angular, I have integrated the Firebase SDK for email/password authentication. The main aim is to automatically generate a new token if the user closes the site and returns after a week. However, I am unsure which func ...

Node encountering an ENOENT error while invoking the Ffmpeg binary through the Fluent-Ffmpeg API

Scenario I am currently developing a Firebase function in Node.js. The main goal is to trim an incoming audio clip to a specific length using FFmpeg and Fluent-FFmpeg. Challenge However, I encountered an issue when the function is triggered in Firebase. ...

Is there a way to stop the Firebase web client from altering the error message generated by an https.onRequest function?

I am facing an issue where I cannot retrieve the original message I sent from an "https.onRequest" function in Firebase. The firebase client is rewriting the message based on the error code, making it difficult for me to recover the originally sent body or ...

Creating a Node.js API with Firebase Backend

Hey everyone, I wanted to get some advice on a project I'm working on. I've read a lot about setting up Node/Express with Firebase, but I'm curious about potential challenges when it comes to building and scaling a custom REST API using Fire ...

What steps can be taken to ensure that only users with "admin" status have the ability to edit certain data within a Firebase document?

Within my Angular application, I have implemented Firestore for storing user profiles. Currently, the structure looks like this: /profiles/{uid}/: { displayName: "Luigi",//--> Only editable by Luigi email: "<a href="/cdn-cgi/l/email-protecti ...

Puppeteer with Typescript: Encountering issues during the transpilation process

The issue stems from the fact that I am unable to use Javascript directly due to Firebase Functions Node.JS version lacking support for Async/Await. As a workaround, I have converted the code into Typescript and am currently attempting to transpile it to c ...

How to access a $scope variable in the same Angular controller function from outside the function

As a newcomer to AngularJS, I have a question about accessing my $scope variable from an outside function within the same controller. How can I achieve this? Below is the code snippet: .controller('RekapCtrl', ['$scope', '$timeout ...

Converting DatetimeWithNanoseconds to a date format in Python Firestore

Looking for a way to convert a Firestore timestamp into milliseconds or a date format using Python in order to make a calculation. Attempting to parse it as a date is resulting in a TypeError. TypeError: strptime() argument 1 must be str, not DatetimeWi ...

The code below is not working as it should be to redirect to the home page after logging in using Angular. Follow these steps to troubleshoot and properly

When looking at this snippet of code: this.router.navigate(['/login'],{queryParams:{returnUrl:state.url}}); An error is displayed stating that "Property 'url' does not exist on type '(name: string, styles: AnimationStyleMetadata". ...

This issue arises when using AngularFire for an AngularJS voting application, where the app is unable to properly

When using ng-repeat to display array data from Firebase, I am facing an issue with counting the votes for each quote. Despite my attempts to iterate through the data, the result always comes back as undefined. My Markup <div ng-repeat="q in quote ...

Creating dynamic VueFire references is a powerful feature that allows for more flexibility and customization

I am currently exploring the creation of refs dynamically: The initial ref I created works fine as it is hardcoded, but the second one does not seem to work because it is dynamic: firebase: function(){ return { categories: db.ref('categories ...

Experiencing delays when uploading large files (10-300MB) to Firebase using react-JS and Google Cloud Storage

I initiated a WebApp on Firebase with the objective of uploading files (ranging from 10-300MB) to Google storage and performing machine learning tasks on the content. To accomplish this, I utilized react-JS as the client to create a form for file uploads ...

Is there a way to upload several documents in just one writing?

Can anyone advise me on how to add multiple documents to my Firestore collection using just one write operation? I have over 20,000 records and I'm looking for a cost-effective solution. Is there a way to add multiple docs in a single write? Appreciate an ...

Angular's Async Pipe displaying outdated data

I am encountering an issue with my Angular async pipe setup. Here is the code snippet: <ng-container *ngIf="showProjects && (projects | async) as projectList; else loading"> In my projects.page.ts file, I have the following funct ...

In Vue firebase, ensure that the prop is only passed down after it has been

I am facing an issue where I need to pass down the Firebase user as a prop from the root component to my child components. I managed to achieve this by passing the user to my router. However, the problem arises when I wrap my new Vue instance in an onAuthS ...

Obtaining the current timestamp from Firebase Firestore in a React application

In the project I'm currently working on, I am utilizing Firebase Firestore database. To add documents from my front-end React application, I require the current timestamp. import * as firebase from "firebase"; import React, {useState} from 'rea ...

Oops! Encounter an issue while trying to deploy VueJS App on Firebase Hosting

I recently developed a Vue application and integrated firebase tools to deploy it on Firebase hosting. Initially, everything worked fine when I ran npm run build and firebase deploy. However, upon making changes and attempting to use commands like npm run ...

Error: In Angular Firebase, the type 'string' cannot be assigned to the type 'Date'

I am encountering an error. The following error is shown: "cannot read property 'toDate' of undefined. Without the toDate() | Date." After further investigation, I found: A Timestamp object with seconds=1545109200 and nanoseconds=0. A helpful resou ...

Invoke the express function on the client using the callable method

When I'm listening on a local port with my browser, the following method will return Hello world. //Node app.get('/', (req,res)=>{ res.send('Hello world') }); I've successfully exported the app as a ca ...

There appears to be an issue with the error handling function within React

I am facing an issue with my error function while checking the browser error, and I am unsure why adding a console.log with the error is causing trouble. I need some assistance in troubleshooting this problem which seems to be occurring at line 29 of my im ...

Unleashing a zip file for direct download via cloud functions

I am facing an issue with a firebase cloud function that uses express to stream a zip file of images to the client. The strange part is that everything works perfectly fine when testing locally, but when I upload it to firebase, I encounter the following e ...

Performing Batch Writes in Firestore using the Admin SDK

I have a massive ASCII flat file containing 1.5 million lines, which is essentially a list of parts from a manufacturer. I want to store this data in Firestore. Originally saved as a .csv file, the size was 250GB. After converting it to a JSON file using ...