Questions tagged [firebase-tools]

The Firebase CLI provide a variety of tools for managing, viewing, and deploying Firebase projects, as well as a set of emulators for Firebase products. It's available via the npm module firebase-tools.

The Firebase Command Line (CLI) Tools can be used to:

  • Administer your Firebase account

  • Interact with Firebase Hosting, our product to host your static HTML, JS, CSS, images, etc.

  • Interact with the Firebase Database, to read and write JSON data and deploy security rules

  • Interact with Firebase Storage, to read and write files and deploy security rules

  • Deploy your code to Cloud Functions for Firebase

  • Emulate Cloud Functions, Realtime Database, and Cloud Firestore locally for use in development and testing.

See also:

Related tags

903 questions
10
votes
1 answer

Error: Can't set headers after they are sent in firebase cloud function

I am using Firebase database for my android application. I am using cloud functions feature of it. I have coded functions and trying to test it on local machine. I am running this command to test it, cloud functions works well on firebase server not…
N Sharma
  • 33,489
  • 95
  • 256
  • 444
10
votes
1 answer

Firebase CLI deploy functions - Error: Failed to initialize a region

I'm having trouble doing firebase deploy --only functions for an app on Blaze plan. I have the latest firebase-tools CLI (v 3.5.0). I get the following error: === Deploying to 'myapp1234'... i deploying functions i functions: ensuring necessary…
Radu Cugut
  • 1,663
  • 1
  • 16
  • 18
9
votes
2 answers

How to call a firebase functions from a unit test using Firebase Emulators?

I have the firebase emulators running. My application can call a firebase cloud function that can create a custom user claim if the user is allowed to (depending on a value in the database) I'm trying to invoke that function: import * as firebase…
9
votes
4 answers

How to import test data into Firebase Firestore emulator from production for easy testing?

I am building a firebase function that listens to a trigger and sends a push notification to users. The trigger is based on firestore data that's too complex for me to manually re-recreate every time on firestore emulator. I tried emulating…
Zorayr
  • 23,770
  • 8
  • 136
  • 129
9
votes
1 answer

Firebase deploy firebase.json only

Can I deploy just the hosting configuration file, firebase.json instead of deploying all my assets ie. html files, images etc? If so, how? I'm currently doing firebase deploy --only hosting but that will deploy all the assets. I'm asking because I…
user3240644
  • 2,211
  • 2
  • 24
  • 35
9
votes
6 answers

Firebase Serve Error

I am new to firebase and am trying to make a simple app that utilizes user authentication. At this point in the project I am trying to run firebase on a local server using CLI commands. I have set up firebase init and firebase deploy. When I type…
Vince
  • 101
  • 2
  • 6
9
votes
1 answer

Can't deploy project to firebase

I try to deploy my app to firebase but it's fail. $ firebase deploy --project af2test ⚠ Your CLI authentication needs to be updated to take advantage of new features. ⚠ Please run firebase login --reauth Error: Unable to authorize access to…
medici
  • 199
  • 1
  • 4
  • 11
9
votes
2 answers

firebase deploy is slow and not responding

Running the deploy command to a site just makes the Terminal blink as if it was stuck in some heavy operation. And nothing would happen. I actually didn't try running with the --debug flag. First thought is that I'm behind a company proxy. So I…
Mazze
  • 1,354
  • 4
  • 17
  • 35
9
votes
3 answers

Firebase deploy stucks / hangs without error message

The command Firebase deploy always stucks when I run it. Here is the verbose info: $ firebase deploy --token "SOMETOKEN" --debug ---------------------------------------------------------------------- Command: /usr/local/bin/node…
Alex
  • 103
  • 1
  • 6
8
votes
2 answers

Firebase: Error (auth/invalid-api-key) with demo project

I am trying to write some automated tests with the Firebase client sdk. These tests are supposed to use the Firebase Auth Emulator. In order to avoid screwing up production data, I am using the emulators with a demo project id (as described in the…
8
votes
4 answers

"Firebase Error : Firestore has already been started and its settings can no longer be changed." connecting Firebase v9 with Firestore Emulator

I have updated to Firebase v9 a few weeks ago and I have an issue when trying to connect my Firebase App to Firestore Emulator. firebase.js (my VueJS plugin, where I setup Firebase) : import { initializeApp, getApps } from "firebase/app" import {…
8
votes
1 answer

Firebase AppCheck when working with Emulator on localhost

How are developers working with Firebase App Check when developing locally using the emulator on localhost? Are you disabling App Check on localhost entirely? Or are you able to emulating App Check locally? Firebase has some instructions on using…
Johnny Oshika
  • 54,741
  • 40
  • 181
  • 275
8
votes
1 answer

initializeAdminApp and clearFirestoreData method no longer available after update to @firebase/rules-unit-testing 2.0

I just update my dependency to "@firebase/rules-unit-testing": "^2.0.0" and it breaks my code. my code was import * as firebase from "@firebase/rules-unit-testing"; function getAdminFirestore() { return firebase.initializeAdminApp({ projectId:…
Alexa289
  • 8,089
  • 10
  • 74
  • 178
8
votes
1 answer

How do I create additional buckets in Firebase Cloud Storage Emulator

I am trying to create additional storage buckets in the new Firebase Cloud Storage Emulator. I see no option in the EmulatorUI and have found no resources online. Is this even possible?
actuallymicah
  • 709
  • 7
  • 10
8
votes
1 answer

Firebase Emulator start with 2 realtime databases?

When starting the emulator I see 2 databases in the realtime database emulator. One with and the other -default-rtdb . Can anybody explain or reference some docs on why this is? This is my setup files firebase.json { …
Norfeldt
  • 8,272
  • 23
  • 96
  • 152