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

Xcode Plugin fails to generate unit test report on macOS Catalina: JAXB-API issue

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • xcode-plugin
    • None
    • Jenkins 2.280
      Xcode-Plugin 2.0.14
      Xcode 12.4, Build version 12D4e
      macOS 10.15.7 Catalina
      java openjdk version "11.0.9" 2020-10-20
    • 2.0.17-565.v1c48051d46ef

    Description

      When I execute unit test in Xcode job, the test runs correctly, but the report generator fails to create the xml:

      Test Case '-[FooTests testBundle]' passed (0.001 seconds). Test Suite 'FooTests' passed at 2021-02-22 11:07:56.161.FATAL: Implementation of JAXB-API has not been found on module path or classpath.
      

      Attachments

        Issue Links

          Activity

            flabrie Francis Labrie added a comment - - edited

            Maybe the Xcode PlugIn just need to add the JAXB PlugIn dependancy, like described here: https://plugins.jenkins.io/jaxb/

            flabrie Francis Labrie added a comment - - edited Maybe the Xcode PlugIn just need to add the JAXB PlugIn dependancy, like described here:  https://plugins.jenkins.io/jaxb/
            vogtmh Maximilian added a comment - - edited

            It's still not updated and blocking us from using Jenkins with the recommended version of Java 11.

            Simply adding the dependency for jaxb 2.3.0.1 leads to an error while compiling:
            "[WARNING] Rule 2: org.apache.maven.plugins.enforcer.EnforceBytecodeVersion failed with message:
            Found Banned Dependency: javax.xml.bind:jaxb-api:jar:2.3.0"

            vogtmh Maximilian added a comment - - edited It's still not updated and blocking us from using Jenkins with the recommended version of Java 11. Simply adding the dependency for jaxb 2.3.0.1 leads to an error while compiling: " [WARNING] Rule 2: org.apache.maven.plugins.enforcer.EnforceBytecodeVersion failed with message: Found Banned Dependency: javax.xml.bind:jaxb-api:jar:2.3.0"
            flabrie Francis Labrie added a comment - - edited

            We still have this issue using Jenkins 2.321, Xcode 13.1 and Xcode plugin 2.0.15 on macOS 11.6.1.

            This is a blocker, can it be fixed quickly, please? Thanks!

            flabrie Francis Labrie added a comment - - edited We still have this issue using Jenkins 2.321, Xcode 13.1 and Xcode plugin 2.0.15 on macOS 11.6.1. This is a blocker, can it be fixed quickly, please? Thanks!
            markewaite Mark Waite added a comment -

            flabrie as far as I can tell, there is no active development being done on the xcode plugin. I used the instructions from the DevOps World 2021 "Contributing to Open Source" workshop and made a few modernization improvements to the plugin in PR-112. I confirmed that the automated tests in the plugin repository all pass after my changes. I confirmed that I can build and test with Java 11.

            I do not have access to a macOS machine or an XCode development environment, so I have no way of knowing if the updates work when installed by a user.

            If you would like to try my changes, you could download the build from https://ci.jenkins.io/job/Plugins/job/xcode-plugin/job/PR-112/ and install it on your system. If it works, please provide feedback on PR-112.

            If the plugin is crucial to your work, you may want to ask your employer to support your work efforts by allowing you to adopt the plugin.

            markewaite Mark Waite added a comment - flabrie as far as I can tell, there is no active development being done on the xcode plugin. I used the instructions from the DevOps World 2021 "Contributing to Open Source" workshop and made a few modernization improvements to the plugin in PR-112 . I confirmed that the automated tests in the plugin repository all pass after my changes. I confirmed that I can build and test with Java 11. I do not have access to a macOS machine or an XCode development environment, so I have no way of knowing if the updates work when installed by a user. If you would like to try my changes, you could download the build from https://ci.jenkins.io/job/Plugins/job/xcode-plugin/job/PR-112/ and install it on your system. If it works, please provide feedback on PR-112 . If the plugin is crucial to your work, you may want to ask your employer to support your work efforts by allowing you to adopt the plugin.

            Thank you very much, markewaite, to work on this issue. It's very appreciated.

            Unfortunately, unit testing still fails with this PR-112: it seems the JAXB-API is not found.

            Test Case '-[CGIAccessManagerTests testServiceWithValidCredential]' passed (1.003 seconds).
            Test Case '-[CGIAccessManagerTests testURL]' started.
            Test Case '-[CGIAccessManagerTests testURL]' passed (0.001 seconds).
            Test Suite 'CGIAccessManagerTests' passed at 2021-11-23 08:42:02.415.FATAL: Implementation of JAXB-API has not been found on module path or classpath.
            
            flabrie Francis Labrie added a comment - Thank you very much, markewaite , to work on this issue. It's very appreciated. Unfortunately, unit testing still fails with this PR-112: it seems the JAXB-API is not found. Test Case '-[CGIAccessManagerTests testServiceWithValidCredential]' passed (1.003 seconds). Test Case '-[CGIAccessManagerTests testURL]' started. Test Case '-[CGIAccessManagerTests testURL]' passed (0.001 seconds). Test Suite 'CGIAccessManagerTests' passed at 2021-11-23 08:42:02.415.FATAL: Implementation of JAXB-API has not been found on module path or classpath.
            pjacobsfdx Paul Jacobs added a comment -

            I also tried PR-112 and the JAXB-API issue is still there:
            Test Suite 'ADeviceSettingsTest' passed at 2022-04-25 13:31:35.892.FATAL: Implementation of JAXB-API has not been found on module path or classpath.

            pjacobsfdx Paul Jacobs added a comment - I also tried PR-112 and the JAXB-API issue is still there: Test Suite 'ADeviceSettingsTest' passed at 2022-04-25 13:31:35.892.FATAL: Implementation of JAXB-API has not been found on module path or classpath.

            For info, we still have this issue with:

            • Jenkins 2.346
            • Xcode 13.3.1
            • Java Runtime 11.0.15+0
            • Xcode plugin 2.0.16-SNAPSHOT
            • macOS Monterey 12.3.1
            flabrie Francis Labrie added a comment - For info, we still have this issue with: Jenkins 2.346 Xcode 13.3.1 Java Runtime 11.0.15+0 Xcode plugin 2.0.16-SNAPSHOT macOS Monterey 12.3.1
            markewaite Mark Waite added a comment -

            I made further modernization attempts on the plugin and those changes have been merged in https://github.com/jenkinsci/xcode-plugin/pull/112 . The CI job on the master branch provides a plugin build that could be downloaded and tested again. https://ci.jenkins.io/job/Plugins/job/xcode-plugin/job/master/lastSuccessfulBuild/artifact/org/jenkins-ci/plugins/xcode-plugin/2.0.16-rc560.83ccd19f8f49/xcode-plugin-2.0.16-rc560.83ccd19f8f49.hpi

            markewaite Mark Waite added a comment - I made further modernization attempts on the plugin and those changes have been merged in https://github.com/jenkinsci/xcode-plugin/pull/112 . The CI job on the master branch provides a plugin build that could be downloaded and tested again. https://ci.jenkins.io/job/Plugins/job/xcode-plugin/job/master/lastSuccessfulBuild/artifact/org/jenkins-ci/plugins/xcode-plugin/2.0.16-rc560.83ccd19f8f49/xcode-plugin-2.0.16-rc560.83ccd19f8f49.hpi
            basil Basil Crow added a comment -

            If that latest build still isn't working, please provide steps to reproduce the issue from scratch on a clean installation.

            basil Basil Crow added a comment - If that latest build still isn't working, please provide steps to reproduce the issue from scratch on a clean installation.
            pjacobsfdx Paul Jacobs added a comment -

            Thank you for the latest attempt.  I tried the updated plugin build from yesterday, but we are still seeing the same JAX-B fatal error after all the test cases of the first Test Suite in a XCTest target are run:
            Test Suite 'All tests' started at 2022-05-10 10:40:42.280
            Test Suite 'SNAPTests.xctest' started at 2022-05-10 10:40:42.282
            Test Suite 'ADeviceSettingsTest' started at 2022-05-10 10:40:42.282
            Test Case '-[SNAPTests.ADeviceSettingsTest test1SetDeviceSettings]' started.
            2022-05-10 10:40:42.288688-0500 SNAP[56311:5905556] deviceID: R4BC351FAD0E
            Test Case '-[SNAPTests.ADeviceSettingsTest test1SetDeviceSettings]' passed (0.010 seconds).
            Test Case '-[SNAPTests.ADeviceSettingsTest test2GetDeviceSettings]' started.
            2022-05-10 10:40:42.294595-0500 SNAP[56311:5905556] deviceID: R4BC351FAD0E
            2022-05-10 10:40:42.295051-0500 SNAP[56311:5905556] deviceID: R4BC351FAD0E
            Test Case '-[SNAPTests.ADeviceSettingsTest test2GetDeviceSettings]' passed (0.002 seconds).
            Test Suite 'ADeviceSettingsTest' passed at 2022-05-10 10:40:42.296.FATAL: Implementation of JAXB-API has not been found on module path or classpath.
            This is a new installation of Jenkins on a new M1 Mac Mini

            • macOs Monterrey 12.2.1
            • java.runtime.version 11.0.12+0
            • Jenkins 2.332.2 
            • Xcode 13.31

            This is a Jenkins project building a Xcode UITest Target that has multiple XCTestCases defined

             

            pjacobsfdx Paul Jacobs added a comment - Thank you for the latest attempt.  I tried the updated plugin build from yesterday, but we are still seeing the same JAX-B fatal error after all the test cases of the first Test Suite in a XCTest target are run: Test Suite 'All tests' started at 2022-05-10 10:40:42.280 Test Suite 'SNAPTests.xctest' started at 2022-05-10 10:40:42.282 Test Suite 'ADeviceSettingsTest' started at 2022-05-10 10:40:42.282 Test Case '- [SNAPTests.ADeviceSettingsTest test1SetDeviceSettings] ' started. 2022-05-10 10:40:42.288688-0500 SNAP [56311:5905556] deviceID: R4BC351FAD0E Test Case '- [SNAPTests.ADeviceSettingsTest test1SetDeviceSettings] ' passed (0.010 seconds). Test Case '- [SNAPTests.ADeviceSettingsTest test2GetDeviceSettings] ' started. 2022-05-10 10:40:42.294595-0500 SNAP [56311:5905556] deviceID: R4BC351FAD0E 2022-05-10 10:40:42.295051-0500 SNAP [56311:5905556] deviceID: R4BC351FAD0E Test Case '- [SNAPTests.ADeviceSettingsTest test2GetDeviceSettings] ' passed (0.002 seconds). Test Suite 'ADeviceSettingsTest' passed at 2022-05-10 10:40:42.296.FATAL: Implementation of JAXB-API has not been found on module path or classpath. This is a new installation of Jenkins on a new M1 Mac Mini macOs Monterrey 12.2.1 java.runtime.version 11.0.12+0 Jenkins 2.332.2  Xcode 13.31 This is a Jenkins project building a Xcode UITest Target that has multiple XCTestCases defined  
            basil Basil Crow added a comment -

            pjacobsfdx You might consider encouraging others to help you by providing steps to reproduce the issue from scratch on a clean installation.

            basil Basil Crow added a comment - pjacobsfdx You might consider encouraging others to help you by providing steps to reproduce the issue from scratch on a clean installation.
            pjacobsfdx Paul Jacobs added a comment -

            As inferred above, a Jenkins project needs to be configured to build an Xcode project. The Xcode General build settings for the Jenkins project, the Target (to build) must be a Xcode UITest Target with XCTestCases defined.  My Xcode test target has multiple XCTestCase classes defined.

            The JAXB-API fatal error occurs after the first set of test cases have finished running.

             

            This issue is only occurring for me when the Jenkins project is configured to run a Test target.  I have not run into this issue configuring a Jenkins project with a Xcode app target (i.e. no issue building a project and creating an IPA file).  

            pjacobsfdx Paul Jacobs added a comment - As inferred above, a Jenkins project needs to be configured to build an Xcode project. The Xcode General build settings for the Jenkins project, the Target (to build) must be a Xcode UITest Target with XCTestCases defined.  My Xcode test target has multiple XCTestCase classes defined. The JAXB-API fatal error occurs after the first set of test cases have finished running.   This issue is only occurring for me when the Jenkins project is configured to run a Test target.  I have not run into this issue configuring a Jenkins project with a Xcode app target (i.e. no issue building a project and creating an IPA file).  
            basil Basil Crow added a comment -

            pjacobsfdx I don't know anything about this plugin or XCode, but I am a Jenkins core maintainer working on JAXB related issues and I could probably fix this. Unfortunately, what you have described above is largely gibberish to me. Please provide a step-by-step list of instructions for how to reproduce the problem for someone who has never used this plugin or XCode before. I have a macOS system that I can use for testing.

            basil Basil Crow added a comment - pjacobsfdx I don't know anything about this plugin or XCode, but I am a Jenkins core maintainer working on JAXB related issues and I could probably fix this. Unfortunately, what you have described above is largely gibberish to me. Please provide a step-by-step list of instructions for how to reproduce the problem for someone who has never used this plugin or XCode before. I have a macOS system that I can use for testing.
            flabrie Francis Labrie added a comment - - edited

            You need to install Xcode from Apple App Store, and the Xcode Command Line Tools (normally, Xcode will ask for them when starting: you just need to confirm). Below is a Jenkins job example using this zipped plain iOS app project including unit tests: Xcode-PlugIn-Test-App.zip

            1. New Item: Freestyle project
            2. ✓ This project is parameterized
              • File Parameter
                • File Location: Xcode-PlugIn-Test-App.zip
                • Description: Xcode Project Zip file.
            3. Add build step: Execute shell
              • BASE_NAME="Xcode-PlugIn-Test-App"
                
                if [ -e "${BASE_NAME}" -a -e "${BASE_NAME}.zip"]
                then
                	rm -rf "${BASE_NAME}"
                fi
                
                if [ -e "${BASE_NAME}.zip" ]
                   then
                	unzip "${BASE_NAME}.zip"
                	rm -f "${BASE_NAME}.zip"
                fi
                
                if [ ! -e "${BASE_NAME}" ]
                then
                	echo "Error: Xcode project folder missing."
                	exit 1
                fiBASE_NAME="Xcode-PlugIn-Test-App"if [ -e "${BASE_NAME}" -a -e "${BASE_NAME}.zip"]
                then
                    rm -rf "${BASE_NAME}"
                fiif [ -e "${BASE_NAME}.zip" ]
                   then
                    unzip "${BASE_NAME}.zip"
                    rm -f "${BASE_NAME}.zip"
                fiif [ ! -e "${BASE_NAME}" ]
                then
                    echo "Error: Xcode project folder missing."
                    exit 1
                fi
            1. Add build step: Xcode
              • Settings
                1. Clean ResultBundlePath? Yes
                2. Configuration: Debug
                3. Xcode Schema File: Xcode-PlugIn-Test-App
              • Advanced build settings
                1. SDK: iphonesimulator
                2. Custom xcodebuild arguments: test -destination "platform=iOS Simulator,name=iPhone 13,OS=latest"
                3. Xcode Project Directory: Xcode-PlugIn-Test-App
                4. Build output directory: ${WORKSPACE}/build
            2. Add post-build action: Publish JUnit test result report

              • Test report XMLs: **/test-reports/*.xml
            flabrie Francis Labrie added a comment - - edited You need to install Xcode  from Apple App Store , and the Xcode Command Line Tools ( normally, Xcode will ask for them when starting: you just need to confirm ). Below is a Jenkins job example using this zipped plain iOS app project including unit tests: Xcode-PlugIn-Test-App.zip New Item: Freestyle project ✓ This project is parameterized File Parameter File Location: Xcode-PlugIn-Test-App.zip Description: Xcode Project Zip file. Add build step: Execute shell BASE_NAME= "Xcode-PlugIn-Test-App" if [ -e "${BASE_NAME}" -a -e "${BASE_NAME}.zip" ] then rm -rf "${BASE_NAME}" fi if [ -e "${BASE_NAME}.zip" ] then unzip "${BASE_NAME}.zip" rm -f "${BASE_NAME}.zip" fi if [ ! -e "${BASE_NAME}" ] then echo "Error: Xcode project folder missing." exit 1 fiBASE_NAME= "Xcode-PlugIn-Test-App" if [ -e "${BASE_NAME}" -a -e "${BASE_NAME}.zip" ] then     rm -rf "${BASE_NAME}" fiif [ -e "${BASE_NAME}.zip" ]    then     unzip "${BASE_NAME}.zip"     rm -f "${BASE_NAME}.zip" fiif [ ! -e "${BASE_NAME}" ] then     echo "Error: Xcode project folder missing."     exit 1 fi Add build step: Xcode Settings Clean ResultBundlePath? Yes Configuration: Debug Xcode Schema File: Xcode-PlugIn-Test-App Advanced build settings SDK: iphonesimulator Custom xcodebuild arguments: test -destination "platform=iOS Simulator,name=iPhone 13,OS=latest" Xcode Project Directory: Xcode-PlugIn-Test-App Build output directory: ${WORKSPACE}/build Add post-build action: Publish JUnit test result report Test report XMLs: **/test-reports/*.xml
            basil Basil Crow added a comment -

            After several hours in which I was effectively unable to use my Internet connection while downloading a 12.7 GiB Xcode installer, I fixed the bug in 15 minutes.

            https://github.com/jenkinsci/xcode-plugin/pull/113

            basil Basil Crow added a comment - After several hours in which I was effectively unable to use my Internet connection while downloading a 12.7 GiB Xcode installer, I fixed the bug in 15 minutes. https://github.com/jenkinsci/xcode-plugin/pull/113
            markewaite Mark Waite added a comment - Build of the plugin with the proposed fix can be downloaded from https://repo.jenkins-ci.org/incrementals/org/jenkins-ci/plugins/xcode-plugin/2.0.16-rc561.606f7470d78f/xcode-plugin-2.0.16-rc561.606f7470d78f.hpi

            Wow! It works, thank you so much!

            flabrie Francis Labrie added a comment - Wow! It works, thank you so much!
            pjacobsfdx Paul Jacobs added a comment -

            It worked for me also.  I can't think you enough for fixing the issue!!!

            pjacobsfdx Paul Jacobs added a comment - It worked for me also.  I can't think you enough for fixing the issue!!!
            markewaite Mark Waite added a comment -

            kazuhidet are you able to review the proposed change, merge it, and release it, or would you rather that someone else adopts the plugin, merges it, and releases it?

            markewaite Mark Waite added a comment - kazuhidet are you able to review the proposed change, merge it, and release it, or would you rather that someone else adopts the plugin, merges it, and releases it?

            markewaite I'm sorry, I'm busy with work now and I couldn't maintain it in time.
            We will work to release this fix as soon as possible.
            Maybe we can release it on the weekends.

            kazuhidet Kazuhide Takahashi added a comment - markewaite I'm sorry, I'm busy with work now and I couldn't maintain it in time. We will work to release this fix as soon as possible. Maybe we can release it on the weekends.
            basil Basil Crow added a comment -

            kazuhidet Thank you for your reply. I highly appreciate your diligence in maintaining this plugin. As a gentle reminder, we are planning on requiring Java 11 in the Jenkins weekly release line as of June 21, 2022. Ideally, we would be able to release this plugin prior to that date to ensure a smooth experience for users of the weekly release line.

            basil Basil Crow added a comment - kazuhidet  Thank you for your reply. I highly appreciate your diligence in maintaining this plugin. As a gentle reminder, we are planning on requiring Java 11 in the Jenkins weekly release line as of June 21, 2022. Ideally, we would be able to release this plugin prior to that date to ensure a smooth experience for users of the weekly release line.
            basil Basil Crow added a comment -

            To be clear, it looks like an attempt to perform a release was made in https://github.com/jenkinsci/xcode-plugin/releases/tag/xcode-plugin-2.0.16 but there is no 2.0.16 release visible on the Plugin Site or on Artifactory:

            Kazuhide, let us know if you need assistance with resetting your credentials to perform a release.

            basil Basil Crow added a comment - To be clear, it looks like an attempt to perform a release was made in https://github.com/jenkinsci/xcode-plugin/releases/tag/xcode-plugin-2.0.16 but there is no 2.0.16 release visible on the Plugin Site or on Artifactory: https://plugins.jenkins.io/xcode-plugin/ https://repo.jenkins-ci.org/artifactory/releases/org/jenkins-ci/plugins/xcode-plugin/ Kazuhide, let us know if you need assistance with resetting your credentials to perform a release.
            basil Basil Crow added a comment -

            Hi kazuhidet, 2.0.16 has still not been released to the Update Center. Were you able to reset your credentials and perform a release? Let us know if we can help. To reset your credentials: https://accounts.jenkins.io/ For documentation: https://www.jenkins.io/doc/developer/publishing/releasing-manually/

            basil Basil Crow added a comment - Hi kazuhidet , 2.0.16 has still not been released to the Update Center. Were you able to reset your credentials and perform a release? Let us know if we can help. To reset your credentials: https://accounts.jenkins.io/ For documentation: https://www.jenkins.io/doc/developer/publishing/releasing-manually/

            basil Thank you for your advice.
            The plugin release system still had the old manual release mechanism, and there was an error in credential authentication, so I updated this to the new automatic release mechanism.
            From now on, if someone approves the PR, the immediate release should be triggered.

            kazuhidet Kazuhide Takahashi added a comment - basil Thank you for your advice. The plugin release system still had the old manual release mechanism, and there was an error in credential authentication, so I updated this to the new automatic release mechanism. From now on, if someone approves the PR, the immediate release should be triggered.
            markewaite Mark Waite added a comment - - edited https://github.com/jenkins-infra/repository-permissions-updater/pull/2560 has been merged to enable continuous delivery and https://github.com/jenkinsci/xcode-plugin/releases/tag/2.0.17-565.v1c48051d46ef has been released. Thanks very much!

            People

              kazuhidet Kazuhide Takahashi
              flabrie Francis Labrie
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: