fastlane: sigh fails with Your session has expired. Please log in.
New Issue Checklist
- Updated fastlane to the latest version
- I have read the Contribution Guidelines
Issue Description
I have the issue with sigh with Apple ID which has access to a few developer accounts, but none of them is enterprise (so it’s not related to https://github.com/fastlane/fastlane/issues/5384).
sigh works without a problem on another Apple ID which has access to the same developer accounts.
Complete output when running fastlane, including the stack trace and command used
/Users/dean/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/commander-4.3.5/lib/commander/user_interaction.rb:334: warning: constant ::TimeoutError is deprecated
+-------------------------------------+-----------------------------+
| Summary for sigh 1.8.0 |
+-------------------------------------+-----------------------------+
| username | <USERNAME> |
| adhoc | false |
| skip_install | false |
| development | false |
| force | false |
| ignore_profiles_with_different_name | false |
| skip_fetch_profiles | false |
| skip_certificate_verification | false |
+-------------------------------------+-----------------------------+
INFO [2016-07-14 12:24:41.51]: Starting login with user '<USERNAME>'
Looking for related GitHub issues on fastlane/fastlane...
Search query: Apple provided the following error info:
authentication.failed
Your session has expired. Please log in.
URL: https://api.github.com/search/issues?q=Apple%20provided%20the%20following%20error%20info:%0A%09authentication.failed%0A%09Your%20session%20has%20expired.%20%20Please%20log%20in.+repo:fastlane/fastlane
➡️ Enterprise Account - produce login failed return Your session has expired. Please log in.
https://github.com/fastlane/fastlane/issues/5384 [open] 9 💬
10 minutes ago
➡️ Sigh: authentication.failed Your session has expired. Please log in.
https://github.com/fastlane/fastlane/issues/4981 [closed] 3 💬
6 weeks ago
➡️ sigh: authentication.failed / Your session has expired. Please log in.
https://github.com/fastlane/fastlane/issues/4157 [closed] 16 💬
2 weeks ago
and 10 more at: https://github.com/fastlane/fastlane/search?q=Apple%20provided%20the%20following%20error%20info:%0A%09authentication.failed%0A%09Your%20session%20has%20expired.%20%20Please%20log%20in.&type=Issues&utf8=✓
/Users/dean/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spaceship-0.28.0/lib/spaceship/client.rb:434:in `parse_response': [!] Apple provided the following error info: (Spaceship::Client::UnexpectedResponse)
authentication.failed
Your session has expired. Please log in.
from /Users/dean/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spaceship-0.28.0/lib/spaceship/portal/portal_client.rb:52:in `teams'
from /Users/dean/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spaceship-0.28.0/lib/spaceship/portal/ui/select_team.rb:35:in `select_team'
from /Users/dean/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spaceship-0.28.0/lib/spaceship/portal/portal_client.rb:73:in `select_team'
from /Users/dean/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spaceship-0.28.0/lib/spaceship/portal/spaceship.rb:37:in `select_team'
from /Users/dean/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spaceship-0.28.0/lib/spaceship/portal/spaceship.rb:81:in `select_team'
from /Users/dean/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sigh-1.8.0/lib/sigh/runner.rb:16:in `run'
from /Users/dean/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sigh-1.8.0/lib/sigh/manager.rb:7:in `start'
from /Users/dean/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sigh-1.8.0/bin/sigh:35:in `block (2 levels) in run'
from /Users/dean/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
from /Users/dean/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/commander-4.3.5/lib/commander/command.rb:153:in `run'
from /Users/dean/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/commander-4.3.5/lib/commander/runner.rb:428:in `run_active_command'
from /Users/dean/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fastlane_core-0.48.1/lib/fastlane_core/ui/fastlane_runner.rb:26:in `run!'
from /Users/dean/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/commander-4.3.5/lib/commander/delegates.rb:15:in `run!'
from /Users/dean/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sigh-1.8.0/bin/sigh:99:in `run'
from /Users/dean/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sigh-1.8.0/bin/sigh:117:in `<top (required)>'
from /Users/dean/.rbenv/versions/2.3.0/bin/sigh:23:in `load'
from /Users/dean/.rbenv/versions/2.3.0/bin/sigh:23:in `<main>'
Configuration Files
Please copy the complete content of your Fastfile and any other configuration files you use below:
Fastfile:
I'm using sigh directly, without fastlane.
Environment
fastlane version (run fastlane -v): fastlane 1.97.2
Do you use bundler to execute fastlane (i.e. bundle exec fastlane)? no
Do you use a Ruby environment manager (e.g. chruby, rbenv, rvm)? It fails on machine where I’m using rbenv, and on another one which doesn’t have any environment manager installed.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 13
- Comments: 53 (8 by maintainers)
Well, what if it’s an enterprise appleID? Can’t really enable iTunes connect for that one since it’s not used for the App Store, just to build app for internal distribution and testing via the enterprise cert? Anyone have this same issue with an enterprise apple id?
I found a solution. Adding this user to iTunes Connect (doesn’t matter to which team) solves the problem.
After debugging HTTP requests made from the
spaceshipgem, it seems that it successfully retrievesmyacinfocookie, but the cookie gets cleared on subsequent requests.It seems to fail when requesting https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa with
myacinfocookie, but getting 302 redirect to https://itunesconnect.apple.com/itc/static/login?appIdKey=***snip***&view=1&path=%2FWebObjects%2FiTunesConnect.woa%3F&errorKey=ITC.signin.error.invalidUser.This appears to be working for me! Thanks so much @asfalcone, @KrauseFx! Fastlane is awesome. thanks for the quick resolution of this issue.
@KrauseFx 🎉 . Just wonder what is the issue? And why does adding account to iTC manually fixes the problem?
I’m having the same issue as above, I tried deleting the password from keychain and re-authenticating but I get the session expired message. It’s been working for the last 3 months on my build server but started failing this morning.
I’m able to log in at apple.com/developer as well as the apple account website.
We have the same problem using Match Apples system status is all green https://www.apple.com/support/systemstatus/
Match emits the following
@xareelee you have to run
gem list --local | grep "spaceship"or if you usebundler, you can just look inside yourGemfile.lockI think I have a fix for this issue. If you have a moment, please pull the code in this PR and
rake installin the spaceship directory to test. Let me know if this fixes the issue for you! 👍Thanks @TKBurner
Just curious… Why is adding the account to an iTC not an option?
Same problem here. We have an enterprise account, and I had to add the enterprise user to my personal iTunesConnect (completely unrelated to the enterprise). It works now…