fastlane / fastlane

🚀 The easiest way to automate building and releasing your iOS and Android apps
https://fastlane.tools
MIT License
39.61k stars 5.71k forks source link

Cocoapods action error callback: No Podfile found in the project directory #8572

Closed weibel closed 7 years ago

weibel commented 7 years ago

New Issue Checklist

Issue Description

When using the new error callback option on the cocoapods action for forcing a repo update as suggested in https://github.com/fastlane/fastlane/pull/8344 I get a [!] No Podfile found in the project directory. error for the second run of the cocoapods action.

I noticed that the second time around it does not use bundle exec, but I don't know if that is the cause for the issue.

Captured Output

Command Used: code_metrics scheme:<redacted> test server

Output/Log ``` DEBUG [2017-03-17 14:31:47.22]: Checking if there are any plugins that should be loaded... DEBUG [2017-03-17 14:31:47.23]: Using scheme: test server INFO [2017-03-17 14:31:47.23]: ------------------------------------------------- INFO [2017-03-17 14:31:47.23]: --- Step: Verifying required fastlane version --- INFO [2017-03-17 14:31:47.23]: ------------------------------------------------- INFO [2017-03-17 14:31:47.23]: Your fastlane version 2.20.0 matches the minimum requirement of 2.20.0 ✅ INFO [2017-03-17 14:31:47.23]: ------------------------------ INFO [2017-03-17 14:31:47.23]: --- Step: default_platform --- INFO [2017-03-17 14:31:47.23]: ------------------------------ INFO [2017-03-17 14:31:47.24]: Driving the lane 'ios code_metrics' 🚀 INFO [2017-03-17 14:31:47.24]: ----------------------- INFO [2017-03-17 14:31:47.24]: --- Step: cocoapods --- INFO [2017-03-17 14:31:47.24]: ----------------------- INFO [2017-03-17 14:31:47.47]: gem 'cocoapods' is already installed INFO [2017-03-17 14:31:47.47]: $ bundle exec pod install INFO [2017-03-17 14:31:48.89]: ▸ WARNING: Nokogiri was built against LibXML version 2.9.2, but has dynamically loaded 2.9.4 INFO [2017-03-17 14:31:50.39]: ▸ Analyzing dependencies INFO [2017-03-17 14:31:50.39]: ▸ Pre-downloading: `Shimmer` from `https://github.com/facebook/Shimmer.git`, commit `bfeedb79a8aba946649ef48521eb4ae53d2eeb72` INFO [2017-03-17 14:31:50.45]: ▸ Pre-downloading: `iOS-WebP` from `https://github.com/weibel/iOS-WebP.git`, commit `610aa365f0e8bf99e46ad0f10a526e6ceb6a9aaf` INFO [2017-03-17 14:31:50.93]: ▸ [!] Unable to satisfy the following requirements: INFO [2017-03-17 14:31:50.93]: ▸ - `AsyncDisplayKit/Core (= 2.2)` required by `Podfile` INFO [2017-03-17 14:31:50.93]: ▸ - `AsyncDisplayKit/Core (= 2.2)` required by `Podfile` INFO [2017-03-17 14:31:50.93]: ▸ None of your spec sources contain a spec satisfying the dependency: `AsyncDisplayKit/Core (= 2.2)`. INFO [2017-03-17 14:31:50.93]: ▸ You have either: INFO [2017-03-17 14:31:50.93]: ▸ * out-of-date source repos which you can update with `pod repo update`. INFO [2017-03-17 14:31:50.93]: ▸ * mistyped the name or version. INFO [2017-03-17 14:31:50.93]: ▸ * not added the source repo that hosts the Podspec to your Podfile. INFO [2017-03-17 14:31:50.93]: ▸ Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default. INFO [2017-03-17 14:31:50.98]: ----------------------- INFO [2017-03-17 14:31:50.98]: --- Step: cocoapods --- INFO [2017-03-17 14:31:50.98]: ----------------------- INFO [2017-03-17 14:31:51.20]: gem 'cocoapods' is already installed INFO [2017-03-17 14:31:51.20]: $ pod install --repo-update --verbose INFO [2017-03-17 14:31:52.15]: ▸ WARNING: Nokogiri was built against LibXML version 2.9.2, but has dynamically loaded 2.9.4 INFO [2017-03-17 14:31:52.28]: ▸ [!] No `Podfile' found in the project directory. INFO [2017-03-17 14:31:52.28]: ▸ /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/cocoapods-1.2.0/lib/cocoapods/command.rb:148:in `verify_podfile_exists!' INFO [2017-03-17 14:31:52.28]: ▸ /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/cocoapods-1.2.0/lib/cocoapods/command/install.rb:33:in `run' INFO [2017-03-17 14:31:52.28]: ▸ /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/claide-1.0.1/lib/claide/command.rb:334:in `run' INFO [2017-03-17 14:31:52.28]: ▸ /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/cocoapods-1.2.0/lib/cocoapods/command.rb:52:in `run' INFO [2017-03-17 14:31:52.28]: ▸ /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/cocoapods-1.2.0/bin/pod:55:in `' INFO [2017-03-17 14:31:52.28]: ▸ /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/bin/pod:23:in `load' INFO [2017-03-17 14:31:52.28]: ▸ /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/bin/pod:23:in `
' INFO [2017-03-17 14:31:52.28]: ▸ /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/bin/ruby_executable_hooks:15:in `eval' INFO [2017-03-17 14:31:52.28]: ▸ /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/bin/ruby_executable_hooks:15:in `
' WARN [2017-03-17 14:31:52.32]: Lane Context: INFO [2017-03-17 14:31:52.32]: {:DEFAULT_PLATFORM=>:ios, :PLATFORM_NAME=>:ios, :LANE_NAME=>"ios code_metrics"} ERROR [2017-03-17 14:31:52.32]: Exit status of command 'pod install --repo-update --verbose' was 1 instead of 0. WARNING: Nokogiri was built against LibXML version 2.9.2, but has dynamically loaded 2.9.4 [!] No `Podfile' found in the project directory. /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/cocoapods-1.2.0/lib/cocoapods/command.rb:148:in `verify_podfile_exists!' /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/cocoapods-1.2.0/lib/cocoapods/command/install.rb:33:in `run' /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/claide-1.0.1/lib/claide/command.rb:334:in `run' /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/cocoapods-1.2.0/lib/cocoapods/command.rb:52:in `run' /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/cocoapods-1.2.0/bin/pod:55:in `' /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/bin/pod:23:in `load' /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/bin/pod:23:in `
' /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/bin/ruby_executable_hooks:15:in `eval' /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/bin/ruby_executable_hooks:15:in `
' INFO [2017-03-17 14:31:52.32]: Successfully generated documentation at path '/Users/Shared/Jenkins/workspace/iOS -- Code Metrics/fastlane/README.md' +------+-------------------------------------+-------------+ | fastlane summary | +------+-------------------------------------+-------------+ | Step | Action | Time (in s) | +------+-------------------------------------+-------------+ | 1 | Verifying required fastlane version | 0 | | 2 | default_platform | 0 | | 💥 | cocoapods | 1 | | 💥 | cocoapods | 5 | +------+-------------------------------------+-------------+ ERROR [2017-03-17 14:31:52.32]: fastlane finished with errors ```
✅ fastlane environment ✅ ### Stack | Key | Value | | --------------------------- | ---------------------------------------------------- | | OS | 10.12.3 | | Ruby | 2.0.0 | | Bundler? | true | | Git | git version 2.10.1 | | Installation Source | ~/.rvm/gems/ruby-2.0.0-p648@codeanalyze/bin/fastlane | | Host | Mac OS X 10.12.3 (16D32) | | Ruby Lib Dir | ~/.rvm/rubies/ruby-2.0.0-p648/lib | | OpenSSL Version | OpenSSL 1.0.1j 15 Oct 2014 | | Is contained | false | | Is homebrew | false | | Is installed via Fabric.app | false | | Xcode Path | /Applications/Xcode.app/Contents/Developer/ | | Xcode Version | 8.2.1 | ### System Locale | Variable | Value | | | -------- | ----------- | - | | LANG | en_US.UTF-8 | ✅ | | LC_ALL | en_US.UTF-8 | ✅ | | LANGUAGE | | | ### fastlane files:
`./fastlane/Fastfile` ```ruby # Customise this file, documentation can be found here: # https://github.com/KrauseFx/fastlane/tree/master/docs # All available actions: https://github.com/KrauseFx/fastlane/blob/master/docs/Actions.md # can also be listed using the `fastlane actions` command # Change the syntax highlighting to Ruby # All lines starting with a # are ignored when running `fastlane` # By default, fastlane will send which actions are used # No personal data is shared, more information on https://github.com/fastlane/enhancer # Uncomment the following line to opt out # opt_out_usage # If you want to automatically update fastlane if a new version is available: # update_fastlane # This is the minimum version number required. # Update this, if you use features of a newer version fastlane_version "2.20.0" default_platform :ios platform :ios do # # TEST LANES # desc "Run all the tests" # http://mgrebenets.github.io/mobile%20ci/2015/09/21/code-coverage-for-ios-xcode-7/ lane :test do |options| ENV["FASTLANE_XCODE_LIST_TIMEOUT"] = "120" device = 'iPhone 6s' os = '10.2' sdk = "iphonesimulator#{os}" # https://github.com/fastlane/fastlane/issues/1943 sh "./launch-ios-simulator.sh '#{device}'" vv_cocoapods scan( clean: true, workspace: '.xcworkspace', scheme: options[:scheme], sdk: sdk, device: "#{device} (#{os})", code_coverage: true, output_types: 'junit', open_report: false, skip_build: true ) slather( scheme: options[:scheme], proj: options[:project].nil? ? '.xcodeproj' : options[:project], workspace: '.xcworkspace', ignore: ["Pods/*", "App/Tests/*", "Trash/*", "ExternalTools/*", "fastlane/*", "../*"], jenkins: true, cobertura_xml: true, input_format: 'profdata' ) %x(killall "Simulator") end # # CODE ANALYZER LANES # desc "Run the code analyzer scripts" # fastlane jenkins_adhoc scheme:${scheme} app_name:${APP_NAME} build_server_url:${BUILD_URL} commit_sha:${GIT_COMMIT} repository_url:${GIT_URL} lane :code_metrics do |options| vv_cocoapods gym( clean: true, export_method: "ad-hoc", output_name: "", workspace: ".xcworkspace", scheme: options[:scheme], buildlog_path: 'xcodebuild.log' ) %x(oclint-xcodebuild xcodebuild.log) %x(java -Xmx512m -classpath /Users/Shared/Jenkins/PMD/pmd-5.0.3.jar:/Users/Shared/Jenkins/PMD/ObjCLanguage-0.0.8-SNAPSHOT.jar net.sourceforge.pmd.cpd.CPD --minimum-tokens 100 --language ObjectiveC --encoding UTF-8 --format net.sourceforge.pmd.cpd.XMLRenderer --files "/Users/Shared/Jenkins/workspace/iOS -- Code Metrics/App" "/Users/Shared/Jenkins/workspace/iOS -- Code Metrics/Extensions" > build/cpd-output.xml || exit 0) %x(sloccount --duplicates --wide --details App Extensions > build/sloccount.sc || exit 0) %x(oclint-json-compilation-database -e ThirdParty -e Pods -- -rc LONG_LINE=200 -max-priority-1 100000 -max-priority-2 100000 -max-priority-3 100000 -report-type pmd -o oclint.xml || exit 0) end # # BETA BUILD LANES # desc "Submit a new Beta Build to Fabric Beta from Jenkins." # fastlane jenkins_adhoc scheme:${scheme} app_name:${APP_NAME} build_server_url:${BUILD_URL} commit_sha:${GIT_COMMIT} repository_url:${GIT_URL} lane :fabric_adhoc do |options| vv_cocoapods update_translations vv_match('adhoc') gym( clean: true, export_method: "ad-hoc", output_name: "", workspace: ".xcworkspace", scheme: options[:scheme] ) crashlytics( api_token: "<>", build_secret: "<>", notes: "Distributed by Jenkins: #{options[:app_name]}, git commit: #{options[:commit_sha]}", groups: "ios-qa-1" ) clean_build_artifacts end desc "Deploy a new version to Testflight" lane :testflight_upload do ENV['FASTLANE_USER'] = ENV['testflight_id'] ENV['FASTLANE_PASSWORD'] = ENV['testflight_pw'] # Live parameter is not working https://github.com/fastlane/fastlane/issues current_build_number = latest_testflight_build_number( initial_build_number: 0, version: '8.12.2', username: ENV['testflight_id'] ) increment_build_number( build_number: current_build_number.to_i + 1 ) vv_cocoapods vv_match('appstore') vv_match('adhoc') gym( clean: true, export_method: "app-store", output_name: "", configuration: "Release", workspace: ".xcworkspace", scheme: " regular", ) pilot( username: ENV['testflight_id'], skip_waiting_for_build_processing: true, skip_submission: true ) clean_build_artifacts end # # CERTIFICATE LANES # desc "Create new certificates and profiles" lane :create_certificates do vv_match('development', false) vv_match('adhoc', false) vv_match('appstore', false) end desc "Bootstrap local dev machine with provisioning profiles and certificates" lane :bootstrap_dev_machine do vv_match('development', true, 'https:') vv_match('adhoc', true, 'https:') vv_match('appstore', true, 'https:') end # # FASTLANE LIFECYCLE # before_all do # ENV["SLACK_URL"] = "https://hooks.slack.com/services/..." # increment_build_number end after_all do |lane| # This block is called, only if the executed lane was successful end error do |lane, exception| %x(killall "Simulator") #p "Lane: #{lane}, Exception: #{exception.message}" end # # CONVENIENCE METHODS # def vv_cocoapods cocoapods(error_callback: lambda { |result| # Udate cocoapods. This might fail on the private pods, but we'll let it fail silently cocoapods(repo_update: true, use_bundle_exec: true, verbose: true) }) end def update_translations %x(rake localization:send_translations) %x(rake localization:get_translations) end def vv_match(type, readonly = true, github_url = ) match( git_url: github_url, type: type, username: , readonly: readonly, force_for_new_devices: !readonly, app_identifier: [, ] ) end end ```
`./fastlane/Appfile` ```ruby app_identifier team_id itc_team_id ```
### fastlane gems | Gem | Version | Update-Status | | -------- | ------- | ------------- | | fastlane | 2.20.0 | ✅ Up-To-Date | ### Loaded fastlane plugins: **No plugins Loaded**
Loaded gems | Gem | Version | | ------------------------- | ------------ | | rake | 10.5.0 | | CFPropertyList | 2.3.5 | | i18n | 0.8.1 | | minitest | 5.10.1 | | thread_safe | 0.3.6 | | tzinfo | 1.2.2 | | activesupport | 4.2.8 | | public_suffix | 2.0.5 | | addressable | 2.5.0 | | awesome_print | 1.7.0 | | babosa | 1.0.2 | | builder | 3.2.3 | | bundler | 1.14.3 | | calabash-common | 0.0.2 | | clipboard | 1.1.1 | | diff-lcs | 1.3 | | multi_json | 1.12.1 | | gherkin | 2.12.2 | | multi_test | 0.1.2 | | cucumber | 1.3.20 | | edn | 1.1.1 | | geocoder | 1.4.3 | | httpclient | 2.8.3 | | json | 1.8.6 | | command_runner_ng | 0.1.0 | | thor | 0.19.4 | | run_loop | 2.2.1 | | slowhandcuke | 0.0.3 | | calabash-cucumber | 0.20.0 | | claide | 1.0.1 | | clamp | 0.6.5 | | fuzzy_match | 2.0.4 | | nap | 1.1.0 | | cocoapods-core | 1.2.0 | | cocoapods-deintegrate | 1.0.1 | | cocoapods-downloader | 1.1.3 | | cocoapods-plugins | 1.0.0 | | cocoapods-search | 1.0.0 | | cocoapods-stats | 1.0.0 | | netrc | 0.7.8 | | cocoapods-trunk | 1.1.2 | | cocoapods-try | 1.1.0 | | colored | 1.2 | | escape | 0.0.4 | | fourflusher | 2.0.1 | | gh_inspector | 1.0.3 | | molinillo | 0.5.7 | | ruby-macho | 0.2.6 | | nanaimo | 0.2.3 | | xcodeproj | 1.4.2 | | cocoapods | 1.2.0 | | highline | 1.7.8 | | commander | 4.4.3 | | concurrent-ruby | 1.0.5 | | unf_ext | 0.0.7.2 | | unf | 0.1.4 | | domain_name | 0.5.20170223 | | dotenv | 2.2.0 | | excon | 0.55.0 | | multipart-post | 2.0.0 | | faraday | 0.11.0 | | http-cookie | 1.0.3 | | faraday-cookie_jar | 0.0.6 | | faraday_middleware | 0.11.0.1 | | fastimage | 2.1.0 | | jwt | 1.5.6 | | little-plugger | 1.1.4 | | logging | 2.2.0 | | memoist | 0.15.0 | | os | 0.9.6 | | signet | 0.7.3 | | googleauth | 0.5.1 | | hurley | 0.2 | | mime-types | 2.99.3 | | uber | 0.0.15 | | representable | 2.3.0 | | retriable | 2.1.0 | | google-api-client | 0.9.28 | | mini_magick | 4.5.1 | | multi_xml | 0.6.0 | | plist | 3.2.0 | | rubyzip | 1.2.1 | | security | 0.1.3 | | slack-notifier | 1.5.1 | | terminal-notifier | 1.7.1 | | unicode-display_width | 1.1.3 | | terminal-table | 1.7.3 | | tty-screen | 0.5.0 | | word_wrap | 1.0.0 | | rouge | 1.11.1 | | xcpretty | 0.2.4 | | xcpretty-travis-formatter | 0.0.4 | | hashie | 3.5.5 | | mini_portile2 | 2.0.0 | | nokogiri | 1.6.7.2 | | parallel | 1.11.1 | | parallel_calabash | 0.2.4 | | rack | 1.6.5 | | rack-protection | 1.5.3 | | rdoc | 4.3.0 | | rest-client | 1.8.0 | | rspec-support | 3.5.0 | | rspec-core | 3.5.4 | | rspec-expectations | 3.5.0 | | rspec-mocks | 3.5.0 | | rspec | 3.5.0 | | rtrail | 0.0.3 | | tilt | 2.0.6 | | sinatra | 1.4.8 | | sim_launcher | 0.4.13 | | slather | 2.3.0 | | smartling | 1.0.1 |
*generated on:* **2017-03-17**
fastlane-bot commented 7 years ago

