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

gym frequently times out when calling xcrun xcodebuild -list #5071

Closed
2 tasks done
nevir opened this issue Jun 9, 2016 · 14 comments
Closed
2 tasks done

gym frequently times out when calling xcrun xcodebuild -list #5071

nevir opened this issue Jun 9, 2016 · 14 comments

Comments

@nevir
Copy link

nevir commented Jun 9, 2016

New Issue Checklist

Issue Description

I frequently (maybe 50% of the time) see timeouts on gym builds. It always occurs when running xcrun xcodebuild -list. There are also "Skipped SDK" warnings that show up (regardless of whether it times out):

[10:08:15]: xcrun xcodebuild -list -workspace '/path/to/Project.xcworkspace'
2016-06-09 10:08:15.315 xcodebuild[4990:13566] [MT] DVTSDK: Skipped SDK /Applications/Xcode-7.3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk; its version (7.1) is below required minimum (9.3) for the iphonesimulator platform.
2016-06-09 10:08:15.316 xcodebuild[4990:13566] [MT] DVTSDK: Skipped SDK /Applications/Xcode-7.3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.4.sdk; its version (8.4) is below required minimum (9.3) for the iphonesimulator platform.
2016-06-09 10:08:15.317 xcodebuild[4990:13566] [MT] DVTSDK: Skipped SDK /Applications/Xcode-7.3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk; its version (9.0) is below required minimum (9.3) for the iphonesimulator platform.
2016-06-09 10:08:15.317 xcodebuild[4990:13566] [MT] DVTSDK: Skipped SDK /Applications/Xcode-7.3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.1.sdk; its version (9.1) is below required minimum (9.3) for the iphonesimulator platform.
2016-06-09 10:08:15.318 xcodebuild[4990:13566] [MT] DVTSDK: Skipped SDK /Applications/Xcode-7.3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk; its version (9.2) is below required minimum (9.3) for the iphonesimulator platform.
2016-06-09 10:08:16.267 xcodebuild[4994:13598] [MT] DVTSDK: Skipped SDK /Applications/Xcode-7.3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk; its version (7.1) is below required minimum (9.3) for the iphonesimulator platform.
2016-06-09 10:08:16.268 xcodebuild[4994:13598] [MT] DVTSDK: Skipped SDK /Applications/Xcode-7.3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.4.sdk; its version (8.4) is below required minimum (9.3) for the iphonesimulator platform.
2016-06-09 10:08:16.269 xcodebuild[4994:13598] [MT] DVTSDK: Skipped SDK /Applications/Xcode-7.3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk; its version (9.0) is below required minimum (9.3) for the iphonesimulator platform.
2016-06-09 10:08:16.269 xcodebuild[4994:13598] [MT] DVTSDK: Skipped SDK /Applications/Xcode-7.3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.1.sdk; its version (9.1) is below required minimum (9.3) for the iphonesimulator platform.
2016-06-09 10:08:16.269 xcodebuild[4994:13598] [MT] DVTSDK: Skipped SDK /Applications/Xcode-7.3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk; its version (9.2) is below required minimum (9.3) for the iphonesimulator platform.

^^^ hangs forever at this point

Full gym command:

gym --workspace /code/Project.xcworkspace --scheme demo --output_directory /code/build/demo --xcargs '-derivedDataPath "/code/build/demo/_intermediates/ios"' --codesigning_identity 'iPhone Distribution: Team (##########)'
@nevir
Copy link
Author

nevir commented Jun 9, 2016

I've also turned on --verbose, hopefully I'll have more details once it fails again

@KrauseFx
Copy link
Member

KrauseFx commented Jun 9, 2016

Does that happen on your machine or a CI system?

@nevir
Copy link
Author

nevir commented Jun 9, 2016

