2 Replies
      Latest reply on Jan 9, 2020 1:06 AM by DevCaptain
      Hexcode Level 1 Level 1 (0 points)

        Hi,

         

        I'm attempting to use xcodebuild to automate our release process. Because our build has an associated provisioning profile, I have added the `-allowProvisioningUpdates` flag to the xcodebuild command.

         

        If I run my xcodebuild command while logged in locally to the build machine, Xcode's automatic process of downloading the correct prov profile appears to work - the archive completes succesfully.

         

        However. If I ssh into the build machine and run the exact same xcodebuild command, I get the following error.

         

         

        2019-10-08 00:04:50.828 xcodebuild[53165:1665565]  DVTPortal: Service '' encountered an unexpected result code from the portal ('1100')
        2019-10-08 00:04:50.828 xcodebuild[53165:1665565]  DVTPortal: Error:
        Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired.  Please log in." UserInfo={payload={type = mutable dict, count = 9,
        entries =>
          0 : responseId = {contents = "78442697-9dda-449d-90b7-cfc0d646fde4"}
          2 : {contents = "protocolVersion"} = QH65B2
          3 : {contents = "requestUrl"} = {contents = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action"}
          6 : {contents = "userLocale"} = en_US
          8 : resultCode = {value = +1100, type = kCFNumberSInt64Type}
          9 : userString = {contents = "Your session has expired.  Please log in."}
          10 : {contents = "resultString"} = {contents = "Your session has expired.  Please log in."}
          11 : httpCode = {value = +200, type = kCFNumberSInt64Type}
          12 : {contents = "creationTimestamp"} = {contents = "2019-10-07T22:04:50Z"}
        }
        , NSLocalizedDescription=Your session has expired.  Please log in.}

         

        In my attempts to fix this issue I made sure the login keychain was unlocked using the  `security` command, but it made no difference.

         

        Is there any way of fixing this? Is it possible to log into the service via the command line?

         

        The user I ssh in as is present in the Accounts pane of Xcode, but I guess this login is somehow "lost" over ssh.

         

        Thanks in advance!

         

        Heather.

        • Re: "DVTPortal: Error: Your session has expired" with xcodebuild
          umerfromswanscombe Level 1 Level 1 (0 points)

          did you find any solution to this .. i'm encountering the exact same problem

          i've tried so many things to resolve it, but the error has not moved a bit, its the same everytime

           

          Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired.  Please log in." UserInfo={payload=<CFBasicHash 0x7faa8a912a70 [0x7fff918398f0]>{type = mutable dict, count = 9,

          entries =>

                  0 : responseId = <CFString 0x7faa8a90f1d0 [0x7fff918398f0]>{contents = "c24ce81c-9ae8-4565-a97e-06706a1f31b1"}

                  2 : <CFString 0x7fff91896598 [0x7fff918398f0]>{contents = "protocolVersion"} = QH65B2

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

                  6 : <CFString 0x7faa8a913ca0 [0x7fff918398f0]>{contents = "userLocale"} = en_US

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

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

                  10 : <CFString 0x7faa8a912970 [0x7fff918398f0]>{contents = "resultString"} = <CFString 0x7faa8a914c70 [0x7fff918398f0]>{contents = "Your session has expired.  Please log in."}

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

                  12 : <CFString 0x7faa8a912a00 [0x7fff918398f0]>{contents = "creationTimestamp"} = <CFString 0x7faa8a913bf0 [0x7fff918398f0]>{contents = "2019-11-15T17:01:16Z"}

          }

          , NSLocalizedDescription=Your session has expired.  Please log in.}

          2019-11-15 17:01:16.930 xcodebuild[98974:15883112]  IDEDistribution: Failed to log in with account '<my_apple_id>' while checking for an App Store Connect account

          error: exportArchive: Failed to log in.

           

          If I run the same command from a terminal within this mac it runs without a problem