Xcode Build Error Jenkins: Your session has expired. Please log in

前端 未结 4 1694
春和景丽
春和景丽 2021-02-07 02:40

I\'m trying to build my application using jenkins pipeline using shell command. Below is the command i\'m using to build the app.

sh \'xcodebuild -workspace proj         


        
相关标签:
4条回答
  • 2021-02-07 02:57

    For my case, the reason I got this error is because I changed the team manually on my machine and accidentally pushed the changes onto the remote, which cause the Jenkins build failed, but even after I change the team back Jenkins keep failing, after diffing a lot, I found out that CODE_SIGN_IDENTITY filed inside project.pbxproj file has to be CODE_SIGN_IDENTITY = "iPhone Distribution"; other than ="Apple Development" hope it helps.

    0 讨论(0)
  • 2021-02-07 03:09

    Had this problem as well on one Jenkins build slave dedicated to building one specific app (for iOS and Android). The Mac was on Mojave and Xcode 10.1

    The fix appeared to be logging on to the Mac, and exporting the archive created by Jenkins using the Xcode UI, not xcodebuild. After doing that, the next Jenkins build when through without a problem. I say appeared to be because I didn't do anything else to the Jenkins job or the slave, and it had been failing consistently before that. Seems odd, but there you have it.

    This specific problem didn't occur on build slaves building other apps, but these other slaves, while using Xcode 10.1, were on High Sierra. We have had other odd behaviors on all iOS builds since Apple merged Apple Developer and App Store Connect, however.

    0 讨论(0)
  • 2021-02-07 03:13

    I have had a similar problem for weeks. Since updating to Xcode 10 every aspect of the build Jenkins did would be successful except I would get that error and the build would fail. Directly building, signing, etc. in Xcode was fine.

    The solution in my case was the Xcode 10.1 update. The errors you list still exist in the Jenkins output. However it no longer causes Jenkins to fail the build.

    Sadly I don't actually know what caused the failure so I don't have any further insight.

    0 讨论(0)
  • 2021-02-07 03:17

    This helped fix the problem with Jenkins running a slave with ssh:

    1. Remove the account via Xcode's preferences
    2. Quit Xcode
    3. In terminal, set the preference to not use the keychain service: defaults write com.apple.dt.Xcode DVTDeveloperAccountUseKeychainService_2 -bool NO
    4. Re-open Xcode and re-add the account

    Source: https://forums.developer.apple.com/thread/112606

    0 讨论(0)
提交回复
热议问题