fastlane: Scan hangs when getting build settings
New Issue Checklist
- Updated fastlane to the latest version
- I have read the Contribution Guidelines
Issue Description
Scan hangs when getting the build settings:
xcrun xcodebuild -showBuildSettings -workspace './App.xcworkspace' -scheme 'AppTests'
A couple things to note:
- I thought that it was related to https://github.com/fastlane/fastlane/issues/1844 since it was the last command showing up in the logs, but after looking at the stacktrace when I force quite
fastlane, it seems that it’s actually hanging onshowBuildSettings. - I can reproduce the freeze by running the
-showBuildSettingscommand manually, though it only happens one time out of five, something like that. - It happens consistently when running in a CI environment (circleci 7.3)
- It started happening after I removed all files in the App target from the AppTests target. Instead, I now have
@testable import Appeverywhere. This change required to modify my Podfile to have different pods for the AppTests target (see below) - DerivedData is relative to my project directory.
Complete output when running fastlane, including the stack trace and command used
Please note that I modified fastlane_core’s sources to show the build settings command, which is why it shows up in the logs. If I hadn’t, only the -list command would appear.
ldiqual@ldiqual-mbp ~/S/App-ios-test1> bundle exec fastlane test --verbose
/Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/commander-4.3.5/lib/commander/user_interaction.rb:334: warning: constant ::TimeoutError is deprecated
INFO [2016-04-04 15:18:48.74]: ---------------------------
INFO [2016-04-04 15:18:48.74]: --- Step: opt_out_usage ---
INFO [2016-04-04 15:18:48.74]: ---------------------------
INFO [2016-04-04 15:18:48.74]: Disabled upload of used actions
INFO [2016-04-04 15:18:48.74]: -------------------------------------------------
INFO [2016-04-04 15:18:48.74]: --- Step: Verifying required fastlane version ---
INFO [2016-04-04 15:18:48.74]: -------------------------------------------------
INFO [2016-04-04 15:18:48.74]: fastlane version valid
INFO [2016-04-04 15:18:48.74]: ------------------------------
INFO [2016-04-04 15:18:48.74]: --- Step: default_platform ---
INFO [2016-04-04 15:18:48.74]: ------------------------------
INFO [2016-04-04 15:18:48.91]: Driving the lane 'ios test' 🚀
INFO [2016-04-04 15:18:48.91]: ------------------
INFO [2016-04-04 15:18:48.91]: --- Step: scan ---
INFO [2016-04-04 15:18:48.91]: ------------------
WARN [2016-04-04 15:18:48.93]: xcrun xcodebuild -list -workspace './App.xcworkspace'
2016-04-04 15:18:50.261 xcodebuild[94625:3349109] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/SparkInspectorXcodePlugin.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2016-04-04 15:18:50.265 xcodebuild[94625:3349109] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/FixCode.xcplugin' not present in DVTPlugInCompatibilityUUIDs
INFO [2016-04-04 15:18:51.94]: $ xcrun xcodebuild -showBuildSettings -workspace './App.xcworkspace' -scheme 'AppTests'
2016-04-04 15:18:52.174 xcodebuild[94629:3349189] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/SparkInspectorXcodePlugin.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2016-04-04 15:18:52.176 xcodebuild[94629:3349189] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/FixCode.xcplugin' not present in DVTPlugInCompatibilityUUIDs
^C/Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane_core-0.41.1/lib/fastlane_core/helper.rb:51:in ``': Interrupt
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane_core-0.41.1/lib/fastlane_core/helper.rb:51:in `backticks'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane_core-0.41.1/lib/fastlane_core/project.rb:203:in `build_settings'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane_core-0.41.1/lib/fastlane_core/project.rb:168:in `mac?'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane_core-0.41.1/lib/fastlane_core/project.rb:180:in `ios?'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/scan-0.5.2/lib/scan/detect_values.rb:23:in `set_additional_default_values'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/scan-0.5.2/lib/scan.rb:27:in `config='
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/scan-0.5.2/lib/scan/manager.rb:4:in `work'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane-1.70.0/lib/fastlane/actions/scan.rb:10:in `run'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane-1.70.0/lib/fastlane/runner.rb:143:in `block (2 levels) in execute_action'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane-1.70.0/lib/fastlane/actions/actions_helper.rb:35:in `execute_action'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane-1.70.0/lib/fastlane/runner.rb:129:in `block in execute_action'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane-1.70.0/lib/fastlane/runner.rb:128:in `chdir'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane-1.70.0/lib/fastlane/runner.rb:128:in `execute_action'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane-1.70.0/lib/fastlane/fast_file.rb:149:in `method_missing'
from Fastfile:16:in `block (2 levels) in parsing_binding'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane-1.70.0/lib/fastlane/lane.rb:36:in `call'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane-1.70.0/lib/fastlane/runner.rb:52:in `block in execute'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane-1.70.0/lib/fastlane/runner.rb:46:in `chdir'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane-1.70.0/lib/fastlane/runner.rb:46:in `execute'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane-1.70.0/lib/fastlane/lane_manager.rb:46:in `cruise_lane'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane-1.70.0/lib/fastlane/command_line_handler.rb:30:in `handle'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane-1.70.0/bin/fastlane:38:in `block (2 levels) in run'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/commander-4.3.5/lib/commander/command.rb:153:in `run'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/commander-4.3.5/lib/commander/runner.rb:428:in `run_active_command'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane_core-0.41.1/lib/fastlane_core/ui/fastlane_runner.rb:23:in `run!'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/commander-4.3.5/lib/commander/delegates.rb:15:in `run!'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane-1.70.0/bin/fastlane:156:in `run'
from /Users/ldiqual/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane-1.70.0/bin/fastlane:162:in `<top (required)>'
from /Users/ldiqual/.rbenv/versions/2.3.0/bin/fastlane:23:in `load'
from /Users/ldiqual/.rbenv/versions/2.3.0/bin/fastlane:23:in `<main>'
ldiqual@ldiqual-mbp ~/S/App-ios-test1> xcrun xcodebuild -showBuildSettings -workspace './App.xcworkspace' -scheme 'AppTests'
2016-04-04 15:31:51.235 xcodebuild[94673:3360581] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/SparkInspectorXcodePlugin.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2016-04-04 15:31:51.238 xcodebuild[94673:3360581] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/FixCode.xcplugin' not present in DVTPlugInCompatibilityUUIDs
Build settings for action build and target AppTests:
Note that the command above doesn’t exit (1 time out of 5), I have to force kill it.
Configuration Files
Please copy the complete content of your Fastfile and any other configuration files you use below:
Fastfile:
opt_out_usage
fastlane_version "1.49.0"
default_platform :ios
platform :ios do
desc "Runs all the tests"
lane :test do
scan(scheme: "AppTests")
end
end
Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!
inhibit_all_warnings!
abstract_target 'Common' do
target 'App'
target 'AppTests' do
pod 'SomePod'
end
pod 'SomeOtherPod'
end
Environment
fastlane 1.70.0 Bundler + rbenv ruby 2.3.0 xcode 7.3 cocoapods 1.0.0.beta.6
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 48 (17 by maintainers)
Thanks @fcy! I’m going to bump that pull request internally so we can hopefully merge soon 👍
@TKBurner I can see this issue on several App and Library projects. That leads to a hanging build server. PR #5188 solves the issue. What’s the reason not to accept it? I don’t want to remove fastlane from our projects, but that workaround is currently under discussion in my team.
We hit this again in a different project, again running on Jenkins. Trying all these things fixed it;
Sharedon all the shared schemesSharedon all the shared schemesIt seems that sometimes the project / scheme files just needs something to change to fix this, these steps above seem to somehow kick it into action.
Hi all,
gym1.9.0 💪 andscan0.12.0 🔍 have been released to pick up thesefastlane_coreimprovements.To get updated and try them out, please run
[sudo] gem update gym scan🚀Thanks for merging! It works 😃
Hi all, we’ve shipped a workaround (#5626) and timeout/retry solution (#5188) as part of
fastlane_core0.51.0 🚀Thanks very much for your help! Please let us know how it looks 👍
@ilsinszkibal thanks for sharing your workaround, unfortunately it does not work with my projects 😢
@ilsinszkibal Was it just the last message in your log or you performed some debugging? I found out that the real command in my case was
xcrun xcodebuild -showBuildSettings ...despite that last message wasxcodebuild -list -workspace ....(lack of logging). For me it’s still an annoying issue with frequent CI build failures but I’ve added a check call to xcodebuild with small timeout to get those errors faster.FWIW we don’t use rvm/rbenv, we use the system Ruby. And we keep OS X up to date.
Any updates on this? I am also seeing this happen once we upgraded to Xcode 7.3.1
Any news or plans to create a new PR?
@bencollier Thanks for documenting your fix!