Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sh commands not found #38

Closed
fobidlim opened this issue Jan 21, 2020 · 3 comments
Closed

sh commands not found #38

fobidlim opened this issue Jan 21, 2020 · 3 comments

Comments

@fobidlim
Copy link

I got errors below:

Run maierj/fastlane-action@v1.2.0
  with:
    lane: staging_beta
  env:
    JAVA_HOME: /opt/hostedtoolcache/jdk/8.0.242/x64
    JAVA_HOME_8.0.242_x64: /opt/hostedtoolcache/jdk/8.0.242/x64
Executing lane staging_beta on Linux.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   144    0     0  100   144      0    108  0:00:01  0:00:01 --:--:--   108
100   144    0     0  100   144      0     93  0:00:01  0:00:01 --:--:--    93
/bin/sh: 1: gem: not found
/bin/sh: 1: bundle: not found
/bin/sh: 1: bundle: not found
##[error]Error: Executing lane staging_beta failed.
##[error]Executing lane staging_beta failed.
##[error]Node run failed with exit code 1

my workflow:

name: Build and deploy debug to crarshlytics beta

on:
  push:
    branches: 
      - 'develop'

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
      with:
        ref: develop
    - name: Set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - name: Fastlane staging_beta
      uses: maierj/fastlane-action@v1.2.0
      with:
        lane: staging_beta
@yvanvds
Copy link

yvanvds commented Jan 22, 2020

I got exactly the same error. It did work a few weeks ago. Something must have changed, and my workflow did not.

default_platform(:android)

platform :android do
  desc "Runs all the tests"
  lane :test do
    gradle(task: "test")
  end

  desc "Submit a new Beta Build to Crashlytics Beta"
  lane :beta do
    gradle(task: "clean assembleRelease")
    crashlytics
  
    # sh "your_script.sh"
    # You can also use other beta testing services here
  end

  desc "Deploy a new version to the Google Play"
  lane :deploybeta do
    upload_to_play_store(aab: '../build/app/outputs/bundle/release/app-release.aab', track: 'beta', release_status: 'draft') # remove release status once we're live
  end
end

@GwonHyeok
Copy link

@fobidlim @yvanvds

I have a same issue

/bin/sh: 1: gem: not found

I checked the error message and it's an error because Ruby is not installed.

so now i'm added setup ruby to workflow file

- uses: actions/setup-ruby@v1

after adding setup-ruby the error was resolved.

this is my workflow file

name: CI

on:
  push:
    branches:
      - master

jobs:
  build:

    runs-on: ubuntu-latest

    steps:

      # Checkout
      - uses: actions/checkout@v1

      # Use Ruby
      - uses: actions/setup-ruby@v1

      # Setup Java
      - uses: actions/setup-java@v1
        with:
          java-version: '12.x'

      # Setup Flutter
      - uses: subosito/flutter-action@v1
        with:
          channel: 'beta'

      # Build Flutter Application
      - run: flutter pub get
      - run: flutter build appbundle --release

      # Upload Android AAB To Playstore Internal Track
      - uses: maierj/fastlane-action@v1.2.0
        env:
          SUPPLY_JSON_KEY_DATA: ${{ secrets.FASTLANE_ANDROID_JSON_KEY_DATA }}
        with:
          lane: 'deploy_internal'
          subdirectory: 'android'

@maierj
Copy link
Owner

maierj commented Jan 24, 2020

I just published a new version 1.3.0 that includes a fix for this issue.

What happend was:
In the action i use @actions/tool-cache to find the Ruby installation path and add it to the $PATH. When asking the tool-cache for the installation path, i hardcoded the Ruby version 2.6.3 instead of specifying a version range like >=2.6. There was obviously a change in the Ruby versions that are available by default on the Runners and version 2.6.3 is not available any more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants