Skip to content

Flutter Firebase setup errorFlutterFire: “FirebaseCommandException: An error occured on the Firebase CLI when attempting to run a command”

flutterfire configure stops with FirebaseCommandException: An error occured on the Firebase CLI when attempting to run a command, followed by a COMMAND: line and an ERROR: line. The FlutterFire CLI doesn’t call Firebase itself; it runs the Firebase CLI (the firebase command) and passes on its failure. The ERROR line is the real message, and the COMMAND line names the command that failed.

Short answer

Run the command from the COMMAND line yourself, usually firebase projects:list, to see the full error. Most often the Firebase CLI isn’t installed or isn’t on your PATH (install it and check firebase --version), or the saved login is missing or expired (firebase logout, then firebase login). Then run flutterfire configure again.

Why the Firebase CLI command fails, and the fix

  1. 01

    The Firebase CLI isn’t installed, or isn’t on PATH

    “The FlutterFire CLI currently requires the official Firebase CLI to also be installed” GitHub, FlutterFire CLI source (strings.dart)

    When the firebase command can’t be found, the COMMAND line shows firebase --version and the ERROR says the official Firebase CLI is required. Install it, open a new terminal, and check that firebase --version prints a version number.

    npm install -g firebase-tools
    firebase --version
  2. 02

    Not logged in, or the login expired

    “This command connects your local machine to Firebase and grants you access to your Firebase projects.” Firebase, Firebase CLI reference

    firebase projects:list fails with an authentication error when the saved login is missing or stale, which is common after switching Google accounts. Log out and back in with the Google account that has access to the Firebase project.

    firebase logout
    firebase login
    firebase projects:list
    flutterfire configure
  3. 03

    The account can’t see or change the project

    If projects:list works but your project is missing from it, or creating the Android or iOS app fails, the signed-in account lacks access. Ask the project owner to add the account in the Firebase console (Project settings, Users and permissions), then pass the project ID directly.

    flutterfire configure --project=your-project-id

Checked against the vendor’s docs on : Firebase: Add Firebase to your Flutter app; Firebase CLI reference (install, firebase login); FlutterFire CLI source: FirebaseCommandException.

Rather hand it over?

Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.

Related: “firebase: command not found” (Firebase CLI) · “flutterfire: command not found” · Firebase “google-services” plugin not found · Firestore DEADLINE_EXCEEDED

Questions

More on this error

Where do I find the full error?

Run the COMMAND line yourself in the same folder. When a Firebase CLI command fails, it usually also writes firebase-debug.log in the folder where it ran.

Can I skip flutterfire configure?

Yes, by adding google-services.json and GoogleService-Info.plist by hand, but Firebase’s Flutter setup guide uses flutterfire configure to write firebase_options.dart, so fixing the CLI is usually faster.

Can you fix it for me?

If one bug is the whole problem, the App Fix Ticket covers it: a written diagnosis first, then the fix. If the app has more going on, the Launch Check is a written check of the whole app. Each issue found is rated critical, high, medium or low, with where it is and how it was confirmed. No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.

A different error?

Describe it and get a written quote

Send the error and what you were doing. You get a written scope, a fixed price and a timeline; Simon replies by email, usually within one business day.