[FlutterFire_cli] configure -h produces Unhandled Exception
Is there an existing issue for this?
- [X] I have searched the existing issues.
CLI Version
0.2.4
Firebase Tools version
11.4.0
Flutter Doctor Output
flutter doctor -v [✓] Flutter (Channel stable, 3.0.5, on macOS 12.4 21F79 darwin-x64, locale en) • Flutter version 3.0.5 at /Users/vagrant/fvm/versions/2.10.3 • Upstream repository https://github.com/flutter/flutter.git • Framework revision f1875d570e (3 weeks ago), 2022-07-13 11:24:16 -0700 • Engine revision e85ea0e79c • Dart version 2.17.6 • DevTools version 2.12.2
[!] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
• Android SDK at /usr/local/share/android-sdk
• Platform android-32, build-tools 32.0.0
• ANDROID_HOME = /usr/local/share/android-sdk
• ANDROID_SDK_ROOT = /usr/local/share/android-sdk
• Java binary at: /Users/vagrant/.jenv/versions/11.0/bin/java
• Java version OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9)
✗ Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1) • Xcode at /Applications/Xcode-13.4.1.app/Contents/Developer • CocoaPods version 1.11.3
[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome) ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[!] Android Studio (not installed) • Android Studio not found; download from https://developer.android.com/studio/index.html (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
[✓] Connected device (1 available) • macOS (desktop) • macos • darwin-x64 • macOS 12.4 21F79 darwin-x64
[✓] HTTP Host Availability • All required HTTP hosts are available
! Doctor found issues in 3 categories.
Description
When we call flutterfire configure -h we get the following output:
Unhandled exception:
Option platforms is mandatory.
Usage: flutterfire configure [arguments]
-h, --help Print this usage information.
-p, --project=<aliasOrProjectId> The Firebase project to use for this command.
-e, --account=<email> The Google account to use for authorization.
-o, --out=<filePath> The output file path of the Dart file that will be generated with
your Firebase configuration options.
(defaults to "lib/firebase_options.dart")
-y, --yes Skip the Y/n confirmation prompts and accept default options (such
as detected platforms).
--platforms=<platforms> (mandatory) Optionally specify the platforms to generate configuration options
for as a comma separated list. For example
"android,ios,macos,web,linux,windows".
-i, --ios-bundle-id=<bundleIdentifier> (mandatory) The bundle identifier of your iOS app, e.g. "com.example.app". If no
identifier is provided then an attempt will be made to automatically
detect it from your "ios" folder (if it exists).
-m, --macos-bundle-id=<bundleIdentifier> (mandatory) The bundle identifier of your macOS app, e.g. "com.example.app". If
no identifier is provided then an attempt will be made to
automatically detect it from your "macos" folder (if it exists).
--android-app-id=<applicationId> DEPRECATED - use "android-package-name" instead. The application id
of your Android app, e.g. "com.example.app". If no identifier is
provided then an attempt will be made to automatically detect it
from your "android" folder (if it exists)
-a, --android-package-name=<packageName> The package name of your Android app, e.g. "com.example.app". If no
package name is provided then an attempt will be made to
automatically detect it from your "android" folder (if it exists).
-t, --token=<firebaseToken> The token generated by running `firebase login:ci`
Run "flutterfire help" to see global options.
#0 Command.usageException (package:args/command_runner.dart:445:7)
#1 CommandRunner.parse (package:args/command_runner.dart:137:15)
#2 CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:119:36)
#3 new Future.sync (dart:async/future.dart:301:31)
#4 CommandRunner.run (package:args/command_runner.dart:119:14)
#5 main (file:///Users/vagrant/.pub-cache/hosted/pub.dartlang.org/flutterfire_cli-0.2.4/bin/flutterfire.dart:57:48)
<asynchronous suspension>
Steps to reproduce
- Install Firebase tools with curl -sL https://firebase.tools/ | bash
- Update Firebase tools with curl -sL https://firebase.tools/ | upgrade=true bash
- Activate FlutterFire cli with dart pub global activate flutterfire_cli
- run flutterfire configure -h
Expected behavior
We expect the following output:
Configure Firebase for your Flutter app. This command will fetch Firebase configuration for you and generate a Dart file
with prefilled FirebaseOptions you can use.
Usage: flutterfire configure [arguments]
-h, --help Print this usage information.
-p, --project=<aliasOrProjectId> The Firebase project to use for this command.
-e, --account=<email> The Google account to use for authorization.
-o, --out=<filePath> The output file path of the Dart file that will be generated with your
Firebase configuration options.
(defaults to "lib/firebase_options.dart")
-y, --yes Skip the Y/n confirmation prompts and accept default options (such as detected
platforms).
--platforms=<platforms> Optionally specify the platforms to generate configuration options for as a
comma separated list. For example "android,ios,macos,web,linux,windows".
-i, --ios-bundle-id=<bundleIdentifier> The bundle identifier of your iOS app, e.g. "com.example.app". If no
identifier is provided then an attempt will be made to automatically detect it
from your "ios" folder (if it exists).
-m, --macos-bundle-id=<bundleIdentifier> The bundle identifier of your macOS app, e.g. "com.example.app". If no
identifier is provided then an attempt will be made to automatically detect it
from your "macos" folder (if it exists).
--android-app-id=<applicationId> DEPRECATED - use "android-package-name" instead. The application id of your
Android app, e.g. "com.example.app". If no identifier is provided then an
attempt will be made to automatically detect it from your "android" folder (if
it exists)
-a, --android-package-name=<packageName> The package name of your Android app, e.g. "com.example.app". If no package
name is provided then an attempt will be made to automatically detect it from
your "android" folder (if it exists).
-t, --token=<firebaseToken> The token generated by running `firebase login:ci`
Run "flutterfire help" to see global options.
Screenshots
No response
Additional context and comments
The error is happening on the virtual machines of our ci provider.
output of dart pub global activate flutterfire_cli :
+ ansi_styles 0.3.2+1s...
+ args 2.3.1
+ async 2.9.0
+ characters 1.2.1
+ ci 0.1.0
+ cli_util 0.3.5
+ clock 1.1.1
+ collection 1.16.0
+ dart_console 1.1.2
+ deep_pick 0.10.0
+ ffi 2.0.1
+ file 6.1.2
+ flutterfire_cli 0.2.4
+ http 0.13.4
+ http_parser 4.0.1
+ interact 2.1.1
+ intl 0.17.0
+ json_annotation 4.6.0
+ matcher 0.12.12
+ meta 1.8.0
+ path 1.8.2
+ petitparser 5.0.0
+ platform 3.1.0
+ process 4.2.4
+ pub_semver 2.1.1
+ pub_updater 0.2.2
+ pubspec 2.3.0
+ quiver 3.1.0
+ source_span 1.9.1
+ stack_trace 1.10.0
+ string_scanner 1.1.1
+ term_glyph 1.2.1
+ tint 2.0.0
+ typed_data 1.3.1
+ uri 1.0.0
+ win32 2.7.0
+ xml 5.4.1 (6.1.0 available)
+ yaml 3.1.1
Downloading flutterfire_cli 0.2.4...
Downloading pub_updater 0.2.2...
Downloading interact 2.1.1...
Downloading deep_pick 0.10.0...
Downloading ci 0.1.0...
Downloading ansi_styles 0.3.2+1...
Downloading tint 2.0.0...
Downloading http_parser 4.0.1...
Downloading typed_data 1.3.1...
Downloading string_scanner 1.1.1...
Downloading pubspec 2.3.0...
Downloading uri 1.0.0...
Downloading yaml 3.1.1...
Downloading matcher 0.12.12...
Downloading quiver 3.1.0...
Downloading dart_console 1.1.2...
Downloading characters 1.2.1...
Downloading win32 2.7.0...
Downloading ffi 2.0.1...
Downloading source_span 1.9.1...
Downloading term_glyph 1.2.1...
Downloading json_annotation 4.6.0...
Downloading async 2.9.0...
Building package executables... (3.8s)
Built flutterfire_cli:flutterfire.
Installed executable flutterfire.
Activated flutterfire_cli 0.2.4.
output of firebase tools upgrade:
-- Checking for existing firebase-tools on PATH...
-- Your machine has [email protected], attempting upgrade...
-- Checking your machine type...
-- Downloading binary from https://firebase.tools/bin/macos/latest
######################################################################## 100.0%#=#=#
##=#=#
##=O#- #
#-#O=# #
0.0%
0.2%
0.4%
1.2%
# 2.2%
## 3.6%
#### 5.6%
##### 8.0%
####### 10.1%
######### 12.5%
########## 14.0%
########### 15.9%
############# 18.5%
############## 20.5%
############### 21.9%
################# 24.0%
################## 26.3%
#################### 27.8%
##################### 30.4%
####################### 32.4%
######################## 33.8%
########################## 36.4%
########################### 37.8%
############################# 40.4%
############################## 41.8%
############################### 43.8%
################################# 45.9%
################################## 47.7%
#################################### 50.1%
##################################### 52.3%
###################################### 53.8%
######################################## 55.8%
######################################### 57.9%
########################################### 60.2%
############################################ 61.9%
############################################## 64.3%
############################################### 66.2%
################################################ 67.8%
################################################## 70.3%
################################################### 71.4%
#################################################### 72.3%
##################################################### 73.9%
###################################################### 75.3%
####################################################### 77.1%
######################################################## 78.9%
######################################################### 80.0%
########################################################## 81.9%
########################################################### 83.0%
############################################################ 84.3%
############################################################# 84.8%
############################################################# 85.5%
############################################################## 86.5%
############################################################## 87.0%
############################################################### 87.7%
############################################################### 88.7%
################################################################ 89.1%
################################################################ 89.7%
################################################################# 90.6%
################################################################# 91.0%
################################################################## 91.9%
################################################################## 92.5%
################################################################## 92.9%
################################################################### 93.7%
################################################################### 94.3%
#################################################################### 95.1%
##################################################################### 96.0%
##################################################################### 96.7%
###################################################################### 97.4%
###################################################################### 98.2%
####################################################################### 98.8%
####################################################################### 99.6%
######################################################################## 100.0%
-- Setting permissions on binary...
-- Checking your PATH variable...
-- [email protected] is now installed
-- All Done!
I am seeing the same issue... why are these fields listed as "mandatory"?
yes i have this problem on my github action flow that i only needed 1 platform to generate but it throwing exception ios-bundle-id is mandatory
at my laptop using 1 platform to generate the file is fine though
Any updates on this? Our CI/CD is also unable to run the flutterfire configure command and asks for Bundle IDs even though I specify platforms and android + ios folder is present.
Any updates on this? Our CI is also unable to run flutterfire configure due to this bug
Same situation here...seems to be working fine locally fail to run in CI.
Same situation here, local and CI not working.