maierj / fastlane-action

A GitHub action for executing fastlane lanes.
MIT License
321 stars 38 forks source link

command not found 'fastlane' #106

Open lukepighetti opened 1 year ago

lukepighetti commented 1 year ago

I get the error

bundler: command not found: fastlane
[27](https://github.com/lukepighetti/vgl/actions/runs/3954664590/jobs/6772232738#step:6:28)
Install missing gem executables with `bundle install`

with the action

jobs:
  deploy:
    name: Deploy to TestFlight
    runs-on: macos-latest
    timeout-minutes: 60

    steps:
      - uses: actions/checkout@v3
      - uses: subosito/flutter-action@v2
        with:
          channel: stable
      - run: flutter pub get
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: "3.1.2"
          working-directory: "ios"
      - uses: maierj/fastlane-action@v3.0.0
        with:
          lane: beta
          subdirectory: "ios"
maierj commented 1 year ago

Try adding bundler-cache: true to the setup-ruby step

- uses: ruby/setup-ruby@v1
  with:
    ruby-version: "3.1.2"
    working-directory: "ios"
    bundler-cache: true
xaviertansde commented 10 months ago

any updates?

idlework commented 5 months ago

@maierj I have this same issue. It started when I updated to Fastlane action 3.1.0.

The project has a .ruby-version in the root, and the Github Action contains:

- name: Install Ruby
  uses: ruby/setup-ruby@v1
  with:
    bundler-cache: true

- name: Build Android
  uses: maierj/fastlane-action@v3.1.0
  with:
    lane: 'android development'
  env:
    BUNDLE_ID: ${{ secrets.BUNDLE_ID }}
    ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
    ANDROID_KEYSTORE_ALIAS: ${{ secrets.ANDROID_KEYSTORE_ALIAS }}
    FIREBASE_ANDROID_APP_ID: ${{ secrets.FIREBASE_ANDROID_APP_ID }}
    GIT_PERSONAL_ACCESS_TOKEN: ${{ secrets.GIT_PERSONAL_ACCESS_TOKEN }}

Resulting in error log:

Run maierj/fastlane-action@v3.1.0
  with:
    lane: android development
  env:
    JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.11-9/x64
    JAVA_HOME_17_X64: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.11-9/x64
    BUNDLE_ID: ***
    ANDROID_KEYSTORE_PASSWORD: ***
    ANDROID_KEYSTORE_ALIAS: ***
    FIREBASE_ANDROID_APP_ID: ***
    GIT_PERSONAL_ACCESS_TOKEN: ***
Executing lane android development on Linux.
bundler: failed to load command: fastlane (/home/runner/work/app/app/vendor/bundle/ruby/2.7.0/bin/fastlane)
/home/runner/work/app/app/vendor/bundle/ruby/2.7.0/gems/fastlane-2.220.0/fastlane/lib/fastlane/erb_template_helper.rb:20:in `<module:Fastlane>': uninitialized constant Fastlane::OpenStruct (NameError)

bundler-cache: true was already in the action, so the suggested fix in this thread is not applicable here.

Would you have an other solution?

Thanks!

ferdinandfrank commented 2 months ago

I had the same issue after upgrading to Fastlane 2.222.0. Rolling back to Fastlane 2.217.0 solved it for me.