fastlane: Apple ID auth not working - 503 Service Temporarily Unavailable on various fastlane modules

New Issue Checklist

Issue Description

get_certificates aborts with:

<head><title>503 Service Temporarily Unavailable</title></head>
<body>
<center><h1>503 Service Temporarily Unavailable</h1></center>
<hr><center>Apple</center>
</body>
</html>
Command executed

The problem seems to be related to the url:

 fetch('https://idmsa.apple.com/appleauth/auth/signin', {
        "headers": {
            "content-type": "application/json",
            'X-Requested-With': 'XMLHttpRequest',
            'X-Apple-Widget-Key': 'e0b80c3bf78523bfe80974d320935bfa30add02e1bff88ec2166c6bd5a706c42',
            'scnt':SCNT,
            'X-APPLE-HC:HC,
            'X-Apple-ID-Session-id,
            'Accept': 'application/json, text/javascript'
        },
        "method": "POST",
        "body": "{\"accountName\":\"" + username + "\",\"rememberMe\":false,\"password\":\"" + password + "\"}",

Apple now seems to be using a slightly different url

https://idmsa.apple.com/appleauth/auth/signin/complete

and also the POST body has changed to:

{"accountName":"foo@bar.com","rememberMe":false, "m1":"xxx","c":"yyy","m2":"zzz"}

where xxx,yyy,zzz seem to be randomly changing.

Actually, I could verify that 2 things currently do not work anymore: a) Authenticating with username/password to trigger the 2FA process (to then use hashCash to generate the DES cookie) b) using an actual valid DES cookie for authentication.

Complete output when running fastlane, including the stack trace and command used
 09:06:42]: -----------------------------
[09:06:42]: --- Step: update_fastlane ---
[09:06:42]: -----------------------------
[09:06:42]: Looking for updates for fastlane...
[09:06:43]: Nothing to update ✅
[09:06:43]: Fastlane is checking for critical comments in Source Code.

09:06:43: — Step: default_platform — 09:06:43: ------------------------------ 09:06:43: Welcome to fastlane! Here’s what your app is set up to do: ±----------------------------------------------------------------+ | Available lanes to run | ±-------±----------------±-------------------------------------+ | Number | Lane Name | Description | ±-------±----------------±-------------------------------------+ | 1 | ios publish | Publish new release or build for iOS | | 2 | ios adhoc | Ad-Hoc | | 3 | ios nothing | Do nothing | | 4 | ios screenshots | Screenshots | | 0 | cancel | No selection, exit fastlane! | ±-------±----------------±-------------------------------------+ 09:06:43: Which number would you like to run? 2 [09:07:05]: Running lane ios adhoc. Next time you can do this by directly typing fastlane ios adhoc 🚀. [09:07:05]: Driving the lane ‘ios adhoc’ 🚀 [09:07:05]: ------------------------------ [09:07:05]: — Step: get_certificates — [09:07:05]: ------------------------------

±--------------------------------------------------------------------------------+ | Summary for cert 2.224.0 | ±------------------------±------------------------------------------------------+ | development | false | | force | false | | generate_apple_certs | true | | username | XXXXX@yahoo.com | | team_id | DSXXXXXX | | keychain_path | /Users/XXXXXX/Library/Keychains/login.keychain-db | | skip_set_partition_list | false | | platform | ios | ±------------------------±------------------------------------------------------+

[09:07:05]: Starting login with user ‘XXXXXX@yahoo.com’ Available session is not valid anymore. Continuing with normal login. ±-----------------------------+ | Lane Context | ±-----------------±----------+ | DEFAULT_PLATFORM | ios | | PLATFORM_NAME | ios | | LANE_NAME | ios adhoc | ±-----------------±----------+ [09:07:07]: Called from Fastfile at line 196 [09:07:07]: [09:07:07]: 194: desc "Ad-Hoc" [09:07:07]: 195: lane :adhoc do [09:07:07]: => 196: get_certificates [09:07:07]: 197: end [09:07:07]: 198: end [09:07:07]: [09:07:07]: <html>

<head><title>503 Service Temporarily Unavailable</title></head> <body> <center>

503 Service Temporarily Unavailable

</center>
<center>Apple</center> </body> </html>

±--------------------------------------------+ | fastlane summary | ±-----±-----------------------±------------+ | Step | Action | Time (in s) | ±-----±-----------------------±------------+ | 1 | update_fastlane | 1 | | 2 | ./check_source_code.sh | 0 | | 3 | default_platform | 0 | | 💥 | get_certificates | 2 | ±-----±-----------------------±------------+

[09:07:07]: fastlane finished with errors

Looking for related GitHub issues on fastlane/fastlane…

[!] The request could not be completed because: <html>

<head><title>503 Service Temporarily Unavailable</title></head> <body> <center>

503 Service Temporarily Unavailable

</center>
<center>Apple</center> </body> </html>

Environment

 
✅ fastlane environment ✅

Stack

Key Value
OS 14.6.1
Ruby 3.2.2
Bundler? false
Git git version 2.39.3 (Apple Git-146)
Installation Source ~/.gem/ruby/3.2.2/bin/fastlane
Host macOS 14.6.1 (23G93)
Ruby Lib Dir ~/.rubies/ruby-3.2.2/lib
OpenSSL Version OpenSSL 1.1.1u 30 May 2023
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 15.4
Swift Version 5.10

System Locale

Variable Value
LANG en_US.UTF-8 ✅
LC_ALL
LANGUAGE

fastlane files:

`./fastlane/Fastfile`
update_fastlane



# 
before_all do
  ENV['FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD']= FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD
  ENV["TREE_SHAKE_ICONS"] = "false"
end


default_platform(:ios)


# 
# Ad-Hoc lane
#
platform :ios do
  desc "Ad-Hoc"
  lane :adhoc do
    get_certificates
  end
end



# 
# Do nothing
#
platform :ios do
  desc "Do nothing"
  lane :nothing do
    puts "doing nothing"
  end
end




# [12:41:19]: Starting login with user 'XXXXXXX@yahoo.com'
# Available session is not valid anymore. Continuing with normal login.
# [12:43:00]: Successfully logged in
# [12:43:00]: Fetching profiles...
# [12:43:24]: Found 2 matching profile(s)
# [12:43:24]: Recreating the profile
# [12:43:56]: The name 'comXXXXXXAppStore' is already taken, using another one.
# [12:44:14]: Creating new provisioning profile for 'com.XXXXX' with name 'com.XXXXX AppStore XXXXXX' for 'ios' platform
# [12:45:12]: Downloading provisioning profile...
# [12:45:12]: Successfully downloaded provisioning profile...
# [12:45:12]: Installing provisioning profile...
# /Users/marcfelden/Documents/dev/flutter/flutter_nb/ios/myFile.mobileprovision
# [12:45:13]: Setting Provisioning Profile type to 'app-store'
# [12:45:13]: --------------------------------------
# [12:45:13]: --- Step: increment_version_number ---
# [12:45:13]: --------------------------------------
# [12:45:13]: $ cd /Users/marcfelden/Documents/dev/flutter/flutter_nb/ios && agvtool new-marketing-version 9.6.37
# [12:45:13]: ▸ Setting CFBundleShortVersionString of project Runner to:
# [12:45:13]: ▸ 9.6.37.
# [12:45:13]: ▸ Updating CFBundleShortVersionString in Info.plist(s)...
# [12:45:13]: ▸ Updated CFBundleShortVersionString in "Runner.xcodeproj/../Runner/Info.plist" to 9.6.37
# [12:45:13]: ▸ Cannot find "Runner.xcodeproj/../YES"
# [12:45:13]: ------------------------------------
# [12:45:13]: --- Step: increment_build_number ---
# [12:45:13]: ------------------------------------
# Current version of project Runner is: 
#     1

# /Users/XXXXX/Documents/dev/flutter/flutter_nb/ios
# [12:45:13]: $ cd /Users/XXXXXX/Documents/dev/flutter/flutter_nb/ios && agvtool new-version -all 2 && cd -
# [12:45:13]: ▸ Setting version of project Runner to:
# [12:45:13]: ▸ 2.
# [12:45:13]: ▸ Also setting CFBundleVersion key (assuming it exists)
# [12:45:13]: ▸ Updating CFBundleVersion in Info.plist(s)...
`./fastlane/Appfile`
app_identifier("com.XXXXX") # The bundle identifier of your app
apple_id("XXXXXX@yahoo.com") # Your Apple Developer Portal username

itc_team_id("XXXXXXXX") # App Store Connect Team ID
team_id("XXXXXXX") # Developer Portal Team ID

# For more information about the Appfile, see:
#     https://docs.fastlane.tools/advanced/#appfile

fastlane gems

