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

#11
Download the standalone binary for the CLI for Windows. It will download an executable, `firebase-tools-instant-win.exe`.

Copy it into your preferred location

The important part is to enter the path where the executable resides in the *Environment variables*:

*Environment variables* → *System variables* → *Path* → *New* → Enter the path

Launch the file and enter the necessary commands.

firebase login

dart pub global activate flutterfire_cli

cd [your project directory]
flutterfire configure


Reply

#12
In case you run into another problem, especially this 👇

```lang-none
Unhandled exception:
FormatException: Unexpected character (at character 1)...
```

After [Ventosus' answer][1], check [this GitHub issue][2] out. It helped me solve this issue.

[1]:

[To see links please register here]

[2]:

[To see links please register here]


Reply

#13
## The Problem:

Flutter Cli needs two CLI supports (FlutterFire and Firebase), but here only FlutterFire is installed and added to your environment configuration. Firebase also needs Firebase cli.

## The Solution:

The solution is to add **C:\Users\<username>\AppData\Roaming\npm**. This path in your environment configuration, and then restart your [cmd][1], PowerShell, or [Visual Studio Code][2].

By this, you will let your system know that here is an executable file, which should run globally on your machine.

[1]:

[To see links please register here]

[2]:

[To see links please register here]


Reply

#14
For a Mac, run `flutterfire configure` as a superuser, hence run
`sudo flutterfire configure` in the terminal without quotes.

Reply

#15
The binary file didn't work for me either. But I found another way that worked for me.

1. Go to the project's root.
2. Open the Command prompt.
3. Run `npm install -g firebase-tools`. (Make sure Node.js is installed)
4. There may be a couple of *WARN* deprecations, but never mind.
5. Then run `flutterfire configure`
6. You will be asked to select the project and the mobile versions you are willing to build.
7. Then make sure that a file was generated in 'lib\firebase_options.dart'

[See the link for the image][1]

[1]:

Reply

#16
I had the same problem.

In my case, it was the Node.js version. Try to do: `firebase --version` and if you have this message:

> Firebase CLI v11.17.0 is incompatible with Node.js v12.14.0 Please
> upgrade Node.js to version ^14.18.0 || >=16.4.0

Just upgrade your Node.js version.
Reply

#17
It's fixed with me just by running the command:

`"firebase login --reauth"`

If your (Firebase debug log) contains a 401 error, then it just needs to be reauthorized.

To make sure that the this is the problem, run:

`firebase projects:list `
and it will give you an error! then the solution is to reauthorize by the command above.

See: *https://stackoverflow.com/questions/57941289/how-do-i-solve-error-failed-to-list-firebase-projects-see-firebase-debug-log*

Reply

#18
For me, it works only in the command prompt (not PowerShell or the Node.js runtime): Microsoft Windows

Reply

#19
Make sure that you are using the same Gmail account, signed in Firebase CLI and Firebase console.

Then Relogin into the Firebase CLI

1. Firebase logout

2. Firebase login


Reply

#20
If you have installed Firebase CLI with [npm][1] and still getting the error, try to restart your system and then try running the commands.

[1]:

[To see links please register here]





Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

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