On a CI system (Circle CI's OS X machines) - unfortunately a private repo

@nevir
Copy link
Author

nevir commented Jun 10, 2016

Unfortunately, no additional detail when --verbose is on. The xcrun command appears to be what's hanging

@nevir
Copy link
Author

nevir commented Jun 10, 2016

Looks like it's similar or same to fastlane-old/gym#143 (#1844)

@funkybaboon
Copy link

funkybaboon commented Jun 13, 2016

I do have a cordova App that I'm trying to build. I'm getting this error every time I'm running gym through Jenkins. Here's my error with verbose:

WARN [2016-06-13 16:13:48.87]: xcrun xcodebuild -list -project ./TwitterDemo.xcodeproj
/usr/local/lib/ruby/gems/2.3.0/gems/fastlane_core-0.46.3/lib/fastlane_core/ui/interface.rb:139:in `user_error!': [!] xcodebuild -list timed-out after 10 seconds. You might need to recreate the user schemes. You can override the timeout value with the environment variable FASTLANE_XCODE_LIST_TIMEOUT (FastlaneCore::Interface::FastlaneError)
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane_core-0.46.3/lib/fastlane_core/ui/ui.rb:14:in `method_missing'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane_core-0.46.3/lib/fastlane_core/project.rb:268:in `rescue in raw_info'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane_core-0.46.3/lib/fastlane_core/project.rb:264:in `raw_info'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane_core-0.46.3/lib/fastlane_core/project.rb:296:in `parsed_info'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane_core-0.46.3/lib/fastlane_core/project.rb:93:in `schemes'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane_core-0.46.3/lib/fastlane_core/project.rb:101:in `select_scheme'
    from /usr/local/lib/ruby/gems/2.3.0/gems/gym-1.6.3/lib/gym/detect_values.rb:56:in `detect_scheme'
    from /usr/local/lib/ruby/gems/2.3.0/gems/gym-1.6.3/lib/gym/detect_values.rb:24:in `set_additional_default_values'
    from /usr/local/lib/ruby/gems/2.3.0/gems/gym-1.6.3/lib/gym.rb:25:in `config='
    from /usr/local/lib/ruby/gems/2.3.0/gems/gym-1.6.3/lib/gym/manager.rb:4:in `work'
    from /usr/local/lib/ruby/gems/2.3.0/gems/gym-1.6.3/lib/gym/commands_generator.rb:42:in `block (2 levels) in run'
    from /usr/local/lib/ruby/gems/2.3.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
    from /usr/local/lib/ruby/gems/2.3.0/gems/commander-4.3.5/lib/commander/command.rb:153:in `run'
    from /usr/local/lib/ruby/gems/2.3.0/gems/commander-4.3.5/lib/commander/runner.rb:428:in `run_active_command'
    from /usr/local/lib/ruby/gems/2.3.0/gems/fastlane_core-0.46.3/lib/fastlane_core/ui/fastlane_runner.rb:26:in `run!'
    from /usr/local/lib/ruby/gems/2.3.0/gems/commander-4.3.5/lib/commander/delegates.rb:15:in `run!'
    from /usr/local/lib/ruby/gems/2.3.0/gems/gym-1.6.3/lib/gym/commands_generator.rb:61:in `run'
    from /usr/local/lib/ruby/gems/2.3.0/gems/gym-1.6.3/lib/gym/commands_generator.rb:15:in `start'
    from /usr/local/lib/ruby/gems/2.3.0/gems/gym-1.6.3/bin/gym:6:in `<top (required)>'
    from /usr/local/bin/gym:23:in `load'
    from /usr/local/bin/gym:23:in `<main>'

edit: it seems to be a cordova problem:
http://moduscreate.com/cordova_xcodebuild_hangs_freezes_during_build/

a ruby script is fixing this:
https://github.com/simonprickett/cordovaxcodeschemefix

@vpolouchkine
Copy link
Contributor

@nevir Does that ^^ help?

@vpolouchkine vpolouchkine self-assigned this Jun 15, 2016
@nevir
Copy link
Author

nevir commented Jun 22, 2016

@vpolouchkine sadly nope, it still occurs after rebuilding the schemes with each build :( (Also, my project isn't cordova; but it is generated via cocoapods)

@vpolouchkine
Copy link
Contributor

Does it work as expected locally?

@nevir
Copy link
Author

nevir commented Jun 23, 2016

Yeah, I haven't experienced any timeouts locally :(

@dragvs
Copy link

dragvs commented Jun 27, 2016

I see such a problem in Travis CI builds too, never locally. On Travis it happens sporadically, I'm getting the following log:

...
INFO [2016-06-27 11:23:25.97]: -----------------
INFO [2016-06-27 11:23:25.97]: --- Step: gym ---
INFO [2016-06-27 11:23:25.97]: -----------------
WARN [2016-06-27 11:23:26.23]: xcrun xcodebuild -list -workspace ./Project.xcworkspace

No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
The build has been terminated

I'm using fastlane version 1.95.0 without 'FASTLANE_XCODE_LIST_TIMEOUT' setting and it looks like the default 10s timeout wasn't raised.
Btw every build on Travis successfully executes the same command in travis.yml before the fastlane build launches:

script:
- xcrun xcodebuild -list -workspace ./Project.xcworkspace
- bundle exec fastlane ios build

@dragvs
Copy link

dragvs commented Jun 30, 2016

Looks like it's the known issue, same as for scan #4059, as gym also uses xcodebuild -showBuildSettings to read some project settings.

@fastlane-bot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

@fastlane-bot
Copy link

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍

@fastlane fastlane locked and limited conversation to collaborators Jan 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants