fastlane-community / fastlane-plugin-ionic

Integrate your Ionic build into your Fastlane setup
MIT License
86 stars 46 forks source link

cordovaNoFetch option broken #52

Open rvirani1 opened 5 years ago

rvirani1 commented 5 years ago

Perhaps the master branch is broken, so I just wanted to let you know before cutting a release. I created a fork and I got this when running the fastlane command as

    ionic(
      platform: 'ios',
      type: 'adhoc'
    )

So we get this stack trace

[12:58:11]: fastlane finished with errors
  |  
  | Looking for related GitHub issues on fastlane/fastlane...
  |  
  | Found no similar issues. To create a new issue, please visit:
  | https://github.com/fastlane/fastlane/issues/new
  | Run `fastlane env` to append the fastlane environment to your issue
  | bundler: failed to load command: fastlane (/Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/bin/fastlane)
  | NoMethodError: [!] undefined method `shellescape' for false:FalseClass
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/bundler/gems/fastlane-plugin-ionic-45ebb637570f/lib/fastlane/plugin/ionic/actions/ionic_action.rb:45:in `block in get_platform_args'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/bundler/gems/fastlane-plugin-ionic-45ebb637570f/lib/fastlane/plugin/ionic/actions/ionic_action.rb:32:in `each'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/bundler/gems/fastlane-plugin-ionic-45ebb637570f/lib/fastlane/plugin/ionic/actions/ionic_action.rb:32:in `get_platform_args'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/bundler/gems/fastlane-plugin-ionic-45ebb637570f/lib/fastlane/plugin/ionic/actions/ionic_action.rb:58:in `get_android_args'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/bundler/gems/fastlane-plugin-ionic-45ebb637570f/lib/fastlane/plugin/ionic/actions/ionic_action.rb:122:in `build'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/bundler/gems/fastlane-plugin-ionic-45ebb637570f/lib/fastlane/plugin/ionic/actions/ionic_action.rb:163:in `run'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/runner.rb:256:in `block (2 levels) in execute_action'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/runner.rb:235:in `block in execute_action'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/runner.rb:227:in `chdir'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/runner.rb:227:in `execute_action'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/fast_file.rb:154:in `method_missing'
  | Fastfile:32:in `block (2 levels) in parsing_binding'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/lane.rb:33:in `call'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/runner.rb:45:in `chdir'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/runner.rb:45:in `execute'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/lane_manager.rb:56:in `cruise_lane'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/commands_generator.rb:333:in `run'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in `take_off'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/bin/fastlane:23:in `<top (required)>'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/bin/fastlane:23:in `load'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/bin/fastlane:23:in `<top (required)>'
  | exit code: 1 duration: 3s
 

It's failing here. We don't set any fetch policy but the params is cordovaNoFetch with a value of false. This shouldn't really execute but false to string is actually "false", which is truthy. However, you can't do false.shellescape, so it errors.

lmdg commented 4 years ago

In case anyone gets stuck here, for now, if you're not using the cordova_no_fetch arg, then you should be able to set it as an empty string: cordova_no_fetch: '' so that it will be ignored (default to false).