invertase / flutterfire_cli

A CLI to help with using FlutterFire in your Flutter applications.
Apache License 2.0
170 stars 47 forks source link

[bug]: fails to create new project when there are no projects on firebase #283

Open PedroHBrasil opened 5 months ago

PedroHBrasil commented 5 months ago

Is there an existing issue for this?

CLI Version

1.0.0

Firebase Tools version

13.7.2

Flutter Doctor Output

[✓] Flutter (Channel stable, 3.19.5, on Pop!_OS 22.04 LTS 6.8.0-76060800daily20240311-generic, locale en_US.UTF-8) • Flutter version 3.19.5 on channel stable at /usr/bin/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 300451adae (3 weeks ago), 2024-03-27 21:54:07 -0500 • Engine revision e76c956498 • Dart version 3.3.3 • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /home/pedrohbrasil/Android/Sdk • Platform android-34, build-tools 34.0.0 • Java binary at: /usr/local/android-studio/jbr/bin/java • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874) • All Android licenses accepted.

[✓] Chrome - develop for the web • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop • Ubuntu clang version 14.0.0-1ubuntu1.1 • cmake version 3.22.1 • ninja version 1.10.1 • pkg-config version 0.29.2

[✓] Android Studio (version 2023.2) • Android Studio at /usr/local/android-studio • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

[✓] VS Code (version 1.88.1) • VS Code at /usr/share/code • Flutter extension version 3.86.0

[✓] Connected device (2 available) • Linux (desktop) • linux • linux-x64 • Pop!_OS 22.04 LTS 6.8.0-76060800daily20240311-generic • Chrome (web) • chrome • web-javascript • Google Chrome 123.0.6312.122

[✓] Network resources • All expected network resources are available.

• No issues found!

Description

Command: flutterfire configure

When there are no projects on firebase, the tool fails to create a new project with a misleading error message saying the specified project id already exists.

Steps to reproduce

  1. Login with firebase cli firebase login with an account that doesn't have any projects.
  2. Run command flutterfire configure.
  3. As prompted, enter the name for a new project.
  4. Read the error message.

Expected behavior

When running, the cli should successfully create a new project on firebase and proceed normally.

Screenshots

Screenshot from 2024-04-15 16-46-02

Additional context and comments

I could give it a shot at fixing it, but some guidance would be appreciated since I have zero familiarity with this tool and firebase.