Xcode export: Your session has expired. Please log in.

I am trying to export an iPhone app using Xcode 6.4 but am receiving an error:



> Your session has expired. Please log in.



When Xcode checks the developer portal for Development Teams.



I have double checked my credentials in `Xcode > Preferences > Accounts` and I am able to select "`View Details`" for the team and see Signing Identities and Provisioning Profiles as expected. I did try selecting the little refresh button in the bottom left and received the same error:



> Your session has expired. Please log in.



I double checked logging into the developer portal and no problems there.



I tried restarting Xcode and was able to select my Development Team, but right as the build started to export, Xcode crashes.



I did notice that Xcode 7.1 has been released. Maybe Xcode 6.4 is no longer supported?



**Edit**

Here's the stack trace from the crash:



Application Specific Information:

ProductBuildVersion: 6E35b

ASSERTION FAILURE in /SourceCache/DVTFrameworks/DVTFrameworks-7714/DVTFoundation/Portal/DVTDeveloperPortalDatabase.m:3277

Details: (token.team) should not be nil.

Object: <DVTListDevicesOperation>

Method: +operationWithSingleTeamToken:andPlatform:

Thread: <NSThread: 0x7fc67ef94900>{number = 43, name = (null)}

Hints: None

Backtrace:

0 0x0000000105c86fda -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit)

1 0x00000001049d765f _DVTAssertionHandler (in DVTFoundation)

2 0x00000001049d794e _DVTAssertionFailureHandler (in DVTFoundation)

3 0x00000001048f63ba +[DVTTeamOperationBase operationWithSingleTeamToken:andPlatform:] (in DVTFoundation)

4 0x0000000105f1a301 __75-[IDEDistributionSigningAssetsStepViewController _refreshDevicesFromPortal]_block_invoke (in IDEKit)

5 0x00000001048fedc9 __DVTOperationForBootstrappingTokenWithSingleTeamAndRunDependentOperationCreationBlock_block_invoke (in DVTFoundation)

6 0x000000010484adef -[DVTOperation main] (in DVTFoundation)

7 0x00000001048f339a -[DVTPortalOperation main] (in DVTFoundation)

8 0x000000010487533c -[DVTOperationGroup start] (in DVTFoundation)

9 0x00000001048f32e3 -[DVTPortalOperation start] (in DVTFoundation)

10 0x00007fff90509613 __NSOQSchedule_f (in Foundation)

11 0x00007fff92cabc13 _dispatch_client_callout (in libdispatch.dylib)

12 0x00007fff92caf365 _dispatch_queue_drain (in libdispatch.dylib)

13 0x00007fff92cb0ecc _dispatch_queue_invoke (in libdispatch.dylib)

14 0x00007fff92cae6b7 _dispatch_root_queue_drain (in libdispatch.dylib)

15 0x00007fff92cbcfe4 _dispatch_worker_thread3 (in libdispatch.dylib)

16 0x00007fff99b73a9d _pthread_wqthread (in libsystem_pthread.dylib)

17 0x00007fff99b713dd start_wqthread (in libsystem_pthread.dylib)

abort() called

Application Specific Signatures:

((token.team)) != nil

Do you have any other account configured that is expired. Maybe this is the problem.

Had the same issue. One of the accounts in Xcode (7.1) needed to be logged into again - not sure why. In Xcode preferences, went through the accounts and one said to login. That fixed it.

It's work for me, thanks :)

I've got the same problem with xcode 7.1, any luck getting it to work again?

today, XCode started complaining about an user session expired.


I tried to login again with no luck several times, then I decided to remove all of the accounts and try again.


now, every time I try to add an account, XCode keeps on crashing with "(token) should not be nil" assert failed

Same for me. iTunes Connect is updated and now supports Two Factor Verification (among other things).

I think that's the issue. Apple needs to fix it.

by the way, upgrading to XCode 7.1.1 did not help

Same for me.

I use Xcode Version 7.1 (7B91b).

Apple please fix!!!



Time Awake Since Boot: 130 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGABRT)

Exception Codes: 0x0000000000000000, 0x0000000000000000

Exception Note: EXC_CORPSE_NOTIFY


Application Specific Information:

ProductBuildVersion: 7B91b

ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-9071/DVTFoundation/Portal/DVTDeveloperAccountCredentials.m:178

Details: (token) should not be nil.

Object: <DVTDeveloperAccountCredentials>

Method: +accountCredentialsFromUsername:alternateDSID:token:keychain:successfullyPersisted:error:

Thread: <NSThread: 0x7f8142521e50>{number = 1, name = main}

Hints: None

Backtrace:

0 0x00000001111b8d56 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit)

Same problem here...

I can not log in to my apple id in xcode at all. I´ve sent a technical support request.

I'm having the same problem. But the odd thing is that it's only happening on one of my Macs. All 3 are running Xcode 7.1.1 and El Capitan 10.11.1. I have this problem on my mid-2012 13" MBP but not on my mid-2011 Mac Mini or my early 2011 17" MBP. 😕

I can add an account that only has an old expired mac developer program.

But if I try to add the one I got an eterprise developer program I get..

"

Your session has expired. Please log in.

Try signing in again or contact Apple Developer Support to resolve account access issues.

"

I managed to remove it but now I can't add it again.

It's suddenly started working on my 13" MBP again.

they seem to have fixed the remote issue, as it is now working again

yes, it is working again for me too

Xcode export: Your session has expired. Please log in.
 
 
Q