sparkfabrik / android-build-action

Build Android project, export .apk, optional upload to BrowserStack App Live.
MIT License
122 stars 21 forks source link

Build app failed because of fastlane version #23

Closed misaert closed 1 year ago

misaert commented 1 year ago

Hi,

I tried to upgrade to version 1.3.3 but I have this error:

Run sparkfabrik/android-build-action@v1.3.3
Run ruby/setup-ruby@v1
Modifying PATH
Downloading Ruby
Extracting  Ruby
Print Ruby version
Installing Bundler
Run actions/setup-node@v3
  with:
    node-version: 16
    always-auth: false
    check-latest: false
    token: ***
  env:
    MSYS: winsymlinks:nativestrict
Found in cache @ /opt/hostedtoolcache/node/16.[19](https://github.com/geonativefr/front-office/actions/runs/4122850660/jobs/7120135368#step:7:20).0/x64
Environment details
Run . /home/runner/work/_actions/sparkfabrik/android-build-action/v1.3.3/build.sh
package-name is required when uploading to play store
Error: Process completed with exit code 2.

I have defined package-name on the GitHub Action. With version 1.2.0, it works.

Maybe the bash condition fails?

    if [ -n "${PACKAGE_NAME}" ]; then
        echo "package-name is required when uploading to play store"
        exit 2

Thanks,

Mickaël

bpolaszek commented 1 year ago

(@misaert's teammate here)

Copy/paste from the failing process:

Run . /home/runner/work/_actions/sparkfabrik/android-build-action/v1.3.3/build.sh
  . /home/runner/work/_actions/sparkfabrik/android-build-action/v1.3.3/build.sh
  shell: /usr/bin/sh -e ***0***
  env:
    MSYS: winsymlinks:nativestrict
    BUILD_TYPE: bundle
    GRADLE_TASK: bundleRelease
    INCREMENT_BUILD_NUMBER: true
    PACKAGE_NAME: app.geonative
    UPLOAD_TO_PLAY_STORE: true
    FASTLANE_ENV: 
    ACTION_PATH: /home/runner/work/_actions/sparkfabrik/android-build-action/v1.3.3
    ...
package-name is required when uploading to play store

As you can see, PACKAGE_NAME is properly defined.

francescoben commented 1 year ago

hi @misaert @bpolaszek, we have the same problem too. A new version should come out today to fix it.

francescoben commented 1 year ago

@misaert @bpolaszek w've released version v1.3.4 which should solve the problem, can you try it and let us know?

misaert commented 1 year ago

Thanks for your reactivity!

It seems ok for the previous error with package-name but I have a new one:

Run sparkfabrik/android-build-action@v1.3.4
Run ruby/setup-ruby@v1
Modifying PATH
Downloading Ruby
Extracting  Ruby
Print Ruby version
Installing Bundler
Run actions/setup-node@v3
Found in cache @ /opt/hostedtoolcache/node/16.[19](https://github.com/geonativefr/front-office/actions/runs/4125390174/jobs/7125886672#step:7:20).0/x64
Environment details
Run . /home/runner/work/_actions/sparkfabrik/android-build-action/v1.3.4/build.sh
Creating keystore from content
Fetching gem metadata from https://rubygems.org/........
Resolving dependencies...
Using rexml 3.2.5
Fetching public_suffix 5.0.1
Fetching atomos 0.1.3
Installing atomos 0.1.3
Installing public_suffix 5.0.1
Fetching babosa 1.0.2
Using bundler 2.5.0.dev
Fetching colored 1.2
Installing babosa 1.0.2
Installing colored 1.2
Fetching highline 2.0.3
Fetching security 0.1.5
Installing security 0.1.5
Fetching excon 0.99.0
Installing highline 2.0.3
Fetching gh_inspector 1.1.3
Installing excon 0.99.0
Installing gh_inspector 1.1.3
Fetching json 1.8.6
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching plist 3.1.0
Installing json 1.8.6 with native extensions
Installing plist 3.1.0
Fetching rubyzip 1.1.7
Installing rubyzip 1.1.7
Fetching terminal-table 1.4.5
Installing terminal-table 1.4.5
Fetching multipart-post 2.0.0
Installing multipart-post 2.0.0
Fetching unf_ext 0.0.8.2
Installing unf_ext 0.0.8.2 with native extensions
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching claide 1.0.3
Installing claide 1.0.3
Fetching colored2 3.1.2
Installing colored2 3.1.2
Fetching dotenv 2.8.1
Installing dotenv 2.8.1
Fetching mini_magick 4.5.1
Installing mini_magick 4.5.1
Fetching rouge 2.0.7
Installing rouge 2.0.7
Fetching net-ssh 7.0.1
Installing net-ssh 7.0.1
Fetching slack-notifier 1.5.1
Fetching jwt 2.7.0
Installing slack-notifier 1.5.1
Fetching memoist 0.16.2
Installing jwt 2.7.0
Fetching os 1.1.4
Installing memoist 0.16.2
Fetching httpclient 2.8.3
Installing os 1.1.4
Fetching hurley 0.2
Installing httpclient 2.8.3
Installing hurley 0.2
Fetching mime-types-data 3.2022.0105
Fetching uber 0.0.15
Installing uber 0.0.15
Installing mime-types-data 3.2022.0105
Fetching retriable 2.1.0
Fetching thor 0.20.3
Installing retriable 2.1.0
Fetching terminal-notifier 1.6.3
Installing thor 0.20.3
Fetching nanaimo 0.3.0
Installing nanaimo 0.3.0
Fetching http-accept 1.7.0
Installing http-accept 1.7.0
Fetching netrc 0.11.0
Installing netrc 0.11.0
Fetching fastlane-plugin-increment_version_code 0.4.3
Installing fastlane-plugin-increment_version_code 0.4.3
Fetching CFPropertyList 3.0.6
Installing CFPropertyList 3.0.6
Fetching addressable 2.8.1
Installing addressable 2.8.1
Installing terminal-notifier 1.6.3
Fetching commander 4.6.0
Fetching faraday 0.17.6
Installing commander 4.6.0
Installing faraday 0.17.6
Fetching unf 0.1.4
Fetching xcpretty 0.3.0
Installing unf 0.1.4
Fetching net-sftp 2.1.2
Installing xcpretty 0.3.0
Installing net-sftp 2.1.2
Fetching representable 2.3.0
Fetching mime-types 3.4.1
Installing representable 2.3.0
Installing mime-types 3.4.1
Fetching xcodeproj 1.22.0
Fetching fastimage 1.6.8
Installing xcodeproj 1.22.0
Fetching credentials_manager 0.16.4
Installing credentials_manager 0.16.4
Fetching faraday_middleware 0.14.0
Installing faraday_middleware 0.14.0
Fetching signet 0.17.0
Installing signet 0.17.0
Fetching domain_name 0.5.20190701
Installing fastimage 1.6.8
Installing domain_name 0.5.20190701
Fetching xcpretty-travis-formatter 1.0.1
Fetching fastlane_core 0.59.0
Installing xcpretty-travis-formatter 1.0.1
Fetching krausefx-shenzhen 0.14.11
Installing fastlane_core 0.59.0
Fetching googleauth 0.17.1
Installing krausefx-shenzhen 0.14.11
Fetching http-cookie 1.0.5
Installing googleauth 0.17.1
Installing http-cookie 1.0.5
Fetching gym 1.12.1
Fetching scan 0.14.2
Installing gym 1.12.1
Fetching screengrab 0.5.6
Installing scan 0.14.2
Fetching snapshot 1.16.4
Installing screengrab 0.5.6
Fetching google-api-client 0.9.4
Installing snapshot 1.16.4
Fetching faraday-cookie_jar 0.0.7
Installing faraday-cookie_jar 0.0.7
Fetching rest-client 2.1.0
Installing rest-client 2.1.0
Fetching spaceship 0.39.0
Installing spaceship 0.39.0
Fetching fastlane-plugin-browserstack 0.3.2
Installing fastlane-plugin-browserstack 0.3.2
Fetching cert 1.4.4
Installing cert 1.4.4
Fetching deliver 1.16.1
Installing deliver 1.16.1
Fetching sigh 1.12.1
Installing sigh 1.12.1
Fetching pem 1.4.1
Installing pem 1.4.1
Fetching pilot 1.12.1
Installing pilot 1.12.1
Fetching produce 1.3.2
Installing produce 1.3.2
Fetching xcode-install 1.4.0
Installing google-api-client 0.9.4
Installing xcode-install 1.4.0
Fetching frameit 2.8.0
Installing frameit 2.8.0
Fetching match 0.11.1
Installing match 0.11.1
Fetching supply 0.8.0
Installing supply 0.8.0
Fetching fastlane 1.92.0
Installing fastlane 1.92.0
Bundle complete! 3 Gemfile dependencies, 79 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Running fastlane
undefined method `json_key_data_raw' for #<CredentialsManager::AppfileConfig:0x00007fb85436[35](https://github.com/geonativefr/front-office/actions/runs/4125390174/jobs/7125886672#step:7:40)58>
undefined method `json_key_data_raw' for #<CredentialsManager::AppfileConfig:0x00007fb854361de8>
[14:58:20]: ------------------------------
[14:58:20]: --- Step: default_platform ---
[14:58:20]: ------------------------------
[14:58:21]: Driving the lane 'android bundle' 🚀
[14:58:21]: /home/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/fastlane-1.92.0/lib/fastlane/runner.rb:101:in `rescue in trigger_action_by_name'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/fastlane-1.92.0/lib/fastlane/runner.rb:96:in `trigger_action_by_name'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/fastlane-1.92.0/lib/fastlane/fast_file.rb:140:in `method_missing'
Fastfile:41:in `block (2 levels) in parsing_binding'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/fastlane-1.92.0/lib/fastlane/lane.rb:33:in `call'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/fastlane-1.92.0/lib/fastlane/runner.rb:50:in `block in execute'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/fastlane-1.92.0/lib/fastlane/runner.rb:46:in `chdir'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/fastlane-1.92.0/lib/fastlane/runner.rb:46:in `execute'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/fastlane-1.92.0/lib/fastlane/lane_manager.rb:46:in `cruise_lane'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/fastlane-1.92.0/lib/fastlane/command_line_handler.rb:30:in `handle'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/fastlane-1.92.0/lib/fastlane/commands_generator.rb:42:in `block (2 levels) in run'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/fastlane_core-0.59.0/lib/fastlane_core/ui/fastlane_runner.rb:38:in `run!'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/fastlane-1.92.0/lib/fastlane/commands_generator.rb:175:in `run'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/fastlane-1.92.0/lib/fastlane/commands_generator.rb:13:in `start'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/fastlane-1.92.0/lib/fastlane/cli_tools_distributor.rb:47:in `take_off'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/fastlane-1.92.0/bin/fastlane:5:in `<top (required)>'
/home/runner/.rubies/ruby-head/bin/fastlane:25:in `load'
/home/runner/.rubies/ruby-head/bin/fastlane:25:in `<top (required)>'
/home/runner/.rubies/ruby-head/lib/ruby/3.3.0+0/bundler/cli/exec.rb:58:in `load'
/home/runner/.rubies/ruby-head/lib/ruby/3.3.0+0/bundler/cli/exec.rb:58:in `kernel_load'
/home/runner/.rubies/ruby-head/lib/ruby/3.3.0+0/bundler/cli/exec.rb:23:in `run'
/home/runner/.rubies/ruby-head/lib/ruby/3.3.0+0/bundler/cli.rb:491:in `exec'
/home/runner/.rubies/ruby-head/lib/ruby/3.3.0+0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/home/runner/.rubies/ruby-head/lib/ruby/3.3.0+0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/home/runner/.rubies/ruby-head/lib/ruby/3.3.0+0/bundler/vendor/thor/lib/thor.rb:[39](https://github.com/geonativefr/front-office/actions/runs/4125390174/jobs/7125886672#step:7:45)2:in `dispatch'
/home/runner/.rubies/ruby-head/lib/ruby/3.3.0+0/bundler/cli.rb:34:in `dispatch'
/home/runner/.rubies/ruby-head/lib/ruby/3.3.0+0/bundler/vendor/thor/lib/thor/base.rb:4[85](https://github.com/geonativefr/front-office/actions/runs/4125390174/jobs/7125886672#step:7:95):in `start'
/home/runner/.rubies/ruby-head/lib/ruby/3.3.0+0/bundler/cli.rb:28:in `start'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/bundler-2.5.0.dev/libexec/bundle:45:in `block in <top (required)>'
/home/runner/.rubies/ruby-head/lib/ruby/3.3.0+0/bundler/friendly_errors.rb:[117](https://github.com/geonativefr/front-office/actions/runs/4125390174/jobs/7125886672#step:7:127):in `with_friendly_errors'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/bundler-2.5.0.dev/libexec/bundle:33:in `<top (required)>'
/home/runner/.rubies/ruby-head/bin/bundle:25:in `load'
/home/runner/.rubies/ruby-head/bin/bundle:25:in `<main>'
[14:58:21]: Variable Dump:
[14:58:21]: ***:DEFAULT_PLATFORM=>:android, :PLATFORM_NAME=>:android, :LANE_NAME=>"android bundle"***
[14:58:21]: Could not find action or lane 'google_play_track_version_codes'. Check out the README for more details: https://github.com/fastlane/fastlane/tree/master/fastlane

+------+------------------+-------------+
|           fastlane summary            |
+------+------------------+-------------+
| Step | Action           | Time (in s) |
+------+------------------+-------------+
| 1    | default_platform | 0           |
+------+------------------+-------------+

[14:58:21]: fastlane finished with errors

[!] Could not find action or lane 'google_play_track_version_codes'. Check out the README for more details: https://github.com/fastlane/fastlane/tree/master/fastlane
Error: Process completed with exit code 1.

Do you know why?

Thanks,

Mickaël

UPDATE: It seems before, it used the version fastlane 2.211.0 and here fastlane 1.92.0 (version released at May 31, 2016).

francescoben commented 1 year ago

hi @misaert, I can't give you an answer right now, will need some more investigation here

misaert commented 1 year ago

Hi @francescoben,

I see the merge of #28 with the version 1.5.0. We will try it on our next release :crossed_fingers:

Thanks,

Mickaël

misaert commented 1 year ago

Hi,

I confirm it works :tada:

Thanks,

Mickaël