• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • xcode-plugin
    • SLES 11 SP2 for jenkins Server
      Mac OS X Mavericks with xcode 6 on build machine

      We have several components to build in one Jenkins job calling the xCode plugin several times
      The first two builds work, however the 3rd instance of the build gets stuck after the clean and never gets to the build step
      First build:
      [openssl-ios] $ /usr/bin/xcodebuild -version
      Xcode 6.0.1
      Build version 6A317
      Cleaning build directory: /Users/Jenkins/Ansible/Mobile3rdParty/openssl-ios/build/Release-iphoneos
      ===========================================================
      == Available provisioning profiles
      [openssl-ios] $ /usr/bin/security find-identity -p codesigning -v
      1) A0C22EDB47D2DFC413DCD56967B86D28B1374342 "Developer ID Application: Siemens Enterprise Communications GmbH & Co. KG"
      2) C19DB47077CAC502936224069C5218D77D163404 "iPhone Developer: Simon Hall (BDNNEYZ3AQ)"
      3) F25A1E6F9A4774208A8C590C1953493BDEE6F005 "iPhone Distribution: Siemens Enterprise Communications, Inc."
      3 valid identities found
      == Available SDKs
      [openssl-ios] $ /usr/bin/xcodebuild -showsdks
      OS X SDKs:
      OS X 10.9 -sdk macosx10.9

      iOS SDKs:
      iOS 8.0 -sdk iphoneos8.0

      iOS Simulator SDKs:
      Simulator - iOS 8.0 -sdk iphonesimulator8.0

      == Available schemes
      [openssl-ios] $ /usr/bin/xcodebuild -list -project openssl.xcodeproj
      Information about project "openssl":
      Targets:
      crypto
      ssl

      Build Configurations:
      Debug
      Release
      Distribution

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

      Schemes:
      crypto
      ssl
      ===========================================================
      Going to invoke xcodebuild:target: ALL, sdk: DEFAULT, project: openssl.xcodeproj, configuration: Release, clean: YES, archive:NO, symRoot: DEFAULT, configurationBuildDir: DEFAULT, codeSignIdentity: DEFAULT
      [openssl-ios] $ /usr/bin/xcodebuild -alltargets -project openssl.xcodeproj -configuration Release clean build
      === CLEAN TARGET crypto OF PROJECT openssl WITH CONFIGURATION Release ===

      Second build:
      Cleaning build directory: /Users/Jenkins/Ansible/Mobile3rdParty/ZipArchive/build/Release-iphoneos
      ===========================================================
      == Available provisioning profiles
      [ZipArchive] $ /usr/bin/security find-identity -p codesigning -v
      1) A0C22EDB47D2DFC413DCD56967B86D28B1374342 "Developer ID Application: Siemens Enterprise Communications GmbH & Co. KG"
      2) C19DB47077CAC502936224069C5218D77D163404 "iPhone Developer: Simon Hall (BDNNEYZ3AQ)"
      3) F25A1E6F9A4774208A8C590C1953493BDEE6F005 "iPhone Distribution: Siemens Enterprise Communications, Inc."
      3 valid identities found
      == Available SDKs
      [ZipArchive] $ /usr/bin/xcodebuild -showsdks
      OS X SDKs:
      OS X 10.9 -sdk macosx10.9

      iOS SDKs:
      iOS 8.0 -sdk iphoneos8.0

      iOS Simulator SDKs:
      Simulator - iOS 8.0 -sdk iphonesimulator8.0

      == Available schemes
      [ZipArchive] $ /usr/bin/xcodebuild -list -project ZipArchive.xcodeproj
      Information about project "ZipArchive":
      Targets:
      ZipArchive

      Build Configurations:
      Debug
      Distribution
      Release

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

      Schemes:
      ZipArchive
      ===========================================================
      Going to invoke xcodebuild:target: ZipArchive, sdk: DEFAULT, project: ZipArchive.xcodeproj, configuration: Release, clean: YES, archive:NO, symRoot: DEFAULT, configurationBuildDir: DEFAULT, codeSignIdentity: DEFAULT
      [ZipArchive] $ /usr/bin/xcodebuild -target ZipArchive -project ZipArchive.xcodeproj -configuration Release clean build
      === CLEAN TARGET ZipArchive OF PROJECT ZipArchive WITH CONFIGURATION Release ===

      Third build:
      Cleaning build directory: /Users/Jenkins/Ansible/Mobile3rdParty/WebRTC/trunk/build/Release-iphoneos
      ===========================================================
      == Available provisioning profiles
      [trunk] $ /usr/bin/security find-identity -p codesigning -v
      1) A0C22EDB47D2DFC413DCD56967B86D28B1374342 "Developer ID Application: Siemens Enterprise Communications GmbH & Co. KG"
      2) C19DB47077CAC502936224069C5218D77D163404 "iPhone Developer: Simon Hall (BDNNEYZ3AQ)"
      3) F25A1E6F9A4774208A8C590C1953493BDEE6F005 "iPhone Distribution: Siemens Enterprise Communications, Inc."
      3 valid identities found
      == Available SDKs
      [trunk] $ /usr/bin/xcodebuild -showsdks
      OS X SDKs:
      OS X 10.9 -sdk macosx10.9

      iOS SDKs:
      iOS 8.0 -sdk iphoneos8.0

      iOS Simulator SDKs:
      Simulator - iOS 8.0 -sdk iphonesimulator8.0

      == Available schemes
      [trunk] $ /usr/bin/xcodebuild -list -project all.xcodeproj
      Information about project "all":
      Targets:
      All

      Build Configurations:
      Debug
      Profile
      Release

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

      Build is stuck
      It is called with configuration Release and target All but never kicks off the real build

      Let me know if I need to provide more information

          [JENKINS-24874] Xcode plugin hangs when using xcode6

          Reinhard Karbas created issue -
          Reinhard Karbas made changes -
          Labels New: plugin

          Johanna Wolf added a comment -

          I've been beating my head over this for a while, but finally figured it out (at least on our build system):

          TL;DR: Mark your scheme file as shared (via edit scheme on your build target), and ensure <projname>.xcodeproj/xcshareddata/xcschemes/<schemename>.xcscheme is not being ignored on source control (you'll want this file to upload).

          What is causing the timeout is that xcodebuild is attempting to produce a scheme listing and the parser isn't finding any and thus not timing out (it used to do a 10 second timeout prior to Xcode 6 - it doesn't anymore, #thanksobama).

          In prior builds (before Xcode 6), I noted warning messages (when "xcodebuild -list" fired off) akin to:

          "Building with xcodebuild Timed out waiting for <IDEWorkspace, 0x2004cebc0>/“runContextManager.runContexts”"

          Which lead me to http://stackoverflow.com/questions/5959382/building-with-xcodebuild-timed-out-waiting-for-ideworkspace-0x2004cebc0-runc - which solved the problem above for me.

          Hope this helps.

          Johanna Wolf added a comment - I've been beating my head over this for a while, but finally figured it out (at least on our build system): TL;DR: Mark your scheme file as shared (via edit scheme on your build target), and ensure <projname>.xcodeproj/xcshareddata/xcschemes/<schemename>.xcscheme is not being ignored on source control (you'll want this file to upload). What is causing the timeout is that xcodebuild is attempting to produce a scheme listing and the parser isn't finding any and thus not timing out (it used to do a 10 second timeout prior to Xcode 6 - it doesn't anymore, #thanksobama). In prior builds (before Xcode 6), I noted warning messages (when "xcodebuild -list" fired off) akin to: "Building with xcodebuild Timed out waiting for <IDEWorkspace, 0x2004cebc0>/“runContextManager.runContexts”" Which lead me to http://stackoverflow.com/questions/5959382/building-with-xcodebuild-timed-out-waiting-for-ideworkspace-0x2004cebc0-runc - which solved the problem above for me. Hope this helps.

          After creating the missing shared schemas for 2 of the xCode projects the build now works properly

          Reinhard Karbas added a comment - After creating the missing shared schemas for 2 of the xCode projects the build now works properly
          Reinhard Karbas made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Reinhard Karbas made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

          Johanna Wolf added a comment -

          Well, I wouldn't mark it as Not A Defect so quickly - that xcodebuild -list command should be suffixed with a mandatory timeout to prevent this issue from being an issue, e.g.:

          xcodebuild -list blahblah & sleep 10 ; kill $!

          (as well as discard the return state as acceptable in such case)

          Johanna Wolf added a comment - Well, I wouldn't mark it as Not A Defect so quickly - that xcodebuild -list command should be suffixed with a mandatory timeout to prevent this issue from being an issue, e.g.: xcodebuild -list blahblah & sleep 10 ; kill $! (as well as discard the return state as acceptable in such case)

          After protests from the community I am re-opening the issue to get some sort of timeout implemented for xcodebuild to find schemas and fail the build if it times out.

          Reinhard Karbas added a comment - After protests from the community I am re-opening the issue to get some sort of timeout implemented for xcodebuild to find schemas and fail the build if it times out.
          Reinhard Karbas made changes -
          Resolution Original: Not A Defect [ 7 ]
          Status Original: Closed [ 6 ] New: Reopened [ 4 ]
          jminne made changes -
          Link New: This issue is duplicated by JENKINS-24897 [ JENKINS-24897 ]

            Unassigned Unassigned
            rkarbas Reinhard Karbas
            Votes:
            3 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: