firebase / firebase-tools

The Firebase Command Line Tools
MIT License
4.02k stars 935 forks source link

FirebaseCommandException: An error occured on the Firebase CLI when attempting to run a command. #4731

Closed Allan70 closed 1 year ago

Allan70 commented 2 years ago

[REQUIRED] Environment info

v11.2.1

firebase-tools: Windows

Platform: https://github.com/invertase/flutterfire_cli/issues/27

[REQUIRED] Test case

https://github.com/invertase/flutterfire_cli/issues/27

[REQUIRED] Steps to reproduce

firebase

flutterfire configure

firebase login --reauth

[REQUIRED] Expected behavior

Reauthenticate user to Firebase CLI

[REQUIRED] Actual behavior

firebase login --reauth This tool has encountered an error. Please file a bug on Github (https://github.com/firebase/firebase-tools/) and include firepit-log.txt

google-oss-bot commented 2 years ago

This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information.

Allan70 commented 2 years ago

Issue resolved by logging out of firebase CLI then promptly logging back in to the firebase CLI

firebase logout

followed by

firebase login
SowatRafi commented 1 year ago

Issue resolved by logging out of firebase CLI then promptly logging back in to the firebase CLI

firebase logout

followed by

firebase login

I have performed login and logout; however, it did not work.

francyfre commented 1 year ago

meeToo... dont work in any case flutterfire configure despite login and logout

RC-KapilDev commented 1 year ago

i Found 0 Firebase projects. ✔ Enter a project id for your new Firebase project (e.g. my-cool-project) · mynotes-flutter-ectjo
i New Firebase project mynotes-flutter-ectjo created successfully. FirebaseCommandException: An error occured on the Firebase CLI when attempting to run a command. COMMAND: firebase projects:create mynotes-flutter-ectjo --json ERROR: Failed to create project. See firebase-debug.log for more info.

I am Having a problem when creating a firebase project where I have run flutterfire configure after that I gave my Project Name mynotes-flutter-ectjo and then it throws me an error: i New Firebase project mynotes-flutter-ectjo created successfully. FirebaseCommandException: An error occured on the Firebase CLI when attempting to run a command. help me to resolve the issue

Ripudhman commented 1 year ago

i Found 0 Firebase projects. ✔ Enter a project id for your new Firebase project (e.g. my-cool-project) · ripudhman-first-project
i New Firebase project ripudhman-first-project created successfully. FirebaseCommandException: An error occured on the Firebase CLI when attempting to run a command. COMMAND: firebase projects:create ripudhman-first-project --json ERROR: Failed to create project. See firebase-debug.log for more info.

nizarzitouni commented 1 year ago

flutterfire configure i Found 9 Firebase projects. ✔ Select a Firebase project to configure your Flutter application with · ✔ Enter a project id for your new Firebase project (e.g. my-cool-project) · xxxxx-app i New Firebase project xxxxx-app created successfully. FirebaseCommandException: An error occured on the Firebase CLI when attempting to run a command. COMMAND: firebase projects:create xxxxx-app --json ERROR: Failed to add Firebase to Google Cloud Platform project. See firebase-debug.log for more info.

ajibolabalo commented 1 year ago

Having same issues above, I have reauthorized, re installed, logged out and In again, nothing works, thanks

hawkiboy commented 1 year ago

Same problem MacOS Monterey. I went to the console.firebase.google.com in the browser, created the project, then went back to the flutterfire configure and was able to select that project. Seems like this bug has been around for a long time.

jsare commented 1 year ago

Initially, the firebase logout & firebase login commands didn't help me either. So I went to my google console project and there on the "General" page I configured Default GCP resource location. Then I executed the firebase logout, firebase login & flutterfire configure commands and everything worked. I hope this solution will help someone 😊

TAYAB009 commented 1 year ago

Do not waste your time by login/logout. It happens when your project limits have been reached. Add new accounts, and deleting projects will not work as it requires 30 days to get effective. So the best solution is to add a new account by logging out current account.

sergioure commented 8 months ago

I solved the problem by typing all the commands from the CMD window, for the flutterfire command using cmd I entered the folder of my project and from there it worked, from VScode I never managed to do it.

walid-rehamnia commented 7 months ago

I solved the problem by typing all the commands from the CMD window, for the flutterfire command using cmd I entered the folder of my project and from there it worked, from VScode I never managed to do it.

Thank you very much, finally your solution has properly worked on windows 11

Arthsson commented 7 months ago

I solved the problem by typing all the commands from the CMD window, for the flutterfire command using cmd I entered the folder of my project and from there it worked, from VScode I never managed to do it.

Hi, this was the only way that worked for me, using the npm option to install the CLI and using 'flutterfire configure' through the cmd in the project root folder, thanks!

najmulmyself commented 3 months ago

if you are in a mac, just forget git bash from the VSCODE , open the project from zsh. and run flutterfire configure. it'll solve

GodServant-sketch commented 3 weeks ago

hellow guys, if your problem is that " ⠇ Registering new Firebase android app on Firebase project prifirefin-eng. FirebaseCommandException: An error occured on the Firebase CLI when attempting to run a command." run flutterfire configure after this he will show the options, if you dev in vs code go to, android/app/build.gradle

plugins { id "com.android.application" // START: FlutterFire Configuration id 'com.google.gms.google-services' // END: FlutterFire Configuration id "kotlin-android" // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. id "dev.flutter.flutter-gradle-plugin" }

android { namespace = "com.example.prifire" compileSdk = flutter.compileSdkVersion ndkVersion = flutter.ndkVersion

compileOptions {
    sourceCompatibility = JavaVersion.VERSION_1_8
    targetCompatibility = JavaVersion.VERSION_1_8
}

kotlinOptions {
    jvmTarget = JavaVersion.VERSION_1_8
}

get the name of android. namespace = "com.example.prifire" so follow this .... flutterfire configure ENTER select android or your platform ENTER put the name of the project "com.example.prifire" ENTER, i hope help you <3