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
4
votes
2 answers

Why is admin.firestore.FieldValue undefined when running code in firebase emulator?

In my firebase cloud functions, I have upgraded firebase-admin to version 11.0.0 (from 9.12.0) and engines from 12 to 16. After that admin.firestore.FieldValue is undefined when I run my code in the emulator. When I deploy the code it works…
4
votes
0 answers

Firebase auth emulator's console "sign in as" link, for passwordless sign in testing, is not resulting in successful auth

When using firebase auth emulator, the console where firebase emulators:start is running, will output a link to emulate sign in. My app is being built in Flutter. The following code creates the sign in link that is output in the emulator…
Zelf
  • 1,723
  • 2
  • 23
  • 40
4
votes
0 answers

Firebase Emulator TIMEOUT: Port 8080 on localhost was not active within 60000ms

I've tried to set up Firebase Local Emulator Suite on Next.js app by following the tutorial on Firebase docs. But when I run: $ firebase emulators:start My terminal returned an error: ⚠ emulators: Support for Java version <= 10 will be dropped…
nitsir
  • 65
  • 1
  • 7
4
votes
1 answer

Firebase: Still old version after deploy to hosting, how?

I have received for maintenance a rather primitive react app hosted on firebase (developed by someone else). Now weird things are happening: I change content of a file (even simple text change) Run deploy (hosting) - I see in firebase console that…
Andy Victors
  • 335
  • 2
  • 9
4
votes
1 answer

Firebase Emulator on Bitbucket Pipeline

I'm trying to run Firebase Emulator on Bitbucket Pipeline. It fails because "java is not installed". How can I "install java" on a Bitbucket Pipeline. Or is there another way to get it to work? My step currently looks like this: - step:…
Phong6698
  • 389
  • 1
  • 3
  • 15
4
votes
0 answers

How do I resolve the "firebase init firestore" error

Anytime I run firebase init firestore I get this error Error: It looks like you haven't used Cloud Firestore in this project before. Go to https://console.firebase.google.com/project/cresblog-3c03f/firestore to create your Cloud Firestore…
4
votes
1 answer

Firebase Emulator crashes when exporting on exit (usually)

I am using firebase v10.1.0 on Win 11 I start the emulator with this command firebase emulators:start --import=fssave --export-on-exit i emulators: Starting emulators: auth, firestore, storage ! emulators: It seems that you are running multiple…
Con A
  • 51
  • 4
4
votes
1 answer

How to send context parameter in unit test to a firebase functions running on the functions emulator

I manage to start the firebase emulators and load a cloud function. Now I want to write a test. PROBLEM I use chai-http to call the function in the emulator but I do not succeed in sending a context to the function. when calling the function using…
koma
  • 6,486
  • 2
  • 27
  • 53
4
votes
1 answer

Firebase Storage Emulator rules not working

My app is working just fine but when I use the Firebase emulators, I have a problem with the Storage rules not being obeyed. I have downloaded the storage.rules file and it is in the same directory as the firebase-json file. The Emulator suite…
Stewart Lynch
  • 875
  • 9
  • 26
4
votes
1 answer

Firebase Web + Functions + App Check auth error when using emulator on localhost

I run a local emulator for firebase functions. When I'm executing an onCall function from the frontend side I see this message in my functions'…
4
votes
0 answers

Using firebase storage emulator in flutter gives me OS Error: Connection refused, errno = 111, address = localhost, port = 39280

I am trying to use firebase emulator, it all works out, but not for the storage emulator. Below is the code i am using, i have tried 10.0.2.2 as well but stil the same error. void main() async { Bloc.observer = AppBlocObserver(); …
Martin
  • 101
  • 6
4
votes
1 answer

FirebaseError: Firebase: A network AuthError (such as timeout, interrupted connection or unreachable host) has occurred. (auth/network-request-failed)

I'd like to set up my Angular app to use Firebase's emulators and followed this guide to set up my app.module.ts as follows: import { USE_EMULATOR as USE_AUTH_EMULATOR } from '@angular/fire/compat/auth'; import { USE_EMULATOR as…
4
votes
1 answer

Do I need a firebase service account when I only want to use the emulator?

When connecting to the Firebase Emulator Suite, using the java admin SDK, how can I initialize the app without existing service account credentials? I have the environment variable FIREBASE_DATABASE_EMULATOR_HOST=localhost:9000 set, and the emulator…
Morten Nyhaug
  • 263
  • 2
  • 13
4
votes
1 answer

Use Firebase Emulator without an internet connection

It seems that when you use the firebase emulator but have no internet connection you can't load the firebase scripts like http://localhost:5000/__/firebase/8.4.2/firebase-app.js the local server that is created by firebase emulator must be actually…
masonCherry
  • 894
  • 6
  • 14
4
votes
2 answers

How to authenticate firebase cloud functions in Functions Emulator using the users stored in Firebase Authentication emulator?

My firebase cloud function contains protected routes that can only be accessed when passed a valid IdToken in the request header. cloud functions API looks like this functions/index.js const functions = require('firebase-functions'); const admin =…