shr3jn/fastlane-plugin-huawei_appgallery_connect

Could not find option 'apk_path' in the list of available options

Closed this issue · 9 comments

From Bitrise build log, using plugin version 1.0.9:

You passed invalid parameters to 'huawei_appgallery_connect'.
Check out the error below and available options by running fastlane action huawei_appgallery_connect
Could not find option 'apk_path' in the list of available options: client_id, client_secret, app_id, phase_wise_release, phase_release_start_time, phase_release_end_time, phase_release_percent, phase_release_description, release_time

I tripple checked your Fastfile example, and my setup looks identical/correct:

apk_paths = ["#{lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH]}"]
huawei_appgallery_connect(
  client_id: ENV['RELEASE_APPGALLERY_CLIENT_ID'],
  client_secret: ENV['RELEASE_APPGALLERY_CLIENT_SECRET'],
  app_id: "123456789",
  apk_path: apk_paths.last
)

Any ideas?

Also, will you support bundles any time soon?

Can you verify what "apk_paths.last" is returning?

Same here, moreover when I run bundle exec fastlane action huawei_appgallery_connect apk_path is not there:

+---------------------------+---------------------------------------------------------------------+----------------------------------------------------------+---------+
|                                                                  huawei_appgallery_connect Options                                                                   |
+---------------------------+---------------------------------------------------------------------+----------------------------------------------------------+---------+
| Key                       | Description                                                         | Env Var                                                  | Default |
+---------------------------+---------------------------------------------------------------------+----------------------------------------------------------+---------+
| client_id                 | Huawei AppGallery Connect Client ID                                 | HUAWEI_APPGALLERY_CONNECT_CLIENT_ID                      |         |
| client_secret             | Huawei AppGallery Connect Client Secret                             | HUAWEI_APPGALLERY_CONNECT_CLIENT_SECRET                  |         |
| app_id                    | Huawei AppGallery Connect App ID                                    | HUAWEI_APPGALLERY_CONNECT_APP_ID                         |         |
| phase_wise_release        | Phase wise release                                                  | HUAWEI_APPGALLERY_CONNECT_PHASE_WISE_RELEASE             |         |
| phase_release_start_time  | Start time of the validity period of the release by phase. The      | HUAWEI_APPGALLERY_CONNECT_PHASE_WISE_RELEASE_START_TIME  |         |
|                           | value is UTC time in the following format: yyyy-MM-dd 'T'           |                                                          |         |
|                           | HH:mm:ssZZ                                                          |                                                          |         |
| phase_release_end_time    | End time of the validity period of the release by phase. The value  | HUAWEI_APPGALLERY_CONNECT_PHASE_WISE_RELEASE_END_TIME    |         |
|                           | is UTC time in the following format: yyyy-MM-dd 'T' HH:mm:ssZZ      |                                                          |         |
| phase_release_percent     | Percentage of the release by phase. The value must be accurate to   | HUAWEI_APPGALLERY_CONNECT_PHASE_WISE_RELEASE_PERCENT     |         |
|                           | two decimal places and does not contain the percent sign (%)        |                                                          |         |
| phase_release_description | Phase-based release description. (Max 500 characters)               | HUAWEI_APPGALLERY_CONNECT_PHASE_WISE_RELEASE_DESCRIPTION |         |
| release_time              | Release time in UTC format for app release on a specific date. The  | HUAWEI_APPGALLERY_CONNECT_RELEASE_TIME                   |         |
|                           | format is yyyy-MM-dd'T'HH:mm:ssZZ)                                  |                                                          |         |
+---------------------------+---------------------------------------------------------------------+----------------------------------------------------------+---------+
* = default value is dependent on the user's system

Huh so this is really weird, Im debugging it on my build serv and all I did was sudo vim /var/lib/gems/2.5.0/gems/fastlane-plugin-huawei_appgallery_connect-1.0.9/lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_action.rb
to add some prints here and there, nothing more.
And now it's working 🤔
Im pretty sure it has something to do with doing bundle install as another user as my build user does not have sudo access.

i'm affected also - all work on my local mac, but it fails on bitbucket pipelines run. This same error as @suside. In both places i have installed this same release of plugin.

Looks like it loaded options from huawei_appgallery_connect_submit_for_review

my idea about this issue: New ruby (on local i have 2.5, on CI 2.7) loads actions in wrong order - loads and matched first huawei_appgallery_connect_submit_for_review instead huawei_appgallery_connect ? And the is a reason for action suffix in actions/huawei_appgallery_connect_action.rb file?

@ahilles107 I will check and revert back.

maybe it will help - he is error stack trace:

bundler: failed to load command: fastlane (/opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/bin/fastlane)
FastlaneCore::Interface::FastlaneError: [!] Could not find option 'apk_path' in the list of available options: client_id, client_secret, app_id, phase_wise_release, phase_release_start_time, phase_release_end_time, phase_release_percent, phase_release_description, release_time
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane_core/lib/fastlane_core/ui/interface.rb:141:in `user_error!'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane_core/lib/fastlane_core/configuration/configuration.rb:328:in `verify_options_key!'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane_core/lib/fastlane_core/configuration/configuration.rb:84:in `block in verify_value_exists'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane_core/lib/fastlane_core/configuration/configuration.rb:82:in `each'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane_core/lib/fastlane_core/configuration/configuration.rb:82:in `verify_value_exists'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane_core/lib/fastlane_core/configuration/configuration.rb:66:in `initialize'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane_core/lib/fastlane_core/configuration/configuration.rb:36:in `new'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane_core/lib/fastlane_core/configuration/configuration.rb:36:in `create'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/configuration_helper.rb:8:in `parse'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/runner.rb:239:in `block in execute_action'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/runner.rb:229:in `chdir'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
  Fastfile:59:in `block (2 levels) in parsing_binding'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/lane.rb:33:in `call'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/runner.rb:204:in `try_switch_to_lane'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/runner.rb:146:in `trigger_action_by_name'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
  Fastfile:88:in `block (2 levels) in parsing_binding'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/lane.rb:33:in `call'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/runner.rb:45:in `chdir'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/runner.rb:45:in `execute'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/commands_generator.rb:352:in `run'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in `take_off'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/bin/fastlane:23:in `<top (required)>'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/bin/fastlane:23:in `load'
  /opt/atlassian/pipelines/agent/build/android/vendor/bundle/ruby/2.6.0/bin/fastlane:23:in `<top (required)>'

Issue was being caused due to duplicate class name for submit_for_review action.

@tormodt @suside @ahilles107 Please use v1.0.10.