28

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 projectname.xcworkspace - allowProvisioningUpdates -scheme projectname_UAT -sdk iphoneos - configuration Debug clean build'

Below is the error i'm getting i console.

note: Using new build system

note: Planning build

2018-10-11 11:19:36.638 xcodebuild[92399:5181481] DVTPortal: Service '' encountered an unexpected result code from the portal ('1100')

2018-10-11 11:19:36.638 xcodebuild[92399:5181481] DVTPortal: Error:

Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired. Please log in." UserInfo={payload={type = mutable dict, count = 9,

entries =>

0 : responseId = <CFString 0x7ff48deef220 [0x7fff94b6daf0]>{contents = "40d9ad44-c951-49da-b3f3-b3ea434765a1"}

2 : <CFString 0x7fff94a90b58 [0x7fff94b6daf0]>{contents = "protocolVersion"} = QH65B2

3 : <CFString 0x7ff48dea3420 [0x7fff94b6daf0]>{contents = "requestUrl"} = <CFString 0x7ff48de3d9a0 [0x7fff94b6daf0]>{contents = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action"}

6 : <CFString 0x7ff48dec8c30 [0x7fff94b6daf0]>{contents = "userLocale"} = en_US

8 : resultCode = <CFNumber 0x44c37 [0x7fff94b6daf0]>{value = +1100, type = kCFNumberSInt64Type}

9 : userString = <CFString 0x7ff48ded0cc0 [0x7fff94b6daf0]>{contents = "Your session has expired.  Please log in."}

10 : <CFString 0x7ff48dea94d0 [0x7fff94b6daf0]>{contents = "resultString"} = <CFString 0x7ff48de648e0 [0x7fff94b6daf0]>{contents = "authentication.failed"}

11 : httpCode = <CFNumber 0xc837 [0x7fff94b6daf0]>{value = +200, type = kCFNumberSInt64Type}

12 : <CFString 0x7ff48de340f0 [0x7fff94b6daf0]>{contents = "creationTimestamp"} = <CFString 0x7ff48de9a7d0 [0x7fff94b6daf0]>{contents = "2018-10-11T10:19:36Z"}

}

I have even tried removing the developer account from my xcode preferences in local xcode and as well as in my jenkins installed machine. I have re-added it again. Also Deleted the already logged in session from Keychain App in both places(local keychain, remote keychain) But nothing seems to help me out. I'm working with Xcode10, Mac OS Mojave,What might be the issue, any help is appreciated. Thank you.

3
  • 1
    I have same problem while uploading through terminal it worked fine but from Jenkins it's failing with session expired not able login error any ideas?
    – tp2376
    Oct 12, 2018 at 19:04
  • 2
    I'm currently running into the same problem. (Just updated to XCode 10.1 on our Jenkins) Did anyone manage to find a solution yet?
    – ParvusM
    Feb 8, 2019 at 15:00
  • Any updates here? The same problem... Mar 10, 2020 at 12:00

4 Answers 4

15

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

2
  • I'd done that last year with success; following an upgrade to Catalina & Xcode 11.4, I needed to remove and re-add the account again. Apr 9, 2020 at 18:34
  • Simply re-login the account in XCode fixed the problem for me.
    – clarkttfu
    Nov 30, 2021 at 14:22
2

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.

1

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.

1
  • I have the same in Xcode 10.1 :( And I didn't have Xcode 10, but 9.4 before that. Jan 7, 2019 at 19:13
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.