1,878 questions
0
votes
0
answers
93
views
Can't connect to firebase auth emulator
I successfully had the firebase auth emulator working a few days ago, but it has mysteriously stopped working. I get a generic network error when trying to authenticate with any platform. I am using a ...
0
votes
0
answers
31
views
Firebase CLI fails with "An unexpected error has occurred" only when deploying storage
I'm trying to deploy Cloud Storage CORS settings using the Firebase CLI, but it consistently fails with a generic "Error: An unexpected error has occurred."
Project ID:
oa-maintenance-v2
...
0
votes
1
answer
49
views
firestore Emulator database query results are incorrect/unstable
I am using the Google Firestore Emulator locally for development. However, when I query the database data, I find that the results are inconsistent and not correct each time. Here is the detailed ...
0
votes
0
answers
39
views
CORS issues with remote Firebase Authentication Emulator on Firebase Studio
I recently broke a project I've been working on in a single Firebase workspace into two workspaces. Since then, I've been trying to connect my Angular frontend with the backend where the Auth Emulator ...
0
votes
0
answers
55
views
Unable to load environment variables after upgrading firebase-tools, firebase-admin, and firebase-functions
I recently upgraded to the latest versions of firebase-tools -> 14.10.1, firebase-admin -> 13.4.0, and firebase-functions -> 6.3.2. After the upgrade, I am no longer able to deploy the ...
2
votes
1
answer
68
views
Firebase Cloud Functions: Document deletion not working properly and execution timing issues [closed]
I have two Firebase Cloud Functions with onDocumentCreated triggers. The issue is that when my delete function tries to delete a document that doesn't exist, it somehow triggers the checker function, ...
1
vote
0
answers
33
views
Firebase Functions deployment fails with "Cannot find module" when using organized folder structure
I'm facing a persistent deployment issue after refactoring my Cloud Functions from a single large index.js file into an organized folder structure as recommended in the documentation. The deployment ...
0
votes
1
answer
577
views
Firebase MCP server shows “zero tools available” in Cursor and Windsurf despite valid config and auth
I’m trying to set up the Firebase MCP server in Cursor and Windsurf, but no matter what I try, it consistently returns:
No tools available
I’ve followed the official Firebase MCP documentation ...
0
votes
1
answer
59
views
FirebaseAuthException ([firebase_auth/unknown] An internal error has occurred. [ Failed to connect to /10.0.2.2:9099)
I keep receiving an error when running on flutter:
FirebaseAuthException ([firebase_auth/unknown] An internal error has occurred. [ Failed to connect to /10.0.2.2:9099)
I'm using a physical Android ...
0
votes
1
answer
93
views
Firebase deploy --only functions:myFunction in Gen2 Cloud Run - Pulling all my files with other functions
I am in the process of migrating from version 1 of Google Cloud Functions to generation 2 in cloud run. I've update my functions, but when they are deployed using --only functions:myFunction command ...
0
votes
0
answers
90
views
Cloud Function (1st Gen) failing with 'Firestore database does not exist' despite database being present in compatible multi-region (nam5)
I'm trying to deploy a Firebase Cloud Function (1st Generation, Node.js) that is triggered by a Firestore onCreate event. The deployment consistently fails with an error indicating that my Firestore (...
1
vote
0
answers
38
views
Firebase CLI: "Cloud resource location is not set" error even after setting location for Cloud Storage
I'm trying to set up Firebase Storage in a new Angular project using firebase init storage.
I already set the Cloud resource location (europe-west3) in the Firebase Console, but when I run the init ...
0
votes
1
answer
56
views
Imported modules becoming undefined in TypeScript Firebase Functions
I'm using Firebase Functions in TS. When executing npm run-script build and starting the emulator, here's what it throws:
TypeError: Cannot read properties of undefined (reading 'user')
at Object.&...
0
votes
1
answer
332
views
"Error: There was an error deploying functions" with no other info
I'm getting the error "There was an error deploying functions" when trying to deploy a newly created function. There is no other error info in the output:
i functions: updating Node.js 22 (...
3
votes
1
answer
468
views
Firebase Hosting "Site Not Found" Error after Successful Deployment (React + Vite)
I deployed my React app to Firebase Hosting, and the deployment logs indicate success, but accessing the hosting URL shows a "Site Not Found" error. The build is performed correctly, as it's ...
0
votes
1
answer
163
views
Firebase Emulator Suite Ignoring firebase.json port configuration, always defaults to 5002 for Hosting
I'm encountering a persistent issue with the Firebase Emulator Suite where the Hosting emulator consistently ignores the port configuration specified in my firebase.json file and always defaults to ...
0
votes
0
answers
30
views
Firebase database emulator opens new terminal instead of writing logs to file
Whenever I run firebase emulators:start it starts my emulators. The problem is that the Realtime Database emulator doesn't log the logs to the file database-debug.log. Instead it spawns a new terminal ...
1
vote
1
answer
345
views
Firebase Cloud Function - Can't find the storage bucket region
Trying to deploy my firebase cloud function and getting the following error:
Error: Can't find the storage bucket region
The function I'm trying to deploy looks like:
import {initializeApp} from &...
0
votes
1
answer
78
views
Firebase error Unable to sync Firebase Auth state
I'm using a service account to deploy using firebase cli from Github action.
This is the set of permissions this account has:
ROLE
roles/cloudfunctions.admin
roles/firebase.sdkAdminServiceAgent
roles/...
3
votes
1
answer
209
views
`firebase deploy` throws an error "TypeError Cannot read properties of null (reading 'length')"
When I run firebase deploy, I get the following error:
TypeError Cannot read properties of null (reading 'length')
What do I do to fix this?
3
votes
0
answers
112
views
Error with Firebase deploy, service account format issue
Error Message
[info] Functions deploy had errors with the following functions:
addmessage(us-central1)
[debug] [2025-03-27T22:03:14.260Z] Not printing URL for HTTPS function. Typically this means it ...
0
votes
0
answers
39
views
Error: Failed to load function definition from source: FirebaseError: Failed to parse build specification
On running "firebase emulators:start --only functions" this error shows
functions: Failed to load function definition from source: FirebaseError: Failed to parse build specification
const {...
2
votes
1
answer
54
views
Firebase.initializeApp() works in main() but fails in setUpAll() with PlatformException(channel-error) during unit testing with Firebase Emulator
I am trying to run unit tests for my Flutter project that uses Firebase Firestore, and I want to test it with the Firebase Emulator. I am able to initialize Firebase and connect to the Firestore ...
0
votes
1
answer
102
views
ERR_NETWORK_IMPORT_DISALLOWED when I run `firebase emulators:start`
I am implementing a payment gateway. I am using Firebase Cloud Functions to run these APIs. I have a functions folder that has my functions and everything is set up for them. I am emulating the ...
0
votes
1
answer
132
views
run firebase emulator in spring boot test
I need to migrate some documents from one collection to another. This migration runs when the application starts up. It checks if the migration is finished, if it's not, it will run it otherwise it ...
0
votes
0
answers
35
views
Firebase storage unit tests: Timeout when trying to upload files using emulator
When running the below test via npm test, I get the following output:
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure ...
1
vote
0
answers
32
views
How to deploy to Firebase in non-interactive mode with safe defaults?
When deploying firestore and functions code with firebase-tools, there are three questions that can come up (I don't remember them literally):
The following functions exist in your project but are ...
0
votes
3
answers
797
views
Firebase app hosting unable to retrieve secrets from cloud secret manager
I try to use cloud secret manager in combination with firebase app hosting, but app hosting can't fetch the keys from the secret manager when it's building.
My apphosting.yaml file looks like this:
...
0
votes
1
answer
57
views
Clear Firestore database after testing
I am running Android UI tests. I use a separate Firestore DB for testing. I want to delete all documents after a test finishes. This curl command works.
curl -v -X DELETE "http://127.0.0.1:8080/...
0
votes
1
answer
321
views
Getting PathNotFoundException: Cannot open file, path = 'flutter_app\android\build.gradle` after flutter 3.29.0 using firebase-cli
After upgrading to Flutter 3.29.0, Android build scripts have migrated to .kts files. When trying to connect my project to Firebase using the flutterfire CLI, I'm encountering a PathNotFoundException:
...
1
vote
0
answers
34
views
Firebase Realtime Database Emulator - Python Listener Not Triggering on Data Changes
I am running a Firebase Emulator with a Realtime Database and trying to create a listener in Python that detects changes inside the database.
My Code:
import os
import firebase_admin
from ...
1
vote
1
answer
169
views
Which permissions do I need to deploy a Firebase Function?
I'm implementing some changes to an old somebody's project and I need to deploy a firebase function since its backend it's all on Firebase.
The thing is that I've got the Cloud Functions Admin role, ...
1
vote
1
answer
105
views
How to use react-native-firebase auth emulation?
im using react-native-firebase v21.6.1 and im trying to start the auth service emulation. Ive gotten the firestore and functions emulation working.
firebase.json
"emulators": {
"...
0
votes
1
answer
266
views
Dealing with Firebase hosting issues
I have a flutter web app that I used firebase for its database, authentication and deployment, but whenever I deploy I only see this screen.
this is the firebase.json file
{
"database": {
...
0
votes
0
answers
235
views
FirebaseError: Could not detect runtime for functions
I'm trying to deploy a Vite+React+SSR app to Firebase, but Firebase won't recognize the runtime for my server script. I've created a file – server/index.js – running Express.js for SSR rendering of ...
0
votes
1
answer
95
views
While using Firebase emulator, FireStore transaction triggers cloud function (onDocumentUpdated) when it is not supposed to
In my project, I am using FireStore, Cloud Functions, and Firebase emulator in the backend while using Flutter in the backend. I have a transaction that reads a profile document and then uses the ...
0
votes
1
answer
328
views
firebase login fails to make request to https://auth.firebase.tools/attest
I'm running
firebase login
but it fails with
Error: Failed to make request to https://auth.firebase.tools/attest
What could be the issue?
I installed firebase with
npm install -g firebase-tools
0
votes
1
answer
266
views
Firebase Authentication Emulator in Flutter on Android: `Logging in as [email protected] with empty reCAPTCHA token`
I’m trying to use the Firebase Authentication Emulator with Flutter on Android, but I’m encountering an issue during signInWithEmailAndPassword. It logs the following message:
FirebaseAuth: Logging ...
0
votes
1
answer
228
views
Cloud Run service `app` does not exist in region `us-central1` in this project
I keep getting the following error when deploying to firebase.
firebase.json [
{
"config": {
"public": "static",
"ignore": [
"...
0
votes
1
answer
61
views
How can you kill all queued and running Firebase Emulator functions?
I'm working with Firebase Emulators to test production code locally. To do this I need to load state from a file into Firestore. This works fine, but I'm having an issue because I have listeners on ...
0
votes
0
answers
91
views
firebase/storage-resize-images fails to deploy after installation
After installing firebase/[email protected] via command line as:
firebase ext:install firebase/[email protected]
After this, I go through all the steps. As part of the logs ...
0
votes
1
answer
52
views
How to synchronize Python scripts and Espresso tests for E2E testing with Firebase Realtime Database?
I have developed an Android app that integrates with Firebase Firestore and Realtime Database. I now want to perform End-to-End (E2E) tests that involve Firebase.
Test Setup:
I am using Espresso for ...
1
vote
2
answers
39
views
Is using your production firebase object when using firebase emulators an acceptable practice? [closed]
I have initialised my firebase app as follows.
const PRODUCTION = false;
let firebaseConfig = {
apiKey,
...
};
// Initialize Firebase
// Check if any Firebase apps exist
const apps = getApps();
/...
1
vote
0
answers
144
views
Error: Could not find "dataconnect.yaml" in "C:\Users\..my_project\dataconnect"
I run in to this error while running firebase emulators:start
(node:8440) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --...
0
votes
1
answer
57
views
Avoiding duplicate data in a Realtime Database
In a realtime database (on Firebase), I have the following rules for the collection called Resource:
{
"rules": {
....
"Resource": {
".read": true,
...
0
votes
1
answer
100
views
Firebase Emulators: How to emulate specific functions in subfolders
I'm trying to emulate only specific Cloud Functions within my Firebase project. My functions are organized in subfolders within a "functions" directory.
My folder structure looks like this:
...
0
votes
1
answer
65
views
fluttterfire configure Failed to parse JSON response from Firebase CLI
I'm trying to connect my flutter application to firebase and I see that I can implement this by using the flutterfire CLI.
I started by installing firebase CLI by using:
npm install -g firebase-tools
...
2
votes
0
answers
62
views
running mocha in the context of a npm script works but running it directly from command line does not
So when I run npm run test_w_emulator or npm run test_w_pure
my mocha test completes properly
package.json
"scripts": {
"test_w_emulator": "sh ./test.sh",
"...
0
votes
0
answers
265
views
How to Fix Firebase Deploy Unexpected Error Occured?
firebase deploy --only hosting
=== Deploying to 'PROJECT'...
i deploying hosting
i hosting[PROJECT]: beginning deploy...
i hosting[PROJECT]: found 55 files in public
-
Error: An unexpected error ...
1
vote
1
answer
94
views
Local emulated Firestore returns empty DataSnapshot to Android emulator but works with Cloud Firestore
I'm trying to test my Android app, which uses data from Firebase Firestore. However, I have an issue when querying data using my local running Firebase Firestore Emulator and the Android Emulator.
...