It seems like this issue might be related to code signing :no_entry_sign:

Have you seen our new Code Signing Troubleshooting Guide? It will help you resolve the most common code signing issues :+1:

ohayon commented 7 years ago

Hey @weibel, could you pass a podfile parameter to your cocoapods action as well? That will ensure it gets called from the right place. Let us know how that goes for you! Thanks! 🐙

KrauseFx commented 7 years ago

Do you have the Fastfile inside a directory called fastlane and your Podfile in the root of your project? It's very important that you use that directory structure 👍

weibel commented 7 years ago

@KrauseFx Both the Fastfile and the Podfile are in the right locations.

@ohayon My cocoapods action is now set up like this

cocoapods(podfile: './Podfile',  error_callback: lambda { |result|
  # Udate cocoapods. This might fail on the private pods, but we'll let it fail silently
  cocoapods(podfile: './Podfile', repo_update: true, error_callback: lambda { |result|
  })
})

This generates a new error Error setting value './Podfile' for option 'podfile'

INFO [2017-03-27 20:25:36.10]: -----------------------
INFO [2017-03-27 20:25:36.10]: --- Step: cocoapods ---
INFO [2017-03-27 20:25:36.10]: -----------------------
INFO [2017-03-27 20:25:36.35]: gem 'cocoapods' is already installed
INFO [2017-03-27 20:25:36.35]: $ cd '.' && bundle exec pod install
INFO [2017-03-27 20:25:37.75]: ▸ WARNING: Nokogiri was built against LibXML version 2.9.2, but has dynamically loaded 2.9.4
INFO [2017-03-27 20:25:39.22]: ▸ Analyzing dependencies
INFO [2017-03-27 20:25:39.22]: ▸ Pre-downloading: `Shimmer` from `https://github.com/facebook/Shimmer.git`, commit `bfeedb79a8aba946649ef48521eb4ae53d2eeb72`
INFO [2017-03-27 20:25:39.24]: ▸ Pre-downloading: `iOS-WebP` from `https://github.com/weibel/iOS-WebP.git`, commit `610aa365f0e8bf99e46ad0f10a526e6ceb6a9aaf`
INFO [2017-03-27 20:25:39.69]: ▸ [!] Unable to satisfy the following requirements:
INFO [2017-03-27 20:25:39.69]: ▸ - `AsyncDisplayKit/Core (= 2.2)` required by `Podfile`
INFO [2017-03-27 20:25:39.69]: ▸ - `AsyncDisplayKit/Core (= 2.2)` required by `Podfile`
INFO [2017-03-27 20:25:39.69]: ▸ None of your spec sources contain a spec satisfying the dependency: `AsyncDisplayKit/Core (= 2.2)`.
INFO [2017-03-27 20:25:39.69]: ▸ You have either:
INFO [2017-03-27 20:25:39.69]: ▸ * out-of-date source repos which you can update with `pod repo update`.
INFO [2017-03-27 20:25:39.69]: ▸ * mistyped the name or version.
INFO [2017-03-27 20:25:39.69]: ▸ * not added the source repo that hosts the Podspec to your Podfile.
INFO [2017-03-27 20:25:39.69]: ▸ Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
INFO [2017-03-27 20:25:39.74]: -----------------------
INFO [2017-03-27 20:25:39.74]: --- Step: cocoapods ---
INFO [2017-03-27 20:25:39.74]: -----------------------
ERROR [2017-03-27 20:25:39.74]: Error setting value './Podfile' for option 'podfile'
ERROR [2017-03-27 20:25:39.74]: You passed invalid parameters to 'cocoapods'.
ERROR [2017-03-27 20:25:39.74]: Check out the error below and available options by running `fastlane action cocoapods`
No matching processes belonging to you were found
WARN [2017-03-27 20:25:39.75]: Lane Context:
INFO [2017-03-27 20:25:39.75]: {:DEFAULT_PLATFORM=>:ios, :PLATFORM_NAME=>:ios, :LANE_NAME=>"ios code_metrics"}
ERROR [2017-03-27 20:25:39.75]: Could not find Podfile
INFO [2017-03-27 20:25:39.75]: Successfully generated documentation at path '/Users/Shared/Jenkins/workspace/iOS -- Code Metrics/fastlane/README.md'

