Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-19886

NPE in Xcode plugin

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: xcode-plugin
    • Labels:
    • Environment:
      Jenkins 1.533 and Xcode 1.4 plugin
    • Similar Issues:

      Description

      After upgrading to 1.4, none of my build configurations functioned. Each of them failed with an NPE in the same location:

      [Package_CM_1_2] $ /usr/bin/xcodebuild -version
      Xcode 5.0
      Build version 5A1412
      Fetching marketing version number (CFBundleShortVersionString) from project.
      [Package_CM_1_2] $ /usr/bin/agvtool mvers -terse1
      No marketing version found (CFBundleShortVersionString).
      Marketing version (CFBundleShortVersionString) found in project configuration: .
      Fetching technical version number (CFBundleVersion) from project.
      [Package_CM_1_2] $ /usr/bin/agvtool vers -terse
      No marketing version found (CFBundleVersion)
      Technical version (CFBundleVersion) found in project configuration: .
      Marketing version (CFBundleShortVersionString) used by Jenkins to produce the IPA:
      Technical version (CFBundleVersion) used by Jenkins to produce the IPA:
      Cleaning build directory: /Development/Jenkins/workspace/Package_CM_1_2/build/Release-iphoneos
      [Package_CM_1_2] $ /usr/bin/security list-keychains -s /Users/buildbot/Library/Keychains/BuildBotCodeSigner.keychain
      [Package_CM_1_2] $ /usr/bin/security default-keychain -d user -s /Users/buildbot/Library/Keychains/BuildBotCodeSigner.keychain
      [Package_CM_1_2] $ /usr/bin/security unlock-keychain -p ******** /Users/buildbot/Library/Keychains/BuildBotCodeSigner.keychain
      [Package_CM_1_2] $ /usr/bin/security show-keychain-info /Users/buildbot/Library/Keychains/BuildBotCodeSigner.keychain
      Keychain "/Users/buildbot/Library/Keychains/BuildBotCodeSigner.keychain" lock-on-sleep timeout=300s
      ===========================================================
      == Available provisioning profiles
      [Package_CM_1_2] $ /usr/bin/security find-identity -p codesigning -v
      1) ***** "****"
      2) ***** "****"
      3) ***** "****"
      3 valid identities found
      == Available SDKs
      [Package_CM_1_2] $ /usr/bin/xcodebuild -showsdks
      OS X SDKs:
      OS X 10.8 -sdk macosx10.8

      iOS SDKs:
      iOS 7.0 -sdk iphoneos7.0

      iOS Simulator SDKs:
      Simulator - iOS 6.1 -sdk iphonesimulator6.1
      Simulator - iOS 7.0 -sdk iphonesimulator7.0

      == Available schemes
      [Package_CM_1_2] $ /usr/bin/xcodebuild -list
      Information about project "CartographicaMobile":
      Targets:
      CartographicaMobile
      CartoMobileTests

      Build Configurations:
      Debug
      Coverage
      Release
      Distribution

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

      Schemes:
      CartoMobile
      CartoMobile-Distribution
      CartoMobileUnitTests
      ===========================================================
      FATAL: null
      java.lang.NullPointerException
      at au.com.rayh.XCodeBuilder.perform(XCodeBuilder.java:489)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      at hudson.model.Build$BuildExecution.build(Build.java:199)
      at hudson.model.Build$BuildExecution.doRun(Build.java:160)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:567)
      at hudson.model.Run.execute(Run.java:1665)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:246)

        Attachments

          Activity

          Hide
          rkarbas Reinhard Karbas added a comment -

          After saving the jobs again the build worked
          Now I just have a problem how the ipa file is named
          Originally it was $TARGET-$Configuration.$VERSION.ipa, now it seems to be $TARGET.$VERSION.ipa, is this correct?
          We are building from a workspace, so I assume $TARGET is taken from the xCode Schema file name and $VERSION seems to come from the techical version
          Which parameter do I use to get my name back to the original name, is there a variable I can use to get the value for Configuration and use it in the pattern for the ipa file?

          Show
          rkarbas Reinhard Karbas added a comment - After saving the jobs again the build worked Now I just have a problem how the ipa file is named Originally it was $TARGET-$Configuration.$VERSION.ipa, now it seems to be $TARGET.$VERSION.ipa, is this correct? We are building from a workspace, so I assume $TARGET is taken from the xCode Schema file name and $VERSION seems to come from the techical version Which parameter do I use to get my name back to the original name, is there a variable I can use to get the value for Configuration and use it in the pattern for the ipa file?
          Hide
          buzztaiki Taiki Sugawara added a comment -

          pull request of this issue is here: https://github.com/jenkinsci/xcode-plugin/pull/37

          why this pull request is not merged?

          Show
          buzztaiki Taiki Sugawara added a comment - pull request of this issue is here: https://github.com/jenkinsci/xcode-plugin/pull/37 why this pull request is not merged?
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: vzsg
          Path:
          src/main/java/au/com/rayh/XCodeBuilder.java
          http://jenkins-ci.org/commit/xcode-plugin/4724a1c79040b9b1f91ce8381adc4a24013a8268
          Log:
          Avoid NPE on plugin version update

          When upgrading from 1.3 to 1.4.x, this configuration key does not yet
          exist, causing every XCode build to break. Added a null check to avoid
          this situation. JENKINS-19886

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: vzsg Path: src/main/java/au/com/rayh/XCodeBuilder.java http://jenkins-ci.org/commit/xcode-plugin/4724a1c79040b9b1f91ce8381adc4a24013a8268 Log: Avoid NPE on plugin version update When upgrading from 1.3 to 1.4.x, this configuration key does not yet exist, causing every XCode build to break. Added a null check to avoid this situation. JENKINS-19886
          Hide
          medington Mark Edington added a comment -

          I'm suddenly running into the same issue with 1.4.1. Is there a workaround? Should I downgrade to 1.3.1?

          Show
          medington Mark Edington added a comment - I'm suddenly running into the same issue with 1.4.1. Is there a workaround? Should I downgrade to 1.3.1?
          Hide
          lacostej lacostej added a comment -

          This was released in 1.4.2.

          Show
          lacostej lacostej added a comment - This was released in 1.4.2.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            gaige Gaige Paulsen
            Votes:
            2 Vote for this issue
            Watchers:
            13 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: