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
7
votes
1 answer

Firebase deploy without login

I'm trying deploy my firebase app. But when I try run 'firebase deploy', I got: Is any way to deploy the app automatically ( without human login to dashboard) ? I care only to send on firebase security rules.
6
votes
0 answers

Stuck or hanging issue when deploying a NextJs app to firebase hosting

I have a NextJS app that I am trying to deploy to firebase hosting, however during the firebase deploy command it seems to get stuck and hang indefinitely (several hours waiting to no avail). The deployment log is below This is the…
6
votes
1 answer

Firebase functions emulator does not watch for changes

Environment info firebase --version --> 11.1.0 node -v --> v16.15.1 npm -v --> 8.11.0 Platform: Pop!_OS 22.04 LTS 64-bit Steps to reproduce 1). run firebase init functions 2). Select Use an existing project and choose my project. 3). Select…
NoahGav
  • 251
  • 4
  • 12
6
votes
2 answers

Firebase emulator setup: getFirestore() or getFirestore(firebaseApp)?

When researching how to connect your app to the Firebase emulators (e.g., the Firestore emulator), I found the main documentation stating that we'd do it like this (Web version 9): import { getFirestore, connectFirestoreEmulator } from…
6
votes
0 answers

Error when testing against Firebase Emulator 'Expected type 'Pa', but it was: a custom Fa object'

I'm currently attempting to execute the following test in Cypress. before(async () => { testEnv = await initializeTestEnvironment({ projectId: MY_PROJECT_ID, firestore: { host: "localhost", port: 8080, }, …
6
votes
1 answer

Emulated firstore: Firestore (8.5.0): Could not reach Cloud Firestore backend

Sorry for the title, I'm not sure if this is the correct problem I'm facing but, I'll try and describe what I'm trying to do. I've updated the title as the error in it seems to be my issue (original: "Emulated firstore not saving documents?"). I…
6
votes
1 answer

How to import exported auth data into Firebase emulators?

Can Firebase emulators import "exported Firebase auth data"? Firebase emulators imports exported Firestore data, which is exported to gCloud then downloaded to my machine. The emulators can also import the auth data it exports, but I can't figure…
stackbeats
  • 163
  • 1
  • 8
6
votes
0 answers

Firebase Emulator exported data corrupted on machine restart

I typically start my emulator like this: firebase emulators:start --import=test/local-dev --export-on-exit=test/local-dev The aim: import data that was previously exported into the local-dev folder, and save any data when the emulator exits. Upon…
kip2
  • 6,473
  • 4
  • 55
  • 72
6
votes
3 answers

How to cache firebase/emulators directory using GitHub Actions

I am using the firebase emulator to run my tests and, I received a warning about a chance of optimization using the cache system. How I can do this? It appears you are running in a CI environment. You can avoid downloading the Firestore Emulator…
Rodrigo
  • 135
  • 4
  • 45
  • 107
6
votes
0 answers

Firebase emulator Warning, estimating Firebase Config based on GCLOUD_PROJECT. Initializing firebase-admin may fail

I am receiving a warning when running Jest with firebase emulators The warning {"severity":"WARNING","message":"Warning, estimating Firebase Config based on GCLOUD_PROJECT. Initializing firebase-admin may fail"} My test case describe('Functions',…
Rodrigo
  • 135
  • 4
  • 45
  • 107
6
votes
4 answers

Firebase Firestore: Cannot call useEmulator() after instance has already been initialized

I am using Firebase Emulator Suite to test my Firebase Cloud Functions before deploying them into production. Exploring this approach to trigger the callable firebase cloud functions from my Andriod device. My App is crashing when I run…
6
votes
1 answer

How do I emulate a Firebase extension?

I just installed a Firebase extension, and can see it in my Console. How do I get my local Functions emulator to use the extension as well? When I start the emulators using the CLI, I can see that the functions emulator is 'Watching [locally defined…
6
votes
0 answers

How to enable hot reload when using Webpack in watch mode and Firebase emulators:start

I'm starting off a new project and I though it would be nice to use the full firebase emulators suite. Se here's what I've thought could work: // THIS IS MY package.json SCRIPT "start-firebase-build": "set NODE_ENV=development_firebase&& webpack…
6
votes
3 answers

Firebase test auth cloud functions locally

exports.sendWelcomeEmail = functions.auth.user().onCreate((user) => { console.log(user.uid); console.log(user.email); console.log(user.displayName); }); exports.getUserInfo = functions.https.onCall(async (data, context) => { // get array of…
6
votes
0 answers

Is there a way to add domains to the whitelist of firebase authentication through CLI?

For Firebase Authentication, when you're to sign in/up on your application, you need to have the host for that app registered as the whitelisted domain in the Firebase Console in order for the operation to proceed. Is there a way to do this through…