Gem Version Update-Status
fastlane 2.224.0 ✅ Up-To-Date

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
error_highlight 0.5.1
did_you_mean 1.6.3
syntax_suggest 1.0.2
babosa 1.0.4
bundler 2.4.22
colored 1.2
highline 2.0.3
commander 4.6.0
dotenv 2.8.1
emoji_regex 3.2.3
faraday-cookie_jar 0.0.7
gh_inspector 1.1.3
google-apis-playcustomapp_v1 0.13.0
google-cloud-env 1.6.0
naturally 2.2.1
rubyzip 2.3.2
security 0.1.5
simctl 1.6.10
terminal-notifier 2.0.0
terminal-table 3.0.2
tty-cursor 0.7.1
tty-spinner 0.9.3
word_wrap 1.0.0
rouge 2.0.7
xcpretty 0.3.0
xcpretty-travis-formatter 1.0.1
set 1.0.3
public_suffix 6.0.1
addressable 2.8.7
artifactory 3.0.17
aws-eventstream 1.3.0
aws-sigv4 1.10.0
aws-partitions 1.982.0
jmespath 1.6.2
aws-sdk-core 3.209.1
aws-sdk-kms 1.94.0
aws-sdk-s3 1.166.0
base64 0.2.0
nkf 0.2.0
rexml 3.3.8
CFPropertyList 3.0.7
excon 0.112.0
ruby2_keywords 0.0.5
faraday-retry 1.0.3
faraday-rack 1.0.0
faraday-patron 1.0.0
faraday-net_http_persistent 1.2.0
faraday-net_http 1.0.2
multipart-post 2.4.1
faraday-multipart 1.0.4
faraday-httpclient 1.0.1
faraday-excon 1.1.0
faraday-em_synchrony 1.0.0
faraday-em_http 1.0.0
faraday 1.10.4
faraday_middleware 1.2.1
domain_name 0.6.20240107
http-cookie 1.0.7
fastimage 2.3.1
httpclient 2.8.3
multi_json 1.15.0
jwt 2.9.1
signet 0.19.0
os 1.1.4
googleauth 1.8.1
mini_mime 1.1.5
retriable 3.1.2
trailblazer-option 0.1.2
declarative 0.0.20
uber 0.1.0
representable 3.2.0
google-apis-core 0.11.3
google-apis-androidpublisher_v3 0.54.0
rake 13.2.1
digest-crc 0.6.5
google-apis-storage_v1 0.31.0
google-apis-iamcredentials_v1 0.17.0
google-cloud-errors 1.4.0
google-cloud-core 1.7.1
google-cloud-storage 1.47.0
json 2.7.2
mini_magick 4.13.2
optparse 0.5.0
plist 3.7.1
unicode-display_width 2.6.0
tty-screen 0.8.2
nanaimo 0.3.0
colored2 3.1.2
claide 1.1.0
atomos 0.1.3
xcodeproj 1.25.0
forwardable 1.3.3
logger 1.5.3
pathname 0.2.1
shellwords 0.1.0
cgi 0.3.6
date 3.3.3
timeout 0.3.1
securerandom 0.2.2
uri 0.12.1
ipaddr 1.2.5
openssl 3.1.0
digest 3.1.1
resolv 0.2.2
time 0.2.2
stringio 3.0.4
open-uri 0.3.0
mutex_m 0.1.2
net-http 0.3.2
net-protocol 0.2.1
english 0.7.2
erb 4.0.2
abbrev 0.1.1
tempfile 0.1.3
delegate 0.3.0
fileutils 1.7.0
tmpdir 0.1.3
singleton 0.1.1
open3 0.1.2
racc 1.6.2
nokogiri 1.15.5
prettyprint 0.1.1
pp 0.4.0
find 0.1.1
ostruct 0.5.5
yaml 0.2.1
psych 5.0.1

generated on: 2024-10-19

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 56
  • Comments: 207 (29 by maintainers)

Commits related to this issue

Most upvoted comments

✨ Official Response 3

The fix in #26415 should do it 🤞 Would anybody be able to test this PR/branch to see if its fixed for you? And if so, PLEASE leave any feedback in the PR for me 🙏

Soooooo much of this work was done by @snatchev over a year ago when he discovered this optional new auth system. We have forked his fork of sirp and have it over at https://github.com/fastlane/fastlane-sirp. This is released under a new RubyGem called fastlane-sirp. Its not an exact implementation of SIRP but its Apple’s version 🤷‍♂️

My part was just implementing all of his hard work into fastlane so please to give @snatchev some love over at his Twitter at some point 🫶

⚠️ This PR has A LOT of failing tests right now so working on fixing those

How to test

Update Gemfile and run bundle install, bundle update fastlane, or bundle update

gem "fastlane", :git => "https://github.com/fastlane/fastlane.git", :branch => "joshdholtz/apple-auth-sirp"

✨ Official Response

I think I have a branch for this fix somewhere. I was out all day but I will take a look when I get back home and keep everyone updated.

I’m also encountering this issue right now.

✨ Official Response 5

