tianhaoz95 / fastlane-plugin-flutter_version

Fastlane plugin to retrieve version code for Flutter projects.
https://tianhaoz95.github.io/fastlane-plugin-flutter_version
MIT License
107 stars 14 forks source link

[BUG] user_error: Could not find action, lane or variable flutter_version: method_missing #141

Closed marcellodesales closed 2 years ago

marcellodesales commented 3 years ago

🐛 Describe the bug

bundle exec fastlane upload_to_play_store_internal --verbose
from /usr/local/bundle/bin/bundle:23:in `<main>'
/usr/local/bundle/gems/fastlane-2.187.0/fastlane_core/lib/fastlane_core/ui/interface.rb:141:in 
`user_error!': Could not find action, lane or variable 'flutter_version'. Check out the documentation
 for more details: https://docs.fastlane.tools/actions (FastlaneCore::Interface::FastlaneError)
from /usr/local/bundle/gems/fastlane-2.187.0/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in 
`method_missing'

🦺 To Reproduce

  1. Installed the gem from Rubygems
gem install fastlane-plugin-flutter_version
Successfully installed fastlane-plugin-flutter_version-1.1.12
1 gem installed
  1. Available fastlane actions DOES NOT list the flutter version as an action
 bundle exec fastlane actions
app-deploy-internal_1      | [19:01:05]: Sending anonymous analytics information
app-deploy-internal_1      | [19:01:05]: Learn more at https://docs.fastlane.tools/#metrics
app-deploy-internal_1      | [19:01:05]: No personal or sensitive data is sent.
app-deploy-internal_1      | [19:01:05]: You can disable this by adding `opt_out_usage` at the top of your Fastfile
app-deploy-internal_1      | +------------------------+-------------------------+------------------+
app-deploy-internal_1      | |                     Available fastlane actions                      |
app-deploy-internal_1      | +------------------------+-------------------------+------------------+
app-deploy-internal_1      | | Action                 | Description             | Author           |
app-deploy-internal_1      | +------------------------+-------------------------+------------------+
app-deploy-internal_1      | | adb                    | Run ADB Actions         | hjanuschka       |
app-deploy-internal_1      | | adb_devices            | Get an array of         | hjanuschka       |
app-deploy-internal_1      | |                        | Connected android       |                  |
app-deploy-internal_1      | |                        | device serials          |                  |
app-deploy-internal_1      | | add_extra_platforms    | Modify the default      | lacostej         |
...
....

🔠 Additional context

Source

 25   desc "Submits the APK to Google Play alpha testing track"
 26   lane :upload_to_play_store_internal do
 27     languages.each { |languageCode| prepareTestingChangelogs(languageCode)}
 28     upload_to_play_store(
 29       track: 'internal',
 30       version_code: flutter_version()["version_code"],
 31       aab: '../build/app/outputs/bundle/release/app-release.aab',
 32       skip_upload_screenshots: true,
 33       skip_upload_images: true
 34     )
 35   end

💻 Settings

$ docker run -ti supercash/flutter-mobile-app gem --version
3.1.6

$ docker run -ti supercash/flutter-mobile-app ruby --version
ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [x86_64-linux]

$ docker run -ti supercash/flutter-mobile-app flutter doctor
app-deploy-internal_1      | INFO: Flutter env
app-deploy-internal_1      | [✓] Flutter (Channel unknown, 1.23.0-18.1.pre, on Linux, locale C.UTF-8)
app-deploy-internal_1      |     • Flutter version 1.23.0-18.1.pre at /home/supercash/flutter
app-deploy-internal_1      |     • Framework revision 198df796aa (9 months ago), 2020-10-15 12:04:33 -0700
app-deploy-internal_1      |     • Engine revision 1d12d82d9c
app-deploy-internal_1      |     • Dart version 2.11.0 (build 2.11.0-213.1.beta)

$ docker run -ti supercash/flutter-mobile-app bundler --version
Bundler version 2.2.21

$ docker run -ti supercash/flutter-mobile-app fastlane --version
fastlane installation at path:
/usr/local/bundle/gems/fastlane-2.187.0/bin/fastlane
-----------------------------
[✔] 🚀
fastlane 2.187.0

🔉 Logs

app-deploy-internal_1      | /usr/local/bundle/bin/bundle:23:in `<main>'
app-deploy-internal_1      | WARN [2021-07-01 19:01:13.62]: Lane Context:
app-deploy-internal_1      | INFO [2021-07-01 19:01:13.62]: {:DEFAULT_PLATFORM=>:android, :PLATFORM_NAME=>:android, :LANE_NAME=>"android upload_to_play_store_internal"}
app-deploy-internal_1      | ERROR [2021-07-01 19:01:13.62]: Could not find action, lane or variable 'flutter_version'. Check out the documentation for more details: https://docs.fastlane.tools/actions
app-deploy-internal_1      | INFO [2021-07-01 19:01:13.63]: Successfully generated documentation at path '/supercash-mobile/android/fastlane/README.md'
app-deploy-internal_1      |
app-deploy-internal_1      | +------+------------------+-------------+
app-deploy-internal_1      | |           fastlane summary            |
app-deploy-internal_1      | +------+------------------+-------------+
app-deploy-internal_1      | | Step | Action           | Time (in s) |
app-deploy-internal_1      | +------+------------------+-------------+
app-deploy-internal_1      | | 1    | update_fastlane  | 4           |
app-deploy-internal_1      | | 2    | default_platform | 0           |
app-deploy-internal_1      | +------+------------------+-------------+
app-deploy-internal_1      |
app-deploy-internal_1      | ERROR [2021-07-01 19:01:13.65]: fastlane finished with errors
app-deploy-internal_1      | bundler: failed to load command: fastlane (/usr/local/bundle/bin/fastlane)
app-deploy-internal_1      | /usr/local/bundle/gems/fastlane-2.187.0/fastlane_core/lib/fastlane_core/ui/interface.rb:141:in `user_error!': \e[31m[!] Could not find action, lane or variable 'flutter_version'. Check out the documentation for more details: https://docs.fastlane.tools/actions\e[0m (FastlaneCore::Interface::FastlaneError)
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/runner.rb:174:in `trigger_action_by_name'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
app-deploy-internal_1      |    from Fastfile:30:in `block (2 levels) in parsing_binding'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/lane.rb:33:in `call'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/commands_generator.rb:109:in `block (2 levels) in run'
app-deploy-internal_1      |    from /usr/local/bundle/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
app-deploy-internal_1      |    from /usr/local/bundle/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
app-deploy-internal_1      |    from /usr/local/bundle/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
app-deploy-internal_1      |    from /usr/local/bundle/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/commands_generator.rb:353:in `run'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/commands_generator.rb:42:in `start'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/cli_tools_distributor.rb:122:in `take_off'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/bin/fastlane:23:in `<top (required)>'
app-deploy-internal_1      |    from /usr/local/bundle/bin/fastlane:23:in `load'
app-deploy-internal_1      |    from /usr/local/bundle/bin/fastlane:23:in `<top (required)>'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/cli/exec.rb:63:in `load'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/cli/exec.rb:63:in `kernel_load'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/cli/exec.rb:28:in `run'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/cli.rb:474:in `exec'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/cli.rb:30:in `dispatch'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/cli.rb:24:in `start'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/exe/bundle:49:in `block in <top (required)>'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/exe/bundle:37:in `<top (required)>'
app-deploy-internal_1      |    from /usr/local/bundle/bin/bundle:23:in `load'
app-deploy-internal_1      |    from /usr/local/bundle/bin/bundle:23:in `<main>'
app-deploy-internal_1      | /usr/local/bundle/gems/fastlane-2.187.0/fastlane_core/lib/fastlane_core/ui/interface.rb:141:in `user_error!': Could not find action, lane or variable 'flutter_version'. Check out the documentation for more details: https://docs.fastlane.tools/actions (FastlaneCore::Interface::FastlaneError)
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/runner.rb:174:in `trigger_action_by_name'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
app-deploy-internal_1      |    from Fastfile:30:in `block (2 levels) in parsing_binding'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/lane.rb:33:in `call'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/commands_generator.rb:109:in `block (2 levels) in run'
app-deploy-internal_1      |    from /usr/local/bundle/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
app-deploy-internal_1      |    from /usr/local/bundle/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
app-deploy-internal_1      |    from /usr/local/bundle/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
app-deploy-internal_1      |    from /usr/local/bundle/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/commands_generator.rb:353:in `run'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/commands_generator.rb:42:in `start'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/cli_tools_distributor.rb:122:in `take_off'
app-deploy-internal_1      |    from /usr/local/bundle/gems/fastlane-2.187.0/bin/fastlane:23:in `<top (required)>'
app-deploy-internal_1      |    from /usr/local/bundle/bin/fastlane:23:in `load'
app-deploy-internal_1      |    from /usr/local/bundle/bin/fastlane:23:in `<top (required)>'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/cli/exec.rb:63:in `load'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/cli/exec.rb:63:in `kernel_load'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/cli/exec.rb:28:in `run'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/cli.rb:474:in `exec'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/cli.rb:30:in `dispatch'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/cli.rb:24:in `start'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/exe/bundle:49:in `block in <top (required)>'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
app-deploy-internal_1      |    from /usr/local/bundle/gems/bundler-2.2.21/exe/bundle:37:in `<top (required)>'
app-deploy-internal_1      |    from /usr/local/bundle/bin/bundle:23:in `load'
app-deploy-internal_1      |    from /usr/local/bundle/bin/bundle:23:in `<main>'

❓ Questions

welcome[bot] commented 3 years ago

Thanks for opening your first issue here!

tianhaoz95 commented 3 years ago

It seems that the action itself did not error out, or more specifically, the action was not properly installed.

What does your Gemfile look like after installing the package? I wonder if it's been installed to the correct location.

tianhaoz95 commented 3 years ago

@marcellodesales friendly ping, is this still reproducible and blocking?

tianhaoz95 commented 2 years ago

Close for now, please reopen if there are more questions