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

I think it's happened again. I can't upload any app to itunes connect causing this session error.

Yes, its happening with me for the last two days! What gives?

7.2 here!

Xcode 7.2

It happens suddenly. What could be wrong with accounts?

I had to strengthen my password to my apple account. When I did so, it invalidates your stored settings in Xcode so you need to re-enter the new credentials. Xcode->Preferences->Accounts->sign in with new password

That should fix your problem.

I got this error too, delete relogin/change password still not working, please help!!!!

Yeah same issue here.

I have two developer accounts, one is admin, another is member.

The admin account can login but the member account cannot through XCode...


Both account can login through developemer account website....

I have the same issue. I Individual developer account and I can't signin via Xcode. In we interface everything is ok. Did you fix this problem?

I'm currently having the same problem. Running xcode 8.1.

I've tried logging in to another developer account and it worked fine.


Removing and re-adding the account does not work. Logging in to itunes connect and developer portal works fine.

The issue only occurs in xcode.


Hopefully they fix this soon.

I'm currently having the same problem. Running xcode 8.1.

Enable two step verification fixes this issue:


On Mac Open Settings App, Go to iCloud -> Account Details -> Security Tab (middle) and at bottom "Se Up Two-Factor Authentication"


Kind regards,


Mike, Bluestratus Ltd

www.bluestratus.com

The same problem today. With xcode 8 and 7

I am also facing same problem. Do you get any solution of this problem?

I need to upload my app on App Store and I am facing this issue 😟😟

Update: Turning on 2-factor authentication on my appleID has solved this for me. It's lame we have to hunt around the web for this and there's no word from Apple about it. >:-/


Previous: I have this same issue right now too. Xcode 7.3.1, Mac OS 10.11. Cant' add in an account which I know is valid and works on the developer.apple.com site. It was working yesterday, but not today! Argh! A call to Apple developer support yielded no help, just a suggestion to create another apple ID and try that. (yeah, thanks guys.)

See answer from s.ostrovsky - I added two-factor security to my Apple ID and it worked

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