invertase / flutterfire_cli

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

[bug]: Failed to parse JSON response from Firebase CLI #308

Closed kingwill101 closed 4 days ago

kingwill101 commented 3 weeks ago

Is there an existing issue for this?

CLI Version

1.0.0

Firebase Tools version

13.8.3

Flutter Doctor Output

flutter doctor -v                                                                                                                                                              ✔ 
[✓] Flutter (Channel stable, 3.22.1, on Manjaro Linux 6.9.2-1-MANJARO, locale en_US.UTF-8)
    • Flutter version 3.22.1 on channel stable at /home/kingwill101/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision a14f74ff3a (12 days ago), 2024-05-22 11:08:21 -0500
    • Engine revision 55eae6864b
    • Dart version 3.4.1
    • DevTools version 2.34.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /home/kingwill101/Android/Sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /home/kingwill101/.local/share/JetBrains/Toolbox/apps/android-studio/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
    • All Android licenses accepted.

[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome-stable not found)
    ! google-chrome-stable not found is not executable.

[✓] Linux toolchain - develop for Linux desktop
    • clang version 17.0.6
    • cmake version 3.29.3
    • ninja version 1.12.1
    • pkg-config version 2.1.1

[✓] Android Studio (version 2023.3)
    • Android Studio at /home/kingwill101/.local/share/JetBrains/Toolbox/apps/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
    • android-studio-dir = /home/kingwill101/.local/share/JetBrains/Toolbox/apps/android-studio
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)

[✓] IntelliJ IDEA Ultimate Edition (version 2024.1)
    • IntelliJ at /home/kingwill101/.local/share/JetBrains/Toolbox/apps/intellij-idea-ultimate-2
    • Flutter plugin version 79.2.3
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] Connected device (1 available)
    • Linux (desktop) • linux • linux-x64 • Manjaro Linux 6.9.2-1-MANJARO

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

! Doctor found issues in 1 category.

Description

runnimg flutterfire configure throws

flutterfire configure                                                                                                                                            ✔ 
⠴ Fetching available Firebase projects...                                                                                                                                                     
Failed to parse JSON response from Firebase CLI. JSON response: {
  "status": "success",
  "result": [
    {
      "projectId": "linkboard-dart",
      "projectNumber": "387788898345",
      "displayName": "linkboard-dart",
      "name": "projects/linkboard-dart",
      "resources": {
        "hostingSite": "linkboard-dart",
        "realtimeDatabaseInstance": "linkboard-dart-default-rtdb"
      },
      "state": "ACTIVE",
      "etag": "1_39af2f68-7bb2-445a-af4c-8658a5ff093d"
    },
    {
      "projectId": "memweb",
      "projectNumber": "725019922710",
      "displayName": "memweb",
      "name": "projects/memweb",
      "resources": {
        "hostingSite": "memweb"
      },
      "state": "ACTIVE",
      "etag": "1_c24a1659-b8a9-4877-ad05-38beae49bcf5"
    }
  ]
}{
  "status": "error",
  "error": "Timed out."
}
FormatException: Unexpected character (at line 28, character 2)
}{
 ^

seems related to https://github.com/invertase/flutterfire_cli/issues/262

Steps to reproduce

  1. run flutterfire configure
  2. see error

Expected behavior

project should have all the necessary firebase configurations created

Screenshots

See asciinema recording asciicast

Additional context and comments

No response

russellwheatley commented 3 weeks ago

@kingwill101 - We fixed this in the dev version. See here

Try:

dart pub global activate flutterfire_cli 1.0.1-dev.1

Let me know how it goes 👍

russellwheatley commented 4 days ago

Closing due to inactivity.