I am trying to distribute a pre-release Android app to testers via Flutter/Firebase App Distribution/fastlane/Google Cloud Build stack.
When cloud build runs, fastlane does upload the APK file to Firebase using "firebase_app_distribution_plugin" fastlane plugin. However, it errors out post that with below message resulting in not being able to distribute to testers automatically. With this, I had to manually distribute the app on Firebase App Distribution console.
Step #2 - "distribute-app": i getting app details...
Step #2 - "distribute-app": i uploading distribution...
Step #2 - "distribute-app": ✔ uploaded distribution successfully!
Step #2 - "distribute-app": ⚠ no release notes specified, skipping
Step #2 - "distribute-app": ⚠ no testers or groups specified, skipping
Step #2 - "distribute-app": sh: 2: --testers-file: not found
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.157.2/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/helper/sh_helper.rb:80:in `sh_control_output'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-plugin-firebase_app_distribution-0.1.4/lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_action.rb:29:in `run'
When I looked at the error stack trace completely, there is line of code in firebase_app_distribution_action.rb which bubbled up this error. I have provided link to that particular line here.
If we look into this "firebase_app_distribution_action.rb" ruby file, it checks for ":app" param and if it doesn't exist then eventually lands in line no. 29. Not sure why control goes to that line though I have specified "app" parameter inside "firebase_app_distribution" task within my "distribute" fastlane lane as below.
firebase_app_distribution(
app: <firebaseAppId>, // it resolves to an actual id and hence fastlane is able to upload APK
testers: "apptester@testcompany.com",
release_notes: "Added menu drawer"
)
Also we can observe above that fastlane says "no release notes provided in addition to saying no testers or groups provided" in the above stack trace though I have provided testers and release_notes in the task above.
Thank you in advance.
==================================
Complete logs below with fastlane verbosity:
Step #2 - "distribute-app": [03:29:44]: fastlane detected a Gemfile in the current directory
Step #2 - "distribute-app": [03:29:44]: However, it seems like you didn't use `bundle exec`
Step #2 - "distribute-app": [03:29:44]: To launch fastlane faster, please use
Step #2 - "distribute-app": [03:29:44]:
Step #2 - "distribute-app": [03:29:44]: $ bundle exec fastlane distribute --verbose
Step #2 - "distribute-app": [03:29:44]:
Step #2 - "distribute-app": [03:29:44]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
Step #2 - "distribute-app": [03:29:44]: WARNING: fastlane requires your locale to be set to UTF-8. To learn more go to https://docs.fastlane.tools/getting-started/ios/setup/#set-up-environment-variables
Step #2 - "distribute-app": DEBUG [2020-09-02 03:29:45.51]: Checking if there are any plugins that should be loaded...
Step #2 - "distribute-app": DEBUG [2020-09-02 03:29:45.56]: Loading 'fastlane-plugin-firebase_app_distribution' plugin
Step #2 - "distribute-app": WARN [2020-09-02 03:29:45.73]: Installing Ruby gem 'fastlane-plugin-firebase_app_distribution'...
Step #2 - "distribute-app": INFO [2020-09-02 03:29:55.03]: Successfully installed 'fastlane-plugin-firebase_app_distribution'
Step #2 - "distribute-app": +------------------------+---------+------------------------+
Step #2 - "distribute-app": | Used plugins |
Step #2 - "distribute-app": +------------------------+---------+------------------------+
Step #2 - "distribute-app": | Plugin | Version | Action |
Step #2 - "distribute-app": +------------------------+---------+------------------------+
Step #2 - "distribute-app": | fastlane-plugin-fireb | 0.1.4 | firebase_app_distribu |
Step #2 - "distribute-app": | ase_app_distribution | | tion |
Step #2 - "distribute-app": +------------------------+---------+------------------------+
Step #2 - "distribute-app":
Step #2 - "distribute-app": Successfully loaded Appfile at path '/workspace/android/fastlane/Appfile'
Step #2 - "distribute-app": - package_name: 'com.testcompany.testapp'
Step #2 - "distribute-app": -------
Step #2 - "distribute-app": INFO [2020-09-02 03:29:55.08]: Sending anonymous analytics information
Step #2 - "distribute-app": INFO [2020-09-02 03:29:55.08]: Learn more at https://docs.fastlane.tools/#metrics
Step #2 - "distribute-app": INFO [2020-09-02 03:29:55.08]: No personal or sensitive data is sent.
Step #2 - "distribute-app": INFO [2020-09-02 03:29:55.08]: You can disable this by adding `opt_out_usage` at the top of your Fastfile
Step #2 - "distribute-app": INFO [2020-09-02 03:29:55.10]: ------------------------------
Step #2 - "distribute-app": INFO [2020-09-02 03:29:55.10]: --- Step: default_platform ---
Step #2 - "distribute-app": INFO [2020-09-02 03:29:55.10]: ------------------------------
Step #2 - "distribute-app": INFO [2020-09-02 03:29:55.10]: Driving the lane 'android distribute'
Step #2 - "distribute-app": INFO [2020-09-02 03:29:55.10]: ---------------------------------------------
Step #2 - "distribute-app": INFO [2020-09-02 03:29:59.07]: ▸ Warning: File /root/.android/repositories.cfg could not be loaded.
Step #2 - "distribute-app": Successfully loaded Appfile at path '/workspace/android/fastlane/Appfile'
Step #2 - "distribute-app": - package_name: 'com.testcompany.testapp'
Step #2 - "distribute-app": -------
Step #2 - "distribute-app": INFO [2020-09-02 03:30:35.89]: ------------------------------
Step #2 - "distribute-app": INFO [2020-09-02 03:30:35.89]: --- Step: assembleDevDebug ---
Step #2 - "distribute-app": INFO [2020-09-02 03:30:35.89]: ------------------------------
Step #2 - "distribute-app": INFO [2020-09-02 03:30:35.89]: $ /workspace/android/gradlew assembleDevDebug -p .
Step #2 - "distribute-app": INFO [2020-09-02 03:30:36.06]: ▸ Downloading https://services.gradle.org/distributions/gradle-6.6.1-all.zip
Step #2 - "distribute-app": INFO [2020-09-02 03:30:39.77]: ▸ ...........................................................................................................................................................................................................................................................................................................................................................................................
Step #2 - "distribute-app": INFO [2020-09-02 03:30:39.77]: ▸ Unzipping /root/.gradle/wrapper/dists/gradle-6.6.1-all/ejrtlte9hlw8v6ii20a9584rs/gradle-6.6.1-all.zip to /root/.gradle/wrapper/dists/gradle-6.6.1-all/ejrtlte9hlw8v6ii20a9584rs
Step #2 - "distribute-app": INFO [2020-09-02 03:30:42.97]: ▸ Set executable permissions for: /root/.gradle/wrapper/dists/gradle-6.6.1-all/ejrtlte9hlw8v6ii20a9584rs/gradle-6.6.1/bin/gradle
Step #2 - "distribute-app": INFO [2020-09-02 03:30:43.63]: ▸ Welcome to Gradle 6.6.1!
Step #2 - "distribute-app": INFO [2020-09-02 03:30:43.63]: ▸ Here are the highlights of this release:
Step #2 - "distribute-app": INFO [2020-09-02 03:30:43.63]: ▸ - Experimental build configuration caching
Step #2 - "distribute-app": INFO [2020-09-02 03:30:43.63]: ▸ - Built-in conventions for handling credentials
Step #2 - "distribute-app": INFO [2020-09-02 03:30:43.63]: ▸ - Java compilation supports --release flag
Step #2 - "distribute-app": INFO [2020-09-02 03:30:43.64]: ▸ For more details see https://docs.gradle.org/6.6.1/release-notes.html
Step #2 - "distribute-app": INFO [2020-09-02 03:30:43.93]: ▸ Starting a Gradle Daemon (subsequent builds will be faster)
Step #2 - "distribute-app": INFO [2020-09-02 03:32:05.23]: ▸ > Configure project :app
Step #2 - "distribute-app": INFO [2020-09-02 03:33:09.83]: ▸ > Task :app:compileFlutterBuildDevDebug
Step #2 - "distribute-app": INFO [2020-09-02 03:33:09.93]: ▸ > Task :app:packLibsflutterBuildDevDebug
Step #2 - "distribute-app": <<MANY MORE GRADLE DEPENDENT TASKS ARE OUTPUT HERE>>
Step #2 - "distribute-app": INFO [2020-09-02 03:36:43.83]: ▸ > Task :path_provider:transformNativeLibsWithIntermediateJniLibsForDebug
Step #2 - "distribute-app": INFO [2020-09-02 03:36:48.43]: ▸ > Task :app:mergeDevDebugNativeLibs
Step #2 - "distribute-app": INFO [2020-09-02 03:36:49.03]: ▸ Compatible side by side NDK version was not found.
Step #2 - "distribute-app": INFO [2020-09-02 03:36:58.03]: ▸ > Task :app:packageDevDebug
Step #2 - "distribute-app": INFO [2020-09-02 03:36:58.33]: ▸ > Task :app:assembleDevDebug
Step #2 - "distribute-app": INFO [2020-09-02 03:36:58.43]: ▸ Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Step #2 - "distribute-app": INFO [2020-09-02 03:36:58.43]: ▸ Use '--warning-mode all' to show the individual deprecation warnings.
Step #2 - "distribute-app": INFO [2020-09-02 03:36:58.43]: ▸ See https://docs.gradle.org/6.6.1/userguide/command_line_interface.html#sec:command_line_warnings
Step #2 - "distribute-app": INFO [2020-09-02 03:36:58.43]: ▸ BUILD SUCCESSFUL in 6m 22s
Step #2 - "distribute-app": INFO [2020-09-02 03:36:58.43]: ▸ 129 actionable tasks: 128 executed, 1 up-to-date
Step #2 - "distribute-app": INFO [2020-09-02 03:37:02.79]: ---------------------------------------
Step #2 - "distribute-app": INFO [2020-09-02 03:37:02.79]: --- Step: firebase_app_distribution ---
Step #2 - "distribute-app": INFO [2020-09-02 03:37:02.79]: ---------------------------------------
Step #2 - "distribute-app": INFO [2020-09-02 03:37:04.21]: ▸ i getting app details...
Step #2 - "distribute-app": INFO [2020-09-02 03:37:05.42]: ▸ i uploading distribution...
Step #2 - "distribute-app": INFO [2020-09-02 03:37:13.49]: ▸ ✔ uploaded distribution successfully!
Step #2 - "distribute-app": INFO [2020-09-02 03:37:13.49]: ▸ ⚠ no release notes specified, skipping
Step #2 - "distribute-app": INFO [2020-09-02 03:37:13.49]: ▸ ⚠ no testers or groups specified, skipping
Step #2 - "distribute-app": INFO [2020-09-02 03:37:13.51]: ▸ sh: 2: --testers-file: not found
Step #2 - "distribute-app": WARN [2020-09-02 03:37:13.51]: Lane Context:
Step #2 - "distribute-app": INFO [2020-09-02 03:37:13.51]: {:DEFAULT_PLATFORM=>:android, :PLATFORM_NAME=>:android, :LANE_NAME=>"android distribute"}
Step #2 - "distribute-app": ERROR [2020-09-02 03:37:13.51]: Shell command exited with exit status 127 instead of 0.
Step #2 - "distribute-app": i getting app details...
Step #2 - "distribute-app": i uploading distribution...
Step #2 - "distribute-app": ✔ uploaded distribution successfully!
Step #2 - "distribute-app": ⚠ no release notes specified, skipping
Step #2 - "distribute-app": ⚠ no testers or groups specified, skipping
Step #2 - "distribute-app": sh: 2: --testers-file: not found
Step #2 - "distribute-app":
Step #2 - "distribute-app": INFO [2020-09-02 03:37:13.51]: Successfully generated documentation at path '/workspace/android/fastlane/README.md'
Step #2 - "distribute-app":
Step #2 - "distribute-app": +------+------------------------+-------------+
Step #2 - "distribute-app": | fastlane summary |
Step #2 - "distribute-app": +------+------------------------+-------------+
Step #2 - "distribute-app": | Step | Action | Time (in s) |
Step #2 - "distribute-app": +------+------------------------+-------------+
Step #2 - "distribute-app": | 1 | default_platform | 0 |
Step #2 - "distribute-app": | 2 | assembleDevDebug | 383 |
Step #2 - "distribute-app": | | firebase_app_distribu | 10 |
Step #2 - "distribute-app": | | tion | |
Step #2 - "distribute-app": +------+------------------------+-------------+
Step #2 - "distribute-app":
Step #2 - "distribute-app": DEBUG [2020-09-02 03:37:13.53]: All plugins are up to date
Step #2 - "distribute-app": ERROR [2020-09-02 03:37:13.53]: fastlane finished with errors
Step #2 - "distribute-app":
Step #2 - "distribute-app": Looking for related GitHub issues on fastlane/fastlane...
Step #2 - "distribute-app": Search query: Shell command exited with exit status 127 instead of 0.
Step #2 - "distribute-app": i getting app details...
Step #2 - "distribute-app": i uploading distribution...
Step #2 - "distribute-app": ✔ uploaded distribution successfully!
Step #2 - "distribute-app": ⚠ no release notes specified, skipping
Step #2 - "distribute-app": ⚠ no testers or groups specified, skipping
Step #2 - "distribute-app": sh: 2: --testers-file: not found
Step #2 - "distribute-app":
Step #2 - "distribute-app": URL: https://api.github.com/search/issues?q=Shell%20command%20exited%20with%20exit%20status%20127%20instead%20of%200.%0A%1B%5B1m%1B%5B36mi%20%1B%5B39m%1B%5B22m%20getting%20app%20details...%0A%1B%5B1m%1B%5B36mi%20%1B%5B39m%1B%5B22m%20uploading%20distribution...%0A%1B%5B1m%1B%5B32m%E2%9C%94%20%1B%5B39m%1B%5B22m%20uploaded%20distribution%20successfully%21%0A%1B%5B1m%1B%5B33m%E2%9A%A0%20%1B%5B39m%1B%5B22m%20no%20release%20notes%20specified%2C%20skipping%0A%1B%5B1m%1B%5B33m%E2%9A%A0%20%1B%5B39m%1B%5B22m%20no%20testers%20or%20groups%20specified%2C%20skipping%0Ash%3A%202%3A%20--testers-file%3A%20not%20found%0A+repo:fastlane/fastlane
Step #2 - "distribute-app": ERROR [2020-09-02 03:37:13.74]: Error finding relevant GitHub issues: undefined method `map' for nil:NilClass
Step #2 - "distribute-app": DEBUG [2020-09-02 03:37:13.74]: All plugins are up to date
Step #2 - "distribute-app": ERROR [2020-09-02 03:37:13.74]: WARNING: fastlane requires your locale to be set to UTF-8. To learn more go to https://docs.fastlane.tools/getting-started/ios/setup/#set-up-environment-variables
Step #2 - "distribute-app": /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.157.2/fastlane_core/lib/fastlane_core/ui/interface.rb:153:in `shell_error!': [!] Shell command exited with exit status 127 instead of 0. (FastlaneCore::Interface::FastlaneShellError)
Step #2 - "distribute-app": i getting app details...
Step #2 - "distribute-app": i uploading distribution...
Step #2 - "distribute-app": ✔ uploaded distribution successfully!
Step #2 - "distribute-app": ⚠ no release notes specified, skipping
Step #2 - "distribute-app": ⚠ no testers or groups specified, skipping
Step #2 - "distribute-app": sh: 2: --testers-file: not found
Step #2 - "distribute-app":
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.157.2/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/helper/sh_helper.rb:80:in `sh_control_output'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-plugin-firebase_app_distribution-0.1.4/lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_action.rb:29:in `run'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/runner.rb:229:in `chdir'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
Step #2 - "distribute-app": from Fastfile:22:in `block (2 levels) in parsing_binding'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/lane.rb:33:in `call'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/runner.rb:45:in `chdir'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/runner.rb:45:in `execute'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.157.2/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/commands_generator.rb:352:in `run'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in `take_off'
Step #2 - "distribute-app": from /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.157.2/bin/fastlane:23:in `<top (required)>'
Step #2 - "distribute-app": from /usr/local/bin/fastlane:23:in `load'
Step #2 - "distribute-app": from /usr/local/bin/fastlane:23:in `<main>'
Finished Step #2 - "distribute-app"
ERROR
ERROR: build step 2 failed: step exited with non-zero status: 1
=========================================================
firebase_app_distribution fastlane plugin 0.2.0 is giving below error:
What I am not able to understand is the below log stack trace says the plugin no longer uses Firebase CLI with an ERROR log level. However, it also says authenticated using CLI token successfully couple of lines below the error.
Does it mean we need to use Google service account json key instead of Firebase CLI token?
Can someone please point me to documentation on how to use newer 0.2.0 version of firebase_app_distribution fastlane plugin?
Step #2 - "distribute-app": INFO [2020-09-02 16:13:09.96]: Couldn't find any new signed apk files...
Step #2 - "distribute-app": ERROR [2020-09-02 16:13:09.96]: Using deprecated option: '--firebase_cli_path' (This plugin no longer uses the Firebase CLI)
Step #2 - "distribute-app": INFO [2020-09-02 16:13:09.96]: ---------------------------------------
Step #2 - "distribute-app": INFO [2020-09-02 16:13:09.96]: --- Step: firebase_app_distribution ---
Step #2 - "distribute-app": INFO [2020-09-02 16:13:09.96]: ---------------------------------------
Step #2 - "distribute-app": INFO [2020-09-02 16:13:09.96]: Authenticating with --firebase_cli_token parameter
Step #2 - "distribute-app": INFO [2020-09-02 16:13:10.06]: Authenticated successfully.
Step #2 - "distribute-app": INFO [2020-09-02 16:13:11.09]: ⌛ Uploading the APK.