Closed weibel closed 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:
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! 🐙
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 👍
@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>'
@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|
})
})
Hey @weibel sorry for the slow response, could you try passing the absolute path to your Podfile, instead of the relative path?
@ohayon I sent the reply before filling in the details. See above
oh great! glad you got it working! 🚀 let us know if there are any more issues!
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:✅ 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: '`./fastlane/Appfile`
```ruby app_identifierLoaded 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 |