This has been officially release in [2.225.0[(https://github.com/fastlane/fastlane/issues/26368). This is live on RubyGems and should be live on Homebrew in a few hours or sometime tomorrow.

Thanks for everyone’s help and patience! fastlane community is the best community ❤️

I just want to say thank you for jumping on this so quickly… you are awesome, your service is awesome, your response here was awesome… huge props. Thank you. Also…

EFF APPLE. WTF. No deprecation? No warning? No documentation? Sounds like this was sort of like if you came home to your apartment building on a Friday night to your neighbors all standing around outside, and found out that the landlord had the changed front door lock combination at 5PM and left you all to guess. Wow… that level of arrogance has really no words… Or do I have something wrong here?

@brianaderer Ha! Well… These are Apple’s private/non-public APIs that they use for their own website and tools so they don’t really need to have documentation for it. We are doing stuff here that they never intended to be used this way 😇

We had some heads up with this one, thankfully! @snatchev discovered this change a year ago and started to investigate it. I was able to implement his investigations and have a branch reach. However, Apple rolled back this implementation so I just kept the branch around for if it needed it and… this weekend was the time 😅

Apple has given us the App Store Connect API which IS the public facing thing that has the stability that we need. However, it doesn’t provide fasltane users with everything they need which is why we still have this Apple ID auth 😈 Having the stable App Store Connect API has made our job as fastlane maintainers sooooooooo much less stressful! Apple has had a lot of stability in all of their APIs since they. However, we always know that things can change at anytime with Apple ID auth without any notice (but thankfully that doesn’t happen too often.

So woudl I love if Apple gave us some time of deprecation or documentation for this? Absolutely! They know we exist and use things this way. Do I expect them to? Absolutely not 😇 But that is why I find this stuff fun and love working on it! It’s such a fun problem to solve and the community behind fastlane is sooooo passionate.

Okay, this turned into a huge thing so I hoped you enjoyed reading it 😁

I had this issue previously and went away when I upgraded to 2.225.0, however; I started seeing this 503 again today 🤔

Same issue at 2024-10-19

I also have this problem on 2025-01-25, does anyone know how to fix it?

just upgraded to 2.225.0 and it worked ✅

But I hope it’s just a temporary issue…

We all hope so 😕 But killing an endpoint that they know is being used by lots of developers, without providing an alternative (fastlane produce can’t work with ApiKey) is such an Apple move 😕

@iwanpark Try the command below:


bundle install --redownload 

and then run


bundle exec fastlane

Hope this helps!

Thank you so much! This really helped me. A big shout-out to @joshdholtz and @snatchev for fixing this issue!

Apple seems to have switched to Secure Remote Password (SRP), using the /appleauth/auth/signin/init and /appleauth/auth/signin/complete endpoints - or at least, based on the code from https://appstoreconnect.apple.com/login.

I could get the first endpoint working (/init), but not yet the second (/complete).

POST /appleauth/auth/signin/init

Request

It doesn’t seem to require a lot of request data, just:

{
  "accountName": "<email>",
  "protocols": ["s2k", "s2k_fo"],
  "a": "<base64>"
}

Where a seems to be a randomly generated base64 encoded Uint8Array(256).

Response

{
  "b": "<bae64>",
  "c": "<challenge>",
  "iteration": 20838,
  "protocol": "s2k",
  "salt": "<base64>"
}

Where:

  • b seems to be the base64 encoded public server value, used in SRP
  • c seems to be the challenge needed to send to /appleauth/auth/signin/complete
  • iteration is related to the hashing logic, used in SRP
  • protocol seems to be fixed to s2k
  • salt seems to be the base64 encoded salt, used in SRP

POST /appleauth/auth/signin/complete

Request

No idea yet how I can generate the m1/m2 keys using SRP.

{
  "accountName": "<email>",
  "rememberMe": false,
  "m1": "<base64 - SRP generated proof",
  "m2": "<base64 - SRP generated proof",
  "c": "<base64 - challenge from /init>"
}

Right now, since 2pm, it has the error 503 Service Temporarily Unavailable

Happening as of today, 2025-03-10. Can’t login on ASC, neither developer/account. Any known workarounds to login on Apple Store Connect?

Hello Guys , thank for helping . but i have new problem , i got AppleID Session , but i see after some hours session will not work and i must get new session for this appleid ! whats the problem ? i mean every 4-5 hours session not work and i must get new session !

I encountered the same problem where the login session expired after 4-5 hours. The previous version of Fastline login session can handle it for a long time. Have you found a solution?

Hello beautiful people! If more have got it resolved, please share your workflow, it may help others. Thanks!

I have tried gem uninstall fastlane bundle install bundle exec fastlane fastlane-credentials remove bundle exec fastlane spaceauth --verbose

still the error is same Timeout received: ‘Spaceship::AccessForbiddenError’, ‘Access forbidden’

We are also facing the same issue. hopefully waiting for a positive response from anyone who cracked it. we are trying to unlock account, can anyone guide what is the next actions?

little background: updated to latest 2.225.0 version, although our appstore password is correct, its keep on asking to reenter pwd and then account got locked now Access forbidden.

I just want to say thank you for jumping on this so quickly… you are awesome, your service is awesome, your response here was awesome… huge props. Thank you. Also…

EFF APPLE. WTF. No deprecation? No warning? No documentation? Sounds like this was sort of like if you came home to your apartment building on a Friday night to your neighbors all standing around outside, and found out that the landlord had the changed front door lock combination at 5PM and left you all to guess. Wow… that level of arrogance has really no words… Or do I have something wrong here?

@joshdholtz I’m still getting the 503, and believe I have tried all the suggestions. I also get it when I do match. I’m not getting it prompting me for a password or any sort of 2FA. (edit: I changed the account I was using and did get prompted for password… but still got the 503 afterwards) Any other suggestions? Thanks for your work on this.

@laraferroni I’ll added some debug logs in bf6d7bf if you are able to update to the this latest commit! If you run with --verbose in your command, you should get some logs that match in that commit that should show us where your authentication is actually coming from

Thanks. In case it’s useful, I do still see fastlane 2.224.0 when I run bundle list. I see that and the sirp version. I tried to manually uninstall the gem (it’s not in my gemfile but was installed globally), but it still got added back in.

  • fastlane (2.224.0)
  • fastlane-plugin-appicon (0.15.0)
  • fastlane-plugin-badge (1.4.0)
  • fastlane-sirp (1.0.0 2f92389)

Maybe because it’s a dependency of one of the plugins I’m using? Or is the sirp verision supposed to run side by side? When I do the verbose, the errors are all in the fastlane-2.224.0 gem. I’m also using rbenv fwiw.

My local iOS gem file:

#gem "fastlane"
gem 'fastlane-sirp', :git => "https://github.com/fastlane/fastlane-sirp"
gem "cocoapods"

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)

If that’s the problem, then maybe it will resolve when it gets merged into the main branch.

@laraferroni Ahhhh yeah yeah, it sounds like its a dependency problem them! You should be good once this merges and ships 😇

✨ Official Response 2

Got it working locally! Need to push a new Ruby gem to make this work but a lot of this work was done by @snatchev 🫶 A branch for testing should be available within the hour

If you take a look how the first call of the webpage appstoreconnect works, you see that after providing your username/email, when asking for the password, it gives you a challenge (which to me seems to be new).

    "iteration": 20902,
    "salt": "7Kf+sUGGC1Zsj+HESAkA8w==",
    "protocol": "s2k",
    "b": "XXXXXxoe6AHz+fwgyXeU+bFYtjFFCH5NUiEmB4zFH/hLRZU6mMzB54pxh+JvHFeNCXHu8VtBLreSTlfK6TzTQHZXIHYTicPLf/70dQEkcvMaZ/7Zy65nKjGHbJcriGpg3HGGc1WK56zRe+NfBCOk1k0MxZRn87oOWqJGNUjrPPybgoxsYYA0W8E7QXkAQcqeeLgUilfDzlSP4E4up/Av+zLhjuRfkM9ehYrzrv7hE7Oe39qQwitLkSgNHmH5GUPSzb1bCIDfMvqc/VKORwsW7DBUrADqh/9SYwIADCywBwvJhnj4gw==",
    "c": "dX8dfa-11ef-a459-63e9ff7439fb:MSA"

I guess the client uses this to create the login credentials xxx, yyyy, zzz.

{"accountName":"foo@bar.com","rememberMe":false, "m1":"xxx","c":"yyy","m2":"zzz"}

[sk2](https://stackoverflow.com/questions/2845476/what-is-an-s2k-algorithm#:~:text=String-to-key (S2K,keys for symmetrically encrypted messages.)

Same here since yesterday evening.

curl -X POST https://idmsa.apple.com/appleauth/auth/signin returns

<html>
<head><title>503 Service Temporarily Unavailable</title></head>
<body>
<center><h1>503 Service Temporarily Unavailable</h1></center>
<hr><center>Apple</center>
</body>
</html>

Same on 2025-03-10. Login is falling on eas and directly on https://account.apple.com/sign-in by password. I can login via passkey.

Screenshot 2024-11-11 at 2 38 24 PM

After update still getting the same issuse @joshdholtz

I noticed this is mentioned in the latest Fastlane update:

2.225.0 Improvements This version has a required fix for authenticating with Apple via Apple ID. Apple started using their own variant of SRP (Secure Remote Password) using SHA-256 and 2048 bit hashing in the sign in flow. Any previous fastlane versions will likely response a “503 Service Temporarily Unavailable” when authenicating with an Apple ID.

https://github.com/fastlane/fastlane/releases/tag/2.225.0

Update: I just upgraded to 2.225.0 and it worked ✅.

joshdholtz/apple-auth-sirp is unfortunately not working for me. I am getting The login credentials for '<account>' seem to be wrong.

I answer y whether I want to re-enter the password, I re-renter the password and then get again:

Available session is not valid anymore. Continuing with normal login.
The login credentials for '<account>' seem to be wrong

I am sure the password is correct, I just signed out and in again on developer.apple.com manually.

The account has 2FA authentication turned on. Could that be it?

Same here.

same issue…

I have the same problem,

We get response on all commands of fastlane:


[!] The request could not be completed because:
	<html>
<head><title>503 Service Temporarily Unavailable</title></head>
<body>
<center><h1>503 Service Temporarily Unavailable</h1></center>
<hr><center>Apple</center>
</body>
</html>

I’m experiencing the same issue and hoping for an update soon. I checked Apple’s System Status, and everything appears to be normal: https://developer.apple.com/system-status/

The same happened on 2025-03-11. I can log in only via passkey.

I’m having the same problem

Had this issue for more than a month and just switched to API token login and the issue is resolved! thank you!

Just to add a bit more info. It’s been a few days since last time I run fastlane and the session expired which meant I had the same issue again, still not working. The workaround I found that works 100% of the time for me is to run fastlane spaceauth first. That prompts for the login properly without issues, and the session that caches then is used by the other tools without problem, in my case match. Hope it helps 🙏

Hello Guys , thank for helping . but i have new problem , i got AppleID Session , but i see after some hours session will not work and i must get new session for this appleid ! whats the problem ? i mean every 4-5 hours session not work and i must get new session !

I encountered the same problem where the login session expired after 4-5 hours. The previous version of Fastline login session can handle it for a long time. Have you found a solution?

did you update to 225Version ? still problem …, please explain how to fix when you got true answer

@TamimC I’m going to create a branch and throw some more debug logs for you to run if you don’t mind 😇 I need to do some family things first but I’ll prep that eventually and let you know

✨ Official Response 6 It seems like that there are some different issues now? The originally issue was on login and receiving a 503 Service Temporary Unavailable. However, it now looks like some of you are receiving Access Forbidden error before the completion step of the SRP login 🤔 I’m not able to reproduce this myself so… this is going to be a hard one to fix 😬

I have tried using 2.219, 2.220 & 2.224.0. -> and getting 503 services temporarily unavailable 2.225.0 -> An error occurred while verifying your certificates and profiles with the Apple Developer Portal. Invalid username and password combination.

I have almost the same issue

bundle exec fastlane match.
Pasword 100% valid, but it keeps asking again and again.

Screenshot 2024-10-21 at 15 29 29

@iwanpark Try the command below:

bundle install --redownload 

and then run

bundle exec fastlane

Hope this helps!

✨ Official Response 3

The fix in #26415 should do it 🤞 Would anybody be able to test this PR/branch to see if its fixed for you? And if so, PLEASE leave any feedback in the PR for me 🙏

Soooooo much of this work was done by @snatchev over a year ago when he discovered this optional new auth system. We have forked his fork of sirp and have it over at https://github.com/fastlane/fastlane-sirp. This is released under a new RubyGem called fastlane-sirp. Its not an exact implementation of SIRP but its Apple’s version 🤷‍♂️

My part was just implementing all of his hard work into fastlane so please to give @snatchev some love over at his Twitter at some point 🫶

⚠️ This PR has A LOT of failing tests right now so working on fixing those

How to test

Update Gemfile and run bundle install, bundle update fastlane, or bundle update

gem "fastlane", :git => "https://github.com/fastlane/fastlane.git", :branch => "joshdholtz/apple-auth-sirp"

thank you sooo much . problem fixed and work fine for me . but we are doing make change auth to appstore connect api .😄

To be precise, Apple is using what looks like SRP6a with SHA-256 and 2048-bit hashing. An example implementation in JS can be found here: https://github.com/steilerDev/icloud-photos-sync/blob/main/app/src/lib/icloud/icloud.crypto.ts

I am not user of fastlane but it is happening to me while manually login to http://developer.apple.com/. On inspection, https://idmsa.apple.com/appleauth/auth/signin/complete?isRememberMeEnabled=true gives 503 error.

For me it seems something related to my network configuration. It is happening on my local ISP and router (pfsense). If I use same ISP without pfsense (and ipv6/custom MTU), it works. Issue seems to have started happening few weeks ago when I enabled IPv6 in pfSense and set MSS to 1472 (to match 1532 MTU) value.

Tried resetting apple id username and password; however still facing the same 503 error intermittently within our CI/CD system

try switching to API token login than uname & pwd… we recently switched to API login and never faced pwd reset or any issue

Using SRP, are application-specific passwords accepted ? Using the new version, I can authenticate with username/password (new password) However, when I try to use an application-specific password, authentication fails (401)

I have tried all the examples here. but still fails

I tried everything wich i read in this thread, but nothing seems to fix my problem. Updating to 2.225.0 resolved the 503 unauthorized, but now it keeps asking the login psw over and over (“The login credentials for ‘xxx’ seem to be wrong”).

What i tryed:

  • bundle clean --force
  • rm -rf ~/.fastlane/spaceship/*
  • bundle exec fastlane fastlane-credentials remove
  • bundle install --redownload
  • fastlane run update_fastlane
  • bundle exec fastlane

I’m from Italy; I’m using apple id (email) and its psw; the id is fully lowercase; psw has a ! in it. Trying to run “fastlane spaceauth” gives me the same output of “bundle exec fastlane”.

I have no idea what to do next

What finally helped me was changing the password in my appleId account and creating a new password for the application))

Using all lowercase in my username resolved the issue for me

FYI I made sure that there were NO fastlane related environment variables set as well wiping any spaceship cookies.

With the “log-auth-errors” branch, after running bundle exec fastlane spaceauth --verbose I’m seeing:

Logging into to App Store Connect ()...
Reading keychain entry, because either user or password were empty
-------------------------------------------------------------------------------------
Please provide your Apple Developer Program account credentials
The login information you enter will be stored in your macOS Keychain
You can also pass the password using the `FASTLANE_PASSWORD` environment variable
See more information about it on GitHub: https://github.com/fastlane/fastlane/tree/master/credentials_manager
-------------------------------------------------------------------------------------
Username: xxxxxxx
Logging into to App Store Connect (xxxxxx)...
Reading keychain entry, because either user or password were empty
Starting SIRP Apple ID login
Received SIRP signin init response: {"iteration"=>20067, "salt"=>"pjr1dQgy2VWu7ypByn/HWw==", "protocol"=>"s2k", "b"=>"i65zSjUd4ZlNzFkyLsdmtyJEqaeX9B1IviEMDWiA6s6z2MkxFMihkzHbM8irSQw2Dmx1SZmy9PDiCY13dOG/g4BESvr7ZoJj/biZMM/1ItydFHMcMBB+u12ZFjhtgp7q1/c8AwgaQ1sq6QP14/nhVj6FbFHmzXpoHWPzGNnTaHfh1eXDxGYWuxTJiJOK1WJpp10YibKEykwjvRAc2cyshurwC4nmgy2v/rcdTHWRHud+zoS0yX/jVp304OMyKtGk822kAdYfuJv7DX+5M7lRpT50C7fXFbwXP3F8A6KcP5Wj6pJyJ+ftib5EdQQnd5QwVTb/LEfe4WpQTcbpYv29tw==", "c"=>"d-5a5-73a8bdf8-9095-11ef-86a6-c9591f7867f5:RNO"}
Received 401 with {"serviceErrors"=>[{"code"=>"-20101", "message"=>"Enter the email or phone number and password for your Apple Account.", "suppressDismissal"=>false}]}
Could not login to App Store Connect
Please check your credentials and try again.
This could be an issue with App Store Connect,
Please try unsetting the FASTLANE_SESSION environment variable by calling 'unset FASTLANE_SESSION'
(if it is set) and re-run `fastlane spaceauth`

Exception type: NoMethodError

Looking for related GitHub issues on fastlane/fastlane...
Search query: undefined method `body' for nil

It prompts for username, but if I use my normal ADP account email, it doesn’t prompt for password and automatically fails.

However, if I enter a bogus username, it does prompt for a password.

@D3icidal strange since I was forced to reset (as in change) the password. I’m back in now on all my devices, but I’m not going to try fastlane spaceship, etc. again until the fix is tested more thoroughly. BTW, resetting the apple ID password wipes all your app-specific passwords.

@joshdholtz got it working! After uninstalling the gem, using bundle install, made sure the password and session were unset, then running bundle exec fastlane spaceauth --verbose it worked. The only real difference I see is that I took out the -u flag and just typed it in like normal, but since I can’t replicate it anymore I am not positive that was the cause Now it works regardless if I use -u with my email or not

Also funny enough, I uninstalled your branch version, and now the vanilla 2.25 version works fine 😕

Thank you for all of your help, I still can’t replicate the original problem but count this as a win. You are the best!

@TamimC Are you using -u? And if so, could you try without?

@joshdholtz fastlane spaceauth -u …@…com --verbose And I tried both with the password & app_Specific+password preset, and tried with unsetting them first. This was also just after unlocking my account recently and tested so I know it wasn’t locked (that’s a different error) Confirmed in the gem error that it is using your branch: /.gem/ruby/3.3.0/bundler/gems/fastlane-f41446fea6e2/spaceship/ when I ran bundle exec fastlane spaceauth -u ...@..com --verbose

I removed the gem and reinstalled fresh and still get similar error, but now I see a 401 Received 401 with {“serviceErrors”=>[{“code”=>“-20101”, “message”=>“Enter the email or phone number and password for your Apple Account.”, “suppressDismissal”=>false}]}

@renfrenkel Do you still have FASTLANE_USE_LEGACY_PRE_SIRP_AUTH set?

echo $FASTLANE_USE_LEGACY_PRE_SIRP_AUTH
unset FASTLANE_USE_LEGACY_PRE_SIRP_AUTH

Oh hey while we are sending updates - could we add app-store-connect to the list of supported export methods?

@brianaderer Can you please create a discussion or issue about this (or find one if one exists) and mention me in it? My highest priority is fixing auth and I don’t want this to get lost in this already giant thread 🙏

Or even better… create a PR so I can just review, approve, and ship 😇

Copy you’re right sorry… haha k I’ll have a look at it 😃

@jfelipe72 How can one clean the cache? For what is worth, when I try (with 2.225.0) I also get the error "The login credentials for ‘…’ seem to be wrong. Looking at your screenshot I realize that fastlane doesn’t even ask for the MFA code confirmation, in fact it doesn’t even send it. 🤔

Having the same issue. Tried to create App Specific Password several times. “fastlane spaceauth” doesn’t do anything, but tries to login with the same password and asking again to provide valid.

did anyone solve it?

@jfelipe72 How can one clean the cache? For what is worth, when I try (with 2.225.0) I also get the error "The login credentials for ‘…’ seem to be wrong. Looking at your screenshot I realize that fastlane doesn’t even ask for the MFA code confirmation, in fact it doesn’t even send it. 🤔

✨ Official Response 6

It seems like that there are some different issues now? The originally issue was on login and receiving a 503 Service Temporary Unavailable. However, it now looks like some of you are receiving Access Forbidden error before the completion step of the SRP login 🤔

I’m not able to reproduce this myself so… this is going to be a hard one to fix 😬

Same here. Updating to 2.225 now causes this invalid login credentials error. Credentials have not been changed on my end and re-typing them in does not help

Screenshot 2024-10-21 at 8 52 50 AM

Works again, thanks!

does updating fastlane to 2.225 solve your issue or you have to do some to do something more?

just updated fastlane via bundle update fastlane

Works again, thanks!

I just want to say thank you for jumping on this so quickly… you are awesome, your service is awesome, your response here was awesome… huge props. Thank you. Also… EFF APPLE. WTF. No deprecation? No warning? No documentation? Sounds like this was sort of like if you came home to your apartment building on a Friday night to your neighbors all standing around outside, and found out that the landlord had the changed front door lock combination at 5PM and left you all to guess. Wow… that level of arrogance has really no words… Or do I have something wrong here?

@brianaderer Ha! Well… These are Apple’s private/non-public APIs that they use for their own website and tools so they don’t really need to have documentation for it. We are doing stuff here that they never intended to be used this way 😇

We had some heads up with this one, thankfully! @snatchev discovered this change a year ago and started to investigate it. I was able to implement his investigations and have a branch reach. However, Apple rolled back this implementation so I just kept the branch around for if it needed it and… this weekend was the time 😅

Apple has given us the App Store Connect API which IS the public facing thing that has the stability that we need. However, it doesn’t provide fasltane users with everything they need which is why we still have this Apple ID auth 😈 Having the stable App Store Connect API has made our job as fastlane maintainers sooooooooo much less stressful! Apple has had a lot of stability in all of their APIs since they. However, we always know that things can change at anytime with Apple ID auth without any notice (but thankfully that doesn’t happen too often.

So woudl I love if Apple gave us some time of deprecation or documentation for this? Absolutely! They know we exist and use things this way. Do I expect them to? Absolutely not 😇 But that is why I find this stuff fun and love working on it! It’s such a fun problem to solve and the community behind fastlane is sooooo passionate.

Okay, this turned into a huge thing so I hoped you enjoyed reading it 😁

@joshdholtz Thanks, it’s good to have some background here. I’m just finishing and starting to deploy my first RN app, and I’m really big on CI/CD processes… so fastlane is a must for me. Thanks again for all you do when I picked this up I had no idea it was a personally maintained project, it’s quickly becoming integral to my workflow

Thank you @joshdholtz! Just got my servers back online.

@joshdholtz Thank you Josh! ✨

@joshdholtz

I’m still getting the 503, and believe I have tried all the suggestions. I also get it when I do match.

I’m not getting it prompting me for a password or any sort of 2FA. (edit: I changed the account I was using and did get prompted for password… but still got the 503 afterwards)

Any other suggestions?

Thanks for your work on this.

Thanks @mohhomadfarman, I did:

  • bundle clean --force
  • bundle install --redownload
  • bundle exec fastlane

I thought I did something similar before but that really changed something.

I then got the following error:

bundler: failed to load command: fastlane (/Users/user/.local/share/gem/ruby/3.3.0/bin/fastlane)
/nix/store/nwzyvr91mw3qhclgl3np1wxvy15gnxg1-ruby-3.3.5/lib/ruby/3.3.0/bundled_gems.rb:75:in `require': cannot load such file -- fastlane-sirp (LoadError)

I then added the following line to my Gemfile:

gem 'fastlane-sirp', :git => "https://github.com/fastlane/fastlane-sirp"

Now, fastlane started up again but the beaviour is the same: The login credentials for '<account>' seem to be wrong

@joshdholtz branch joshdholtz/apple-auth-sirp works for me. Thank you!

@joshdholtz Works for me. Thanks 🙏

Works for me, thank you!

Works for me!

@joshdholtz works for me

@joshdholtz, I can confirm that this worked for me! Well, I at least got past the 503 error, after which I was hit with a Could not create another Distribution certificate, reached the maximum number of available Distribution certificates., but I think that one’s on me 😄