我正在尝试通过 Flutter/Firebase App Distribution/fastlane/Google Cloud Build 堆栈向测试人员分发预发布的 Android 应用程序。
当云构建运行时,fastlane 会使用“firebase_app_distribution_plugin”fastlane 插件将 APK 文件上传到 Firebase。但是,它会错误地发布以下消息,导致无法自动分发给测试人员。有了这个,我不得不在 Firebase App Distribution 控制台上手动分发应用程序。
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'
当我完全查看错误堆栈跟踪时,firebase_app_distribution_action.rb 中有一行代码冒泡了这个错误。我在这里提供了该特定行的链接。
如果我们查看这个 "firebase_app_distribution_action.rb" ruby 文件,它会检查 ":app" 参数,如果它不存在,那么最终会出现在第 1 行。29. 不知道为什么控制转到那条线,尽管我在我的“distribute”快车道通道中的“firebase_app_distribution”任务中指定了“app”参数,如下所示。
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"
)
我们还可以在上面观察到,尽管我在上面的任务中提供了测试人员和 release_notes,但在上面的堆栈跟踪中,fastlane 说“除了说没有提供测试人员或组之外,没有提供发布说明”。
先感谢您。
====================================
使用 fastlane 详细完成以下日志:
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 插件 0.2.0 给出以下错误:
我无法理解的是下面的日志堆栈跟踪表明该插件不再使用带有 ERROR 日志级别的 Firebase CLI。但是,它还说使用 CLI 令牌成功验证了错误下方的几行。
这是否意味着我们需要使用 Google 服务帐户 json 密钥而不是 Firebase CLI 令牌?
有人可以指点我有关如何使用更新的 0.2.0 版本的 firebase_app_distribution fastlane 插件的文档吗?
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.