Issue I would like to add an authentication mechanism to my AngularJS app with Firebase backend. The requirements are simple: Authenticated users should be able to access any page. If unauthenticated users goes to /some_page (any page except /login), they
Continue readingTag: firebase
Why `functions.https.HttpsError` is not shown in the Firebase function logs?
Issue I’m throwing an error from my callable Firebase function: throw new functions.https.HttpsError( ‘invalid-argument’, `Invalid token ${token} for file ${fileName}.` ); I the logs I see only the following: 12:29:22.500 PM SQR-cancelAllotment Function execution took 1779 ms, finished with status
Continue readingUncaught Error: Expected a value of type 'FutureOr<UserCredentialJsImpl>', but got one of type 'MemoryInfo'
Issue So I’m trying to fix some bugs on a AngularDart legacy app I think the problem is firebase auth? here’s my code import ‘package:firebase/firebase.dart’ as firebase; try { await firebase .auth() .signInWithEmailAndPassword(’email’, ‘password’) .then((value) => print(‘success’)); } catch (e)
Continue readingNuxt3 and Firebase Cloud Function Hosting: How to access private key in .env file?
Issue I have a Nuxt3 app that is using "server routes" to create backend APIs to use for the front-end. I have the following server route: server/api/imagekit/deleteFile.js: import ImageKit from ‘imagekit’ const imagekit = new ImageKit({ publicKey: useRuntimeConfig().public.imagekitPublicKey, privateKey: useRuntimeConfig().imagekitPrivateKey,
Continue readingWhat is considered as data transfer in firebase hosting?
Issue What I considerd data transfare in firebase hosting according to docs Data transfer (GB/month) — The amount of data transferred to end users from our CDN. Every Hosting site is automatically backed by our global CDN at no charge
Continue readingRedirect to page when a URL path pattern is identified
Issue I’d like any traffic that comes to: mysite.com/suppliers/add-supplier To be directed to add-supplier.html when the path is identified in my firebase.json config file. I’ve tried this: { "firestore": { "rules": "firestore.rules", "indexes": "firestore.indexes.json" }, "hosting": { "public": "public", "ignore":
Continue readingFirebase Functions multiple directories – Nuxt 3 / Nitro
Issue I’m experimenting with Nuxt 3 on Firebase hosting and have a basic build deployed successfully. However, it has taken over the functions directory. Is it possible to specify a second directory in firebase.json? Thanks. Here is the relevant portion
Continue readingFirebase Hosting Route ReWrites (Abnormal Paths)
Issue I’m trying to create a firebase routing rule that will re-route any request under a specific sub-directory to one particular file on the server. This works if I have a normal filepath (with an extension), but does not seem
Continue readingFlutter web app is returning blank page after being deployed to firebase hosting
Issue I have successfully deployed my flutter web app to Firebase hosting. However when I visit link blank page Is returned Here is my firebase.json { "database": { "rules": "database.rules.json" }, "firestore": { "rules": "firestore.rules", "indexes": "firestore.indexes.json" }, "hosting": {
Continue readingNextjs dynamic routing not working in firebase hosting
Issue I have a dynamic router job/[jobId] but it doesn’t work after hosting. I don’t know how to write the rewrites in firebase.json for this as well. Here’s my rewrites. Currently firebase throws 404 if I access a page such
Continue readingFirebase hosted website shows welcome page not the actual website
Issue I am trying to host React website using firebase. I have used firebase for backend. I have already deployed a website using firebase it worked fine before. Only this time the deployed url keeps showing the welcome page. I
Continue readingFirebase Hosting on own server
Issue I am looking for a solution for developing iOS and Android chat to replace our current (unreliable, maybe poorly written by previous devs) XMPP/OpenFire chat. I came across Firebase which looks good. However, I don’t quite get the setup
Continue readingfirebase-tools error: EACCES: permission denied
Issue I am trying to deploy Firebase hosting of my web app. At the command line, when I type firebase deploy, I get the following error. Note: firebase deploy is just one example. The same error occurs for all firebase
Continue readingFirebase default hosting domains: only .firebaseapp.com works but .web.app fails
Issue I’m building a very simple one-page react application using typescript. I tried hosting it using Firebase Hosting. Surprisingly, only the domain [name].firebaseapp.com works but [name].web.app shows the "Site not found" default page: site-not-found image I am using a basic
Continue readingIs Firebase Config still necessary if website will be hosted at Firebase itself?
Issue When a website is hosted at Firebase and not plan to initialize other project, do you still need to explicitly initialize it? // Initialize default app // Retrieve your own options values by adding a web app on //
Continue readingA second site has been created in my Firebase project
Issue I am new to Firebase but I am the owner of a project. I have also given permission to someone to be an "editor" of the project. Initally there was only 1 site and URL for my project. In
Continue readingHow Do I Remove This Error in Firebase: "This domain is already in use."?
Issue I’m trying to add a custom domain to an existing project but keep getting the error that “this domain is already in use.” I’m not using this domain anywhere else in any other project. There is only 1 other
Continue readingFirebase CLI not detecting NextJS Framework on hosting init
Issue Im trying to run firebase init hosting on the root folder of my NextJS repo but it doesn’t seems to detect the framework and continue to asks me for the build directory. firebase version 11.15.0 node version v16.13.2 next
Continue readingFirebase hosting using SvelteKit
Issue I have created a svelte app and building app using SvelteKit everything is works fine. I tried to deploy this app in firebase hosting but it fails. Sveltekit generating production build under .svelte-kit folder. I tried to change the
Continue readingI can't deploying my app with next js and firestore
Issue When trying to deploy my application with npm run build or in vercel or another service it doesn’t allow me, but in localhost it works fine and doesn’t show errors I use firebase, next js and typescript, the error
Continue readingPlugin installation hangs after Nativescript 2.5.0 update
Issue Did something significant change in version 2.5.0 of Nativescript? Resulting from an error of my own doing. I accidentally uninstalled Nativescript through negligence and reinstalled it bringing my version from 2.4.1 (I believe) to 2.5.0. In the process I
Continue readingUsing NS http.request to send a curl
Issue I am attempting to use the nativescript HTTP.request to send a curl for firebase push notifications. I have tested the curl and it works however I am getting a bad request error when i try to send it via
Continue readingnativescript firebase plugin, query by field
Issue I am using nativescript-plugin-firebase to query firebase database in my angular2-nativescript application. I went through the documentation on how to query the database by field. For example I would like to fetch address of a user, based on uid
Continue readingError when Initializing the Firebase component in Nativescript
Issue I am trying to setup Firebase in my Nativescript app(Angular 2- TypeScript). However, It prompts me the error as below. A valid Facebook app id must be set in the AndroidManifest.xml or set by calling Facebook.setApplicationId before Initializing the
Continue readingFirebase, with Angular & Nativescript – Getting user assigned value from Database
Issue I’m trying to setup an admin system in an app to limit access to certain areas of the application. It’s pretty basic and just creates a new object in firebase with the below information. Admin is set to false
Continue readingWebpacking firebase NativeScript
Issue I can’t get the firebase plugin to cooperate with webpack. I’m getting firebase is not defined Firebase is wrapped in an angular service and I am initializing it in my first component. Solution mentioned on github didn’t help me.
Continue readingHow to use the SDK Firebase (Android) in Nativescript
Issue I’m trying to use the sdk Firebase natively on Android but when I try to initialize Firebase using: com.google.firebase.FirebaseApp.initializeApp(utils.ad.getApplicationContext(); I receive this error System.err: Error: java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process *******. Make sure to call
Continue readingcan't get nativescript-plugin-firebase demo app to work
Issue I’m trying to get the nativescript-plugin-firebase demo app of Eddy Verbruggen to work but i keep getting errors, please help this is a link to the demo: https://github.com/EddyVerbruggen/nativescript-plugin-firebase-demo#nativescript-plugin-firebase-demo-app i have the newest Google Play Services and Google Repository installed
Continue readingI'm unable to get the size of a file to upload with nativescript
Issue I’m trying evaluate the mime-type and the size of a image uploaded using nativescript-imagepicker. However seems like the module itself can’t do it. How can I apply constraits to the file I’m uploading? (Like max size or just png
Continue readingHow to store array in firebase using Angular
Issue I need to store Array in Firebase using Angular. I am not able to achieve this. Kindly please help. What I am getting is this: what I want is this: -|bucketList |-zjSaw3efefsfsdffg 0-| bItem: ‘thailand’ | isCompleted: false 1-|
Continue readingHow to store array in firebase using Angular
Issue I need to store Array in Firebase using Angular. I am not able to achieve this. Kindly please help. What I am getting is this: what I want is this: -|bucketList |-zjSaw3efefsfsdffg 0-| bItem: ‘thailand’ | isCompleted: false 1-|
Continue readingIs there a Firebase storage rules syntax highlighter for WebStorm?
Issue I opened the Firebase friendlychat-web (GitHub) sample project (web folder) in WebStorm. Unfortunately, the storage.rules file opens without syntax highlighting. There’s no WebStore plugin for Firebase development. The language used for the storage rules is a custom one. Has
Continue readingFetch some (and not all) properties from a list in Firebase Realtime Database
Issue Suppose there is a list in my Realtime Database such that it has a user list at location userList as: user1: { age: 20, name: john } user2 : { age: 40, name: sam } user3: { age: 30,
Continue readingWhen sorting by multiple fields in Firestore with startAt and endAt not working correctly
Issue I am doing a document filter functionality. The problem is that when I receive a filter for the "max_players" and "name" fields, it returns an empty array when there are documents that meet the conditions. The error occurs when
Continue readingye.auth is not a function @angular/fire
Issue I’m using Angular and Firebase to do authentication. It’s working perfectly fine locally with no issues. However, when I deploy my application to Netlify and I’m getting an error: Uncaught TypeError: ye.auth is not a function If I try
Continue readingFirebase Firestore Database duplicates data on UI while using AngularFire
Issue I am having difficulty pinpointing the exact origin issue in my Angular 13.1 Project that uses @angular/fire 7.4.1 as its database. The issue seems to apply to each screen that I am displaying data that comes from my Firestore
Continue readingAngular Firebase (AngularFire) CRUD SHOW and EDIT pages?
Issue To learn AngularFire I’m trying to build a simple CRUD app. The INDEX and NEW pages went smoothly but I’m stuck on the SHOW and EDIT pages. I can’t get a selected record to display on the SHOW page.
Continue readingHow to find out if an email is already registered with Firebase Simple Login?
Issue I am using firebase (with Angularfire) for an html5 phone app. The user inputs only their email in the start screen, and then, depending on whether that email is already registered or not, the user is redirected to the
Continue readingWhy does AngularFire .set() waits forever for a response and doesn't proceed?
Issue I’m trying to create my first app in Angular using AngularFire to help with Firebase operations and after logging in with Twitter I’m trying to add the user as a document in my users collection. Here’s the full function:
Continue readingAngularFire storage listAll build array of promises and forkjoin
Issue I’m looking for a hand with creating an array of promises and executing them all with RXJS forkjoin to build a result set. I’m using AngularFire’s storage module to return all the uploaded files in a given location like
Continue readingHow to update() an array of maps-objects on Firestore in Angular or Angularfirestore?
Issue I know how to READ and WRITE a document in Firestore, But how does one update() a Value of and object in an array of Maps without removing/deleteing? Just changing one value if needed. I have a Form that
Continue readingFirebase total user count
Issue Is there a way to get all the users’ count in firebase? (authenticated via password, facebook, twitter, etc.) Total of all social and email&password authenticated users. Solution There’s no built-in method to do get the total user count. You
Continue readingAngularfire Firebase realtime database TypeError: n.auth is not a function
Issue I’m using this basic implementation to create a chatting application between 2 angular projects using the firebase(AngularFire library) real-time database. It works great on the local machine, but getting an error if I deploy to a remote server. Package.json
Continue readingHow to store the auto generated Firestore document ID in my custom ID using Angular
Issue I want to store the auro generated ID in campaignID, This is my function that stores campaigns : saveCampaign(campaignFields: Campaign) { return from( addDoc(collection(this.firestoreDB, ‘mail_campaign’), campaignFields) ); } what should I do ? Solution I am doing similar thing
Continue readingOR operator in .where AngularFire
Issue I want to get data from firebase .where() for example: get data from database with attributes type = ‘shirt’ and type = ‘pants’ So, essentially an OR operator in a .where function in AngularFire Firestore Similar to ‘||’ in
Continue readingNullInjectorError is thrown upon adding the AngularFireAnalyticsModule in Angular 13
Issue I am trying to add firebase analytics using @angular/fire with my Angular 13 project. When adding AngularFireAnalyticsModule to my app.module.ts file, I get the NullInjectorError in my browser console shown below. This results in the website not loading. NullInjectorError:
Continue readingAngular firebase fetching single item has race conditions
Issue I’m using angular and firebase together and I have a products array which i’m storing in my rootscope, though it takes time to load the items. My issues is that when I go to this page for example directly:
Continue readingAngular Router Event does not ended
Issue I have a problem when rendering my “Product Edit Page” when I click a specific item in my list. I have a method from a service that retrieves a specific data from firebase firestore. product.service.ts /** * Get specific
Continue readingAndroid Java get the average rating for each restaurant from Firebase
Issue I have tried thousands of times to get the values from each restaurant and then get the average from those ratings for each one. Here is my firebase where there are 3 users who have rated the restaurants: Firebase
Continue readingAndroid Firebase Realtime Database orderByChild is not working
Issue I’m trying to sort the restaurants by the average rating with orderByChild() but instead of returning them by sorting them by average rating it doesn’t. Here is my code: public void filterQuality(){ DatabaseReference mRatingDb = FirebaseDatabase.getInstance().getReference(); Query topQualityQuery =
Continue readinghow to render ssr project on firebase hosting without using functions?
Issue I built a website and deployed it to firebase and everything was rendered correctly. I changed the project architecture to be Server-Side-Rendering, which means that now I run ‘server.js’ file and not ‘index.html’. Is there any way to host
Continue readingRefresing the page on (submit) process Angular2 & Firebase
Issue I´m trying to apply Firebase to the Admin HTML template that I found yesterday. In the register page when I click on Sign in it reload the page instead of do the Firebase createUserWithEmailAndPass process. This is my HTML
Continue readingGetting installation error while installing firebase in angular project
Issue In my angular project I have to use firebase SDK for that I have to install firebase into my project. I tried to install it in my angular project using command “npm install angular-firebase –save”. It throws this error:
Continue readingHow to Authenticate Users in a similar way from Legacy Firebase? – NgRoute
Issue Earlier (from legacy docs) we can use this construction and it works fine: $routeProvider.when(“/home”, { // the rest is the same for ui-router and ngRoute… controller: “HomeCtrl”, templateUrl: “views/home.html”, resolve: { // controller will not be loaded until $waitForAuth
Continue readingAngularJS error: TypeError: v2.login is not a function
Issue I would like to call the login function when I click the login button but keep getting the error message in the title. Can someone point out the error in my script? login.js code below: /*global Firebase, angular, console*/
Continue readingValidation of form layouts in ngx-admin angular project
Issue With the help of forms of ngx-admin/forms/form layout. I made my own form. Now I want to apply validation to the form and send data to firebase. I tried using formgroup, ngmodel. Nothing works. Help me out. This is
Continue readingCannot display images in [innerHTML]
Issue I have HTML data stored in a field in my Firebase database, some of which contains <img src='[myImageUrl]’>. When displaying the field in my HTML file, the image has been blocked and I get the following message in my
Continue readingNativeScript push-plugin not displaying notifications on the notification bar
Issue I’m using NativeScript’s push-plugin to receive notifications sent from Firebase Cloud Messaging (FCM): public constructor( private _services: PushService, ) { const settings = { senderID: “XXXXXXXX”, badge: true, clearBadge: true, sound: true, alert: true, interactiveSettings: { actions: [{ identifier:
Continue readingError after add firebase plugin in my project
Issue I am add firebase plugin in my nativescript angular project and then run the project it show’s the error below: What went wrong: Execution failed for task ‘:app:processDebugManifest’. > Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
Continue readingNativescript 7 with Angular and Firebase xcodebuild failed with exit code 65
Issue Since I have updated my project on Nativecript7, I have a xcodebuild failed with exit code 65. I have tried many things to correct this issue but nothing works. It really seems that the error is coming from the
Continue readingNativeScript Angular – How can I add an android service to handle notifications? (java.lang.RuntimeException: Unable to instantiate service)
Issue I am trying to create an android service for handling Firebase messages (the nativescript-plugin-firebase library does not allow me to utilize data-only messages in the background), but I cannot seem to get the service to function correctly. Specifically, I
Continue readingType 'typeof firestore' has no call signatures nativescript 7 @nativescript/firebase plugin
Issue I have a project where I use nativescript with Angular and want to implement Firebase for the back-end. I followed the instructions in the doc of the package and the firebase.init() works without errors. But when I want to
Continue readingHow to enable access of firestore data to my nativescript app only?
Issue I am developing android/ios app using Nativesript + angular. I want to display a ListView in my app. For that ListView, I want to use firestore database product by Firebase as Backend data provider. What I want: 1. I
Continue readingNativescript Cannot fit requested classes in a single dex file
Issue I’ve been having trouble with this issue for quite a while and I have run out of things to try. I think I’ve tried every similar solution to this problem to no avail. I would like to see if
Continue readingAndroid Nativescript app crashing on start up
Issue I’m building a Nativescript app that will handle both the iOS and Android platforms. It’s an app that uses bluetooth permissions, firebase, and it’s targetSDK is 30 (due to Google Play Policy) My app is crashing on start up,
Continue readingIssue deploying firebase functions in angular app
Issue My current issue is that I am trying to deploy a basic function to firebase cloud functions however I keep getting two different errors. The first error is about the two parameters having an implicit any type. From what
Continue readingNode.js: The registration token is not a valid FCM registration token
Issue I am developing a Flutter mobile app. From my Nodejs backend, I am trying to send FCM Notifications to the app. I downloaded the private key file from firebase console’s project settings. Below is my Nodejs code. const errorCodes
Continue readingNode.js: install only required modules of googleapis
Issue I am using NodeJs to send FCM notifications. Below is my code const errorCodes = require(‘source/error-codes’); const PropertiesReader = require(‘properties-reader’); const serviceAccount = require("service-account.json"); const fetch = require(‘node-fetch’); var { google } = require(‘googleapis’); var MESSAGING_SCOPE = ‘https://www.googleapis.com/auth/firebase.messaging’; var
Continue readingUsing Firebase Auth with an external database
Issue I’m currently using Firebase to authenticate my users in a React/Node app, but I also want to store additional user data in my own database and I’m doing so by storing the Firebase uid on each user and I
Continue readingFirebase does not save empty array
Issue Hello I have a question I am making app with Firebase and React. The problem is that I want to have comment array but it is empty when the item is created. How can I solve this problem and
Continue readingSubscribe to parent collection and child collection at once
Issue Having a parent collection tables with documents which each one have a collection named orders. I want to subscribe to tables and listen to orders changes. What I tried: At my tables service watchTables(): Observable<any> { return this.afStore .collection(‘restaurants’)
Continue readingNumber of reads for multiple Firebase trigger functions doing similar things
Issue I have an onUpdate firestore trigger function that does multiple things: functions.firestore.document(‘document’).onUpdate((change, context) => { const updatedObject = change.after.data() if (updatedObject.first) { doFirst() } if (updatedObject.second) { doSecond() } }) I am thinking of splitting this trigger into 2
Continue readingFirebase function Node.js transform stream
Issue I’m creating a Firebase HTTP Function that makes a BigQuery query and returns a modified version of the query results. The query potentially returns millions of rows, so I cannot store the entire query result in memory before responding
Continue readingFirebase hosting deployment failing
Issue Running firebase deploy will run for a few minutes before giving me a timeout error Error: ESOCKETTIMEDOUT I’ve successfully deployed multiple times earlier, without changing anything but the frontend of my project (written in React). I have a separate
Continue readingReferenceError: Headers is not defined
Issue I’m building an api using express netlify-lambda and firebase, but stumbled into this error. When I visit the url to get the data I get a ReferenceError: Headers is not defined. So I’ve figured out it was a problem
Continue readingUsing analytics in Angular app only on a specific route using Firebase
Issue I have an Angular website which I would like to use Google Analytics with to track the page views. Im using Firebase through @angular/fire to host my website. Therefore, I added the @angular/fire library by ng add @angular/fire and
Continue readingHow can I use base64 encoded image to scan for explicit content in Cloud Function?
Issue According to their documentation, safeSearchDetection accepts base64 encoded images but when I do that it throws an error: No document found with that ID: Error: ENAMETOOLONG: name too long const visionClient = new vision.ImageAnnotatorClient(); const data = await visionClient.safeSearchDetection(encoded_img);
Continue readingHow do I increase the memory limit of firebase scheduled functions?
Issue The documentation mentions using .runWith({memory: "1GB"}), but how do I use this option with a scheduled function like this: functions.pubsub.schedule(‘every 10 minutes’).onRun(async (context) => { console.log("Do something"); }); Solution Just do as follows: functions.runWith({memory: "1GB"}).pubsub.schedule(‘every 10 minutes’).onRun(async (context) =>
Continue readingAngularfire Appcheck not initialized correctly
Issue I am using the angular fire 7.3 (modular) and is really unclear how to setup Appcheck. I am gettin a "Missing or insufficient permissions." error and as I immagined Appcheck is blocking all calls for storage and firestore. I
Continue readingIONIC / REACT Line 9:5: Expected an assignment or function call and instead saw an expression @typescript-eslint/no-unused-expressions
Issue When i try to make hook to get userdata from firebase. Like this import { useEffect, useState } from ‘react’; import { firestore } from ‘../../’ import { getAuth } from ‘firebase/auth’; export function useUserDetails() { const db =
Continue readingFirebase signInWithEmailAndPassword() 400() POST Error
Issue I’m currently implementing the new firebase auth() in my angularjs app and every time I call firebase.auth().signInWithEmailAndPassword(email, password) it does return my promise and error / user object, but at the same time throws the following error in the
Continue readingImporting AuthError in TypeScript using Firebase
Issue Is there a way I can check if an error is of type "AuthError" in TypeScript when using Firebase. I have an Https Callable function that has a try/catch block that includes the following: try{ await admin.auth().getUser(data.uid); // will
Continue readingtypescript error Cannot invoke an object which is possibly 'undefined'
Issue Hello so i’m new to typescript react and currently trying to make applications using typescript and tutorial from youtube. const RegisterCustomer: React.FC = () => { const [text, setText] = useState<string>(”); const [email, setEmail] = useState<string>(”); const [username, setUsername]
Continue readingRewriting firebase chained methods to promise.all
Issue I’ve created the following function to delete user and it’s dedicated collection which works fine. import * as admin from ‘firebase-admin’; import * as functions from ‘firebase-functions’; admin.initializeApp(); const Auth = admin.auth(); const UsersCollection = admin.firestore().collection(`users`); exports.deleteUser = functions.https.onCall((data,
Continue readingWhy can't I access the body or properties of this POST request send to a HTTP Firebase Cloud Function?
Issue I’m sending a POST request to a HTTP Firebase Cloud Function endpoint which contains the following body: { "securityContext": "edbsne0f17660e9ab49ad9bc3ddd4656230e0a9304bd15916f595b793da9109e1f7aa61e76c4afa91319011a7259b24ed583302334e22c5544c4e00506cf2fed93b28434e4088b22dda02712adf63bb6a370f", "event": "onInstall", "orgId": "7001935574", "dc": "AU" } But when I try to access any of those properties it shows
Continue readingAngular Fire Imports angular 13
Issue I try to import the AngularFireModule and the AngularFirestoreModule but it says Module ‘"@angular/fire/firestore"’ has no exported member ‘AngularFirestoreModule’. Module ‘"@angular/fire"’ has no exported member ‘AngularFireModule’. Here is what I’ve got in my app.module.ts: import { NgModule } from
Continue readingWhy Google Cloud Run's maximum number of concurrent requests is so low (1000) while the app server frameworks can support multiple 1000s per sec?
Issue From the google cloud run docs page: Concurrency is configurable. By default each Cloud Run container instance can receive up to 80 requests at the same time; you can increase this to a maximum of 1000. If my app
Continue readingFirebase -How to find the Firebase SDK version and Library I'm using
Issue I’m trying to file an issue in the firebase Github repo: firebase repo. This is my first time doing this and 2 of the things that are asked to provide are: Firebase SDK version: _____ Library version: _____ I
Continue readingMake http cloud function executable only by the project owner
Issue I am using http cloud function ( https://firebase.google.com/docs/functions/http-events ) to write documents to a firestore collection: exports.hello = functions.https.onRequest( (req: { query: { name: string } }, res: { send: (arg0: string) => void }) => { console.log(req.query.name); var
Continue readingData model for nested array of objects in Firestore
Issue I need advice from experienced NoSQL engineers on how I should structure my data. I want to model my SQL data structure to NoSQL for Google Cloud Firestore. I have no prior experience with NoSQL databases but I am
Continue readingFirebase Functions | Does imports gets called twice if used in different files?
Issue metrics.js const functions = require(‘firebase-functions’); const admin = require(‘firebase-admin’); admin.initializeApp(); exports.nightlyReport = functions.https.onRequest((request, response) => { // … }); index.js const functions = require(‘firebase-functions’); const admin = require(‘firebase-admin’); admin.initializeApp(); exports.metrics = require(‘./metrics’); exports.usageStats = functions.https.onRequest((request, response) => { //
Continue readingHow to use query from firestore using timestamp
Issue I am using a date range picker where I will let my user set the date range of the data that they will query from firestore. I already can get the value of the date range picker and store
Continue readingReturning Observable Metadata Instead of Expected Objects on nested snapshotchanges maps
Issue I’m trying to resolve a user ID to a displayname and add it to a service return. It seems like it’s working through console.log, but the actual return in the calling TS file returns observable nonsense. Service 1 getEventList(pid:
Continue readingEasy Notation for Optional Addition to an Object?
Issue I have a service with some optional inputs that are passed in depending on which form is calling the service. If I try and run this without the sid an eid inputs, the actual .add({}) to firestore with an
Continue readingConvert Promise to Observable
Issue I am trying to wrap my head around observables. I love the way observables solve development and readability issues. As I read, benefits are immense. Observables on HTTP and collections seem to be straight forward. How can I convert
Continue readingHow can I display the google user's profile picture correctly in angular?
Issue I’m using firebase authentication and I have some data on the user, fx. the photoURL. When I try to display the image with that url, the image doesn’t show up. But when I logged the url to the console
Continue readingTypeError: storageRef.getDownloadURL is not a function
Issue exports.add = async (req, res) => { const { body } = req; var storageRef = fb.firebaseAdmin .storage() .bucket( "gs://test-ptoject-2147f.appspot.com); var filename=’computer.jpg’; var path=’./computer.jpg’" ); try { if (filename == undefined) { return res.status(400).send({ message: ‘Please upload a file!’
Continue readingCan a cloud function safely execute async work after it has returned its promise?
Issue Can a cloud function safely execute async work after it has returned its promise? Consider the following pattern: exports.deleteUser = functions.auth.user().onDelete(async (user) => { const uid = user.uid; asyncTask1(uid); asyncTask2(uid); // don’t wait for the last task to finish
Continue readingHow to delete a field in a Firestore Document?
Issue How to delete a Document Field in Cloud Firestore? … I’m using the code below but I can not. this.db.doc(`ProfileUser/${userId}/followersCount/FollowersCount`).update({ [currentUserId]: firebase.firestore.FieldValue.delete()}) Is it possible, and if so, how? Solution You can try as shown below: // get the
Continue readingEDIT – Firebase Timestamp Causing 'Cannot read properties of null' error in HTML interpolation while adding new document
Issue session.startDate is a firebase timestamp, and I’m converting it with the toDate() function and a date pipe in my HTML. This worked great, until I started adding documents through a service. {{session.startDate.toDate() | date}} After adding in a new
Continue reading