0

I'm trying to connect my flutter application to firebase and I see that I can implement this by using the flutterfire CLI.

I started by installing firebase CLI by using:

npm install -g firebase-tools

Then I installed the flutterfire CLI with

dart pub global activate flutterfire_cli

Everything was good until I tried:

flutterfire configure

With this command, I encountered this error:

enter image description here

I'm using latest version for node.js (v22.12.0) and for firebase (13.29.1) and the version I use for flutterfire is 1.0.0. I tried flutterfire 1.0.1-dev.4 but can't list my projects and get the same error

1
  • There seems to be some text ("Active code page: 1252") in from of the JSON response, which makes that response not valid JSON. It looks like this happens when flutterfire calls the firebase command to get a list of projects. You might want to see if you can reproduce this output with just the firebase command, and if so: file an issue on the GitHub repo for that project (as the output is not valid JSON). Commented Dec 23, 2024 at 18:32

1 Answer 1

1

The FlutterFire CLI tool internally calls out to the Firebase CLI (to get a list of projects, in your case) and expects a JSON response. Somehow the output in your case has an extra line in front of it:

Active code page: 1252

I tried to reproduce the output, but when I run this command on Firebase CLI version 13.29.1 (the latest version as of this writing):

% firebase --version
13.29.1
% firebase projects:list --json

I get this output:

✔ Preparing the list of your Firebase projects
{
  "status": "success",
  "result": [
    {
      "projectId": "basegv-e9065",
      "projectNumber": "312648983577",
      "displayName": "basegv",
      "name": "projects/basegv-e9065",
      "resources": {
        "hostingSite": "basegv-e9065"
      },
      "state": "ACTIVE",
      "etag": "1_42703802-0149-45b1-9264-7b9b9434f0b1"
    },
    ...
  ]
}

Note that this does not include the extra line that you get (and which makes the output invalid JSON). Unfortunately I don't see in the code of the Firebase CLI where this output may come from.

You'll want to see if you can reproduce the output, and if so, file a bug on either the Firebase CLI repo or the FlutterFire CLI repo.

Note that the issue was also posted on /r/Firebase a couple of months ago, so it seems to not be new (and thus likely only happens to a subset of the users of these tools).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.