fastlane: Gym hangs with Xcode 8

New Issue Checklist

Issue Description

The project https://github.com/IngmarStein/Kraftstoff/tree/swift3 (Travis output here) hangs with fastlane 1.95.0 and Xcode 8 at the xcrun xcodebuild -list stage.

The command succeeds when run directly from the command line:

$ xcrun xcodebuild -list -project ./Kraftstoff.xcodeproj
Information about project "Kraftstoff":
    Targets:
        Kraftstoff
        Kraftstoff Tests
        Kraftstoff UI Tests

    Build Configurations:
        Debug
        Release

    If no build configuration is specified and -scheme is not passed then "Release" is used.

    Schemes:
        Kraftstoff
        Kraftstoff UI Tests

When I xcode-select Xcode 7.3.1, gym proceeds as normal.

Complete output when running fastlane, including the stack trace and command used
$ bundle exec gym --scheme Kraftstoff
[13:05:22]: xcrun xcodebuild -list -project ./Kraftstoff.xcodeproj
2016-06-19 13:05:24.945 xcodebuild[6388:217906] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-11130.20/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/ProjectModel/Capabilities/Xcode3TargetCapabilitiesContext.m:286
Details:  Failed to expand identifiers "{(
    "iCloud.$(CFBundleIdentifier)"
)}": Error Domain=IDECapabilitiesErrorDomain Code=1 "The operation requires a selected developer portal team." UserInfo={NSLocalizedDescription=The operation requires a selected developer portal team., NSLocalizedRecoverySuggestion=}
Object:   <Xcode3TargetCapabilitiesContext: 0x7f9006bc90c0>
Method:   -_appIDFeatureStateIncludingEntitlements:
Thread:   <NSThread: 0x7f9001514750>{number = 1, name = main}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
2016-06-19 13:05:24.968 xcodebuild[6388:217906] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-11130.20/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/ProjectModel/Capabilities/Xcode3TargetCapabilitiesContext.m:286
Details:  Failed to expand identifiers "{(
    "iCloud.$(CFBundleIdentifier)"
)}": Error Domain=IDECapabilitiesErrorDomain Code=1 "The operation requires a selected developer portal team." UserInfo={NSLocalizedDescription=The operation requires a selected developer portal team., NSLocalizedRecoverySuggestion=}
Object:   <Xcode3TargetCapabilitiesContext: 0x7f9006bc90c0>
Method:   -_appIDFeatureStateIncludingEntitlements:
Thread:   <NSThread: 0x7f9001514750>{number = 1, name = main}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.

Environment

fastlane version (run fastlane -v): 1.95.0 gym version: 1.6.3

Do you use bundler to execute fastlane (i.e. bundle exec fastlane)? yes

Do you use a Ruby environment manager (e.g. chruby, rbenv, rvm)? no

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 41 (21 by maintainers)

Commits related to this issue

Most upvoted comments

@zqxiaojin Thanks for letting us know. We are working on Xcode 8 support. Thanks!

I get this issue as well and was about to ask the same question. It runs fine after I xcode-select the Xcode-beta.app and run the xcrun xcodebuild -list command from the Terminal. When gym runs it, it hangs indefinitely. Running with verbose = true does not list extra info. I am also using gym 1.6.3.

I tried adding my Apple ID to the Xcode Beta too.

Unfortunately, the bug is still present in Xcode 8 Beta 6 😦

Hi all, we’ve shipped a workaround (#5626) and timeout/retry solution (#5188) as part of fastlane_core 0.51.0 šŸš€

Thanks very much for your help! Please let us know how it looks šŸ‘

Here’s the command that actually produces the error:

xcodebuild -showBuildSettings -scheme … -project …

It seems to be related to Core Data: https://forums.developer.apple.com/thread/50372

@IngmarStein Thanks for following up. I’m looping in the core team so we can investigate. šŸ‘

Hi! I get this issue after command: xcodebuild -workspace LingvoLive.xcworkspace -scheme LingvoLive -configuration AdHoc -sdk iphoneos10.0 I use Xcode-beta.app Help to fix it. Thank you!

2016-07-12 06:31:35.676 xcodebuild[19450:7323578] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-11130.20/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/ProjectModel/Capabilities/Xcode3TargetCapabilitiesContext.m:292 [06:31:35][Step 13/22] Details: Failed to expand identifiers ā€œ{( [06:31:35][Step 13/22] ā€œgroup.com.abbyy.lingvoliveā€ [06:31:35][Step 13/22] )}ā€: Error Domain=IDECapabilitiesErrorDomain Code=1 ā€œThe operation requires a selected developer portal team.ā€ UserInfo={NSLocalizedDescription=The operation requires a selected developer portal team., NSLocalizedRecoverySuggestion=} [06:31:35][Step 13/22] Object: <Xcode3TargetCapabilitiesContext: 0x7fd0c3ec0180> [06:31:35][Step 13/22] Method: -_appIDFeatureStateIncludingEntitlements: [06:31:35][Step 13/22] Thread: <NSThread: 0x7fd0c0404f80>{number = 1, name = main} [06:31:35][Step 13/22] Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide. [06:31:35][Step 13/22] 2016-07-12 06:31:35.682 xcodebuild[19450:7323578] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-11130.20/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/ProjectModel/Capabilities/Xcode3TargetCapabilitiesContext.m:292 [06:31:35][Step 13/22] Details: Failed to expand identifiers ā€œ{( [06:31:35][Step 13/22] ā€œgroup.com.abbyy.lingvoliveā€ [06:31:35][Step 13/22] )}ā€: Error Domain=IDECapabilitiesErrorDomain Code=1 ā€œThe operation requires a selected developer portal team.ā€ UserInfo={NSLocalizedDescription=The operation requires a selected developer portal team., NSLocalizedRecoverySuggestion=} [06:31:35][Step 13/22] Object: <Xcode3TargetCapabilitiesContext: 0x7fd0c3ec0180>

I was able to re-enable ā€œAutomatic Signingā€ in Xcode 8 once I removed the codesigning_identity option from my Gymfile/Fastfile. The actual error message was hidden away in ~/Library/Logs/gym and not present in the fastlane output, which is why it was so hard to debug the issue.

Once I found the log with all the xcodebuild output, the error was clearly spelled out:

    TARGET has conflicting provisioning settings. TARGET is automatically signed, but code signing identity iPhone Distribution: COMPANY has been manually specified. Set the code signing identity value to "iPhone Developer" in the build settings editor, or switch to manual signing in the project editor.
    Code signing is required for product type 'Application' in SDK 'tvOS 10.0'

You’re right, the messages were unrelated. I had some codesigning issues that were being masked because of gym(silent: true) that I was able to fix by disabling the new ā€œAutomatic Signingā€ feature in Xcode 8.

@whootang12 Thanks for following up. Expect a fix for this this week. Thanks!

I’m curious if you can find a solution to this. I guess it’s just a bug in xcodebuild which hopefully will be fixed in the final Xcode 8 release.

Hi @IngmarStein There is a PR in place that fixes this issue. It will be merged into master shortly šŸ‘

In case anyone else wants to have a temporary workaround (probably until Xcode 8 Beta 3 is released tomorrow), here’s what I did:

  • removed the Core Data model from my project
  • ran xcodebuild -showBuildSettings to get working settings
  • created a shell script named xcrun with the following content:
if [ "$1 $2" == "xcodebuild -showBuildSettings" ]; then
    echo <<EOF
    <Working build settings>
EOF
else
    /usr/bin/xcrun "$@"
fi
  • set PATH environment variable so that this script precedes /usr/bin/xcrun (e.g. in .travis.yml)