Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 482 Vote(s) - 3.51 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FirebaseCommandException: An error occured on the Firebase CLI when attempting to run a command

#1
Flutterfire just added a CLI for us to use, but I'm having a problem with the `flutterfire configure command`. I keep getting this error:

> i Found 0 Firebase projects. Selecting project liveasy-1.
FirebaseCommandException: An error occured on the Firebase CLI when attempting to run a command.
COMMAND: firebase --version
ERROR: The FlutterFire CLI currently requires the official Firebase CLI to also be installed, see

[To see links please register here]

for how to install it.

Even though I've installed the Firebase CLI and can run `firebase --version` without any issues. I installed the standalone binary and when that didn't work I installed it with npm as well. I can log in and see my projects list, but running `flutterfire configure` seems to be an issue. I can't also access any Firebase commands in Visual Studio Code.

Am I supposed to add something to the [PATH][1] in environmental variables? I've already added the cache/bin/ where flutterfire resides, but I don't know how to do the same for Firebase.


[1]:

[To see links please register here]


Reply

#2
Run:

firebase logout

Then:

firebase login

The issue is that your token expired.
Reply

#3
I had the same issue and tried everything I could. but npm method worked really well.
Install nodejs from [

[To see links please register here]

][1]


[1]:

[To see links please register here]


this will also install npm to your system. then just run the command `npm install -g firebase-tools`

and you are good to use all firebase functions

All information I told I gained it from documentation. Developers best friend
Reply

#4
For me it was that my authentication token was expired. As @DeePanShu pointed out, you should do

firebase logout && firebase login

But, if that's not the case, I highly recommend to read the file generated when the error happens (it will be saved in your app folder). There's a description of the problem, so you can avoid trying out solutions without knowing the actual problem.
Reply

#5
I have tried all of the other answers, but there is the one solution that worked which makes sense (I'm so disappointed that I've forgotten about this).

My Flutter project path was inside of folders with symbols/spaces/uppercases in the name, once I've changed it, it worked.

Reply

#6
In my case, it was a case of **having a short name**. I wanted to create a project with the name **kwss**. This did not go through, but on changing the name to something else like **```hello_world```**, this worked and did not get the error again.

I'm not saying this is the solution, but it might work for someone's case.

Reply

#7
I went through the same issue on [Windows][1]. I figured out that installing Firebase CLI using the *binary file didn't work* for me (even after [Ventosus' answer][2]), so here is my answer.

I had to install the Firebase CLI using the npm command ([Node.js][3] is **required** to use this command):

npm install -g firebase-tools

I've then been able to run the command: `flutterfire configure`

Here is the documentation you have to follow in case you don't have Node.js or if you need any information: [Firebase CLI documentation][4]

[1]:

[To see links please register here]

[2]:

[To see links please register here]

[3]:

[To see links please register here]

[4]:

[To see links please register here]




Reply

#8
For solving the standalone issue part of your question:

> **1** copy the downloaded .exe to your flutter project folder
>
> **2** rename it from firebase-tools-instant-win to just firebase (exe)
>
> **3** run "firebase login" from cmd line in the folder where you put the .exe and continue with flutterfire configure

This is a quick setup for a single project. If you plan to use Firebase CLI across multiple projects, you need to rename and move the .exe to a suitable location and fix environment/paths issues.

Reply

#9
For Windows users, make two CLI installations

*[Firebase CLI reference, Windows][1]*

1. Windows installation. It has a GUI, which is good
2. npm installation - for the FlutterFire module to be recognized:

`npm install -g firebase-tools`

Do not use Bash. Use the [cmd][2] to execute FlutterFire commands.

[1]:

[To see links please register here]

[2]:

[To see links please register here]





Reply

#10
For macOS users:

Enter `dart pub global activate flutterfire_cli` on your terminal.

It will successfully install `flutterfire_cli`, but with the warning:

The solution is to update the environment path.

Open terminal.

1) `vim ~/.zshrc`

2) Press the <kbd>I</kbd> key to activate insert mode.

3) Add -- `export PATH="$PATH":"$HOME/.pub-cache/bin"`

4) Press <kbd>Esc</kbd> then write `:wq` in the terminal and press enter to exit Vim.

5) Reopen the terminal and check `flutterfire --version`

6) `firebase login`

7) `flutterfire configure`


Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through