flutterfire_cli icon indicating copy to clipboard operation
flutterfire_cli copied to clipboard

[bug]: flutterfire configure returns Unhandled exception: FormatException: Unterminated string

Open jennabiiiii opened this issue 3 years ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues.

CLI Version

0.2.2+2

Firebase Tools version

11.0.1

Flutter Doctor Output

[✓] Flutter (Channel stable, 3.0.1, on macOS 12.4 21F79 darwin-x64, locale en-US) • Flutter version 3.0.1 at /Users//Developer/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision fb57da5f94 (2 weeks ago), 2022-05-19 15:50:29 -0700 • Engine revision caaafc5604 • Dart version 2.17.1 • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at /Users//Library/Android/sdk • Platform android-32, build-tools 30.0.3 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 10.2.1) • Xcode at /Applications/Xcode.app/Contents/Developer ✗ Flutter requires Xcode 13 or higher. Download the latest version or update via the Mac App Store. ✗ Xcode requires additional components to be installed in order to run. Launch Xcode and install additional required components when prompted or run: sudo xcodebuild -runFirstLaunch ✗ CocoaPods installed but not working. You appear to have CocoaPods installed but it is not working. This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it. This can usually be fixed by re-installing CocoaPods. To re-install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2) • Android Studio at /Applications/Android Studio.app/Contents • 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 11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.67.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension can be installed from: 🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (3 available) • Android SDK built for x86 64 (mobile) • emulator-5554 • android-x64 • Android 10 (API 29) (emulator) • macOS (desktop) • macos • darwin-x64 • macOS 12.4 21F79 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 102.0.5005.61

[✓] HTTP Host Availability • All required HTTP hosts are available

! Doctor found issues in 1 category.

Description

Error Returned

$ flutterfire configure ⠇ Fetching available Firebase projects... Unhandled exception: FormatException: Unterminated string (at line 2039, character 37) "displayName": "[my project name] ^

#0 _ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1383:5) #1 _ChunkedJsonParser.close (dart:convert-patch/convert_patch.dart:494:9) #2 _parseJson (dart:convert-patch/convert_patch.dart:36:10) #3 JsonDecoder.convert (dart:convert/json.dart:612:36) #4 runFirebaseCommand (package:flutterfire_cli/src/firebase.dart:95:25) #5 getProjects (package:flutterfire_cli/src/firebase.dart:114:7) #6 ConfigCommand._selectFirebaseProject (package:flutterfire_cli/src/commands/config.dart:264:24) #7 ConfigCommand.run (package:flutterfire_cli/src/commands/config.dart:351:37) #8 CommandRunner.runCommand (package:args/command_runner.dart:209:13) #9 main (file:///Users//.pub-cache/hosted/pub.dartlang.org/flutterfire_cli-0.2.2+2/bin/flutterfire.dart:57:5) -macbookpro2:Hackweek2022$ flutterfire configure ⠴ Fetching available Firebase projects... Unhandled exception:

Steps to reproduce

Run flutterfire configure

Expected behavior

When running flutterfire configure should return success and generate the firebase-options.dart

Screenshots

No response

Additional context and comments

No response

jennabiiiii avatar Jun 02 '22 20:06 jennabiiiii

i have faced same issue here, but solve the problem when i change firebase project alias to english using version on 0.2.2+2

CPMoviePHil avatar Jun 22 '22 07:06 CPMoviePHil

i have faced same issue here, but solve the problem when i change firebase project alias to english using version on 0.2.2+2

can you explain mor how to change it ? I don't know what is alias.

kangsudal avatar Jul 16 '22 05:07 kangsudal

Maybe not a bug? https://stackoverflow.com/questions/72482277/flutterfire-configure-cli-requires-the-official-firebase-cli SO suggests deleting the firebase.exe file in the project directory. I tried deleting the file and it worked.

olegyablokov avatar Jul 22 '22 10:07 olegyablokov

This was a problem with the Firebase CLI that has now been fixed in the current version. Please install the latest Firebase CLI via npm i -g firebase-tools. I would also encourage you to use the latest FlutterFire version:

dart pub global activate flutterfire_cli 0.3.0-dev.18 --overwrite

russellwheatley avatar Oct 19 '23 14:10 russellwheatley