+------+-------------------------------------+-------------+
|                     fastlane summary                     |
+------+-------------------------------------+-------------+
| Step | Action                              | Time (in s) |
+------+-------------------------------------+-------------+
| 1    | Verifying required fastlane version | 0           |
| 2    | default_platform                    | 0           |
| 💥   | cocoapods                           | 0           |
| 💥   | cocoapods                           | 3           |
+------+-------------------------------------+-------------+

ERROR [2017-03-27 20:25:39.76]: fastlane finished with errors
/Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane_core/lib/fastlane_core/configuration/config_item.rb:123:in `rescue in valid?': [!] Could not find Podfile (FastlaneCore::Interface::FastlaneError)
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane_core/lib/fastlane_core/configuration/config_item.rb:119:in `valid?'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane_core/lib/fastlane_core/configuration/config_item.rb:104:in `verify!'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane_core/lib/fastlane_core/configuration/configuration.rb:82:in `block in verify_value_exists'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane_core/lib/fastlane_core/configuration/configuration.rb:76:in `each'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane_core/lib/fastlane_core/configuration/configuration.rb:76:in `verify_value_exists'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane_core/lib/fastlane_core/configuration/configuration.rb:60:in `initialize'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane_core/lib/fastlane_core/configuration/configuration.rb:31:in `new'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane_core/lib/fastlane_core/configuration/configuration.rb:31:in `create'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/configuration_helper.rb:8:in `parse'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/runner.rb:236:in `block (2 levels) in execute_action'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/runner.rb:230:in `block in execute_action'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/runner.rb:226:in `chdir'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/runner.rb:226:in `execute_action'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/runner.rb:148:in `trigger_action_by_name'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/fast_file.rb:146:in `method_missing'
    from Fastfile:205:in `block in vv_cocoapods'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/helper/sh_helper.rb:54:in `call'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/helper/sh_helper.rb:54:in `sh_control_output'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/helper/sh_helper.rb:10:in `sh'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/actions/cocoapods.rb:27:in `run'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/runner.rb:252:in `block (2 levels) in execute_action'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/runner.rb:230:in `block in execute_action'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/runner.rb:226:in `chdir'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/runner.rb:226:in `execute_action'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/runner.rb:148:in `trigger_action_by_name'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/fast_file.rb:146:in `method_missing'
    from Fastfile:203:in `vv_cocoapods'
    from Fastfile:74:in `block (2 levels) in parsing_binding'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/lane.rb:33:in `call'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/lane.rb:33:in `call'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/lane_manager.rb:52:in `cruise_lane'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/command_line_handler.rb:30:in `handle'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/commands_generator.rb:104:in `block (2 levels) in run'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/commander-fastlane-4.4.4/lib/commander/command.rb:178:in `call'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/commander-fastlane-4.4.4/lib/commander/command.rb:178:in `call'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/commander-fastlane-4.4.4/lib/commander/command.rb:153:in `run'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/commander-fastlane-4.4.4/lib/commander/runner.rb:476:in `run_active_command'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:38:in `run!'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/commander-fastlane-4.4.4/lib/commander/delegates.rb:15:in `run!'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/commands_generator.rb:303:in `run'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/commands_generator.rb:42:in `start'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/fastlane/lib/fastlane/cli_tools_distributor.rb:65:in `take_off'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/gems/fastlane-2.23.0/bin/fastlane:20:in `<top (required)>'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/bin/fastlane:23:in `load'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/bin/fastlane:23:in `<main>'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/bin/ruby_executable_hooks:15:in `eval'
    from /Users/Shared/Jenkins/.rvm/gems/ruby-2.0.0-p648@codeanalyze/bin/ruby_executable_hooks:15:in `<main>'
weibel commented 7 years ago

@ohayon I finally got around to looking at this. It turns out there is a problem with the path for the Podfile as indicated with the error. Say for example that the podfile is located in /projects/project/Podfile the first run of the cocoapods action will look after the Podfile on the correct place, but the second time it is invoked it looks for /projects/Podfile.

I checked this by adding logging in the verify_block for the parameter. I fixed this in my own fastfile by doing the following

    fastlane_dir = %x(pwd)
    absolute_path = Pathname.new(File.expand_path(fastlane_dir)).parent
    cocoapods(podfile: "#{absolute_path}/Podfile", error_callback: lambda { |result|
      # Udate cocoapods. This might fail on the private pods, but we'll let it fail silently
      cocoapods(podfile: "#{absolute_path}/Podfile", repo_update: true,  error_callback: lambda { |result|
      })
    })
ohayon commented 7 years ago

Hey @weibel sorry for the slow response, could you try passing the absolute path to your Podfile, instead of the relative path?

weibel commented 7 years ago

@ohayon I sent the reply before filling in the details. See above

ohayon commented 7 years ago

oh great! glad you got it working! 🚀 let us know if there are any more issues!