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

New Issue Checklist

[x] Updated fastlane to the latest version
[x] I read the Contribution Guidelines
[x] I read docs.fastlane.tools
[x] I searched for existing GitHub issues

Issue Description
get_certificates aborts with:
<title>503 Service Temporarily Unavailable</title>

503 Service Temporarily Unavailable

Apple

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                |<EMAIL_ADDRESS>                                 |
| 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<EMAIL_ADDRESS>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]:
503 Service Temporarily Unavailable

503 Service Temporarily Unavailable
Apple

+---------------------------------------------+
|              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:

503 Service Temporarily Unavailable

503 Service Temporarily Unavailable
Apple

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<EMAIL_ADDRESS># 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
<EMAIL_ADDRESS># 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

I'm also encountering this issue right now.

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/

Same here since yesterday evening.
curl -X POST https://idmsa.apple.com/appleauth/auth/signin returns

<title>503 Service Temporarily Unavailable</title>

503 Service Temporarily Unavailable

Apple

Same issue on our side 😕

I'm also encountering this issue right now. Need to give out an urgent fix. Remind me how to publish the build manually? 😁

Same issue here

It seems Apple changed something on their hand, and maybe they eventually decided to kill the endpoint used in favour to the JSON Web Tokens. Other tools that are using the same authentication method are broken, like Xcodes (see my issue here).

It seems Apple changed something on their hand, and maybe they eventually decided to kill the endpoint used in favour to the JSON Web Tokens. Other tools that are using the same authentication method are broken, like Xcodes (see my issue here).

It is definitely the same issue (you can see in the response the invalid json "<", which is because the POST request return HTML.).
What makes you think they use something like JWT? As far as I know JWT is to generate temporary tokens from an API key. This would be in contrast to 2FA IMHO.

I might be totally wrong here but I thought maybe they decided to not allow third-party tools and services use this authentication endpoint / 2FA method anymore as they have other authentication methods in place now. For example, JSON for App Store Connect API, OAuth for Apple Search Ads, Sign In With Apple, etc.
But I hope it's just a temporary issue...

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 and alternative (fastlane produce can't work with ApiKey) is such an Apple move 😕

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"}

Confirming, this is super annoying.

Same issue at 2024-10-19

I have the same problem,
We get response on all commands of fastlane:

[!] The request could not be completed because:

<title>503 Service Temporarily Unavailable</title>

503 Service Temporarily Unavailable

Apple

same issue....

Same here.

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"}
Has anyone used this new interface to solve the problem？？

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>"
}

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>"
}

Yes, this process is correct, but currently I don't know how to generate m1 m2. Do any friends who have already solved it tell me

m1 m2 seems from https://appleid.cdn-apple.com/appleauth/static/jsj/445765738/webSRPClientWorker.js

https://blog.uniauth.com/what-is-secure-remote-password

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>"
}

Yes, this process is correct, but currently I don't know how to generate m1 m2. Do any friends who have already solved it tell me

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>"
}

Yes, this process is correct, but currently I don't know how to generate m1 m2. Do any friends who have already solved it tell me

Which method in this JS can I call to obtain m1 and m2？

To be precise, Apple is using 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

✨ 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.

✨ 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.

oh thank you so much
we are waiting for you bro

✨ 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

✨ 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 🫶
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"

@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 😄

✨ 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 .:D

@joshdholtz works for me

Still doesn't work for us. Even fastlane spaceauth returns 503, w t f
Updated everywhere on the system, including docker images.
[!] The request could not be completed because:

503 Service Temporarily Unavailable

503 Service Temporarily Unavailable
Apple

Works for me!

Works for me, thank you!

✨ 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 .:D

did you able to use sight using appstore connect api too?

✨ 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"

thx it working on me

✨ 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"

It worked for me too!
Thanks

I tried this but still got the same error. Any help, please?
gem "fastlane", :git => "https://github.com/fastlane/fastlane.git", :branch => "joshdholtz/apple-auth-sirp"

@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"

That did it for me, thanks for the fast response and quick fix! 🚀

@jieey1140 It still doesn't work even though I already run bundle install --redownload. I'm confused.

@joshdholtz Works for me. Thanks 🙏

@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!

@iwanpark
What errors do I get when I run it?
In the ios/Gemfile
gem “fastlane”, :git => “https://github.com/fastlane/fastlane.git”, :branch => “joshdholtz/apple-auth-sirp”

in the IOS directory and run bundle install --redownload  in the IOS directory.
Right inside that folder, run bundle exec fastlane This will use the version of fastlane inside that gemfile, not the one installed in global, and it should work!

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

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?

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?

Methode is working you have clean chache first and install run
First Setup Gemfile
gem “fastlane”, :git => “https://github.com/fastlane/fastlane.git”, :branch => “joshdholtz/apple-auth-sirp”
then run this command
bundle install --redownload
and use this
bundle exec fastlane

For me, I am experiencing issues when running sudo bundle exec fastlane match appstore
The same issue as @felixscheinost

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

Now run
bundle install --redownload
bundle exec fastlane
Then make your select 1 option after running bundle exec fastlane
Then provide the screenshot of it. will try to help you

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

Now run
bundle install --redownload
bundle exec fastlane
Then make your select 1 option after running bundle exec fastlane
Then provide the screenshot of it. will try to help you

Still getting the 503 on match with the fastlane-sirp version. I did do the bundle install --redownload and am using bundle exec to run.
Called from Fastfile at line 166
[11:09:15]: ```
[11:09:15]:     164:
[11:09:15]:     165:	    # Get latest certs appstore
[11:09:15]:  => 166:	    match(type: 'appstore')
[11:09:15]:     167:
[11:09:15]: ```
[11:09:15]:
<title>503 Service Temporarily Unavailable</title>

503 Service Temporarily Unavailable

Apple

Tried removing ~/.fastlane/spaceship but still get the same 503 error.
gemfile:
gem 'fastlane-sirp', :git => "https://github.com/fastlane/fastlane-sirp"
removed the spaceship dir
bundle clean --force
bundle install --redownload
bundle exec fastlane
See:
Successfully decrypted certificates repo
Verifying that the certificate and profile are still valid on the Dev Portal
Called from Fastfile at line 166
[12:11:09]: ```
[12:11:09]:     164:
[12:11:09]:     165:	    # Get latest certs appstore
[12:11:09]:  => 166:	    match(type: 'appstore')

503 Service Temporarily Unavailable

503 Service Temporarily Unavailable
Apple

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

removed the spaceship dir
bundle clean --force
bundle install --redownload
bundle exec fastlane

My cert is currently expired, so I am trying to update it from appstore connect.
For me I have completed all the steps, I used to get the 503 error, but now I do not.
sudo bundle exec fastlane match appstore
Instead I am getting an authenticated error when fastlane tries to login via apple to check the certs.
The login credentials for '*****' seem to be wrong.

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

removed the spaceship dir
bundle clean --force
bundle install --redownload
bundle exec fastlane

My cert is currently expired, so I am trying to update it from appstore connect.
For me I have completed all the steps, I used to get the 503 error, but now I do not.
sudo bundle exec fastlane match appstore
Instead I am getting an authenticated error when fastlane tries to login via apple to check the certs.
The login credentials for '*****' seem to be wrong.

Uh... I tried running some match stuff on my side with the new branch and it works fine! But I also didn't need to gem 'fastlane-sirp', :git => "https://github.com/fastlane/fastlane-sirp" so if there might actually be an issue there that is causing this? 🤔

@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.
Any other suggestions?
Thanks for your work on this.

@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 https://github.com/fastlane/fastlane/pull/26415/commits/bf6d7bf4b14d60f787a13d18b09259693b1f27f1 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

@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.

@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 😇

@joshdholtz Thank you Josh! ✨

✨ 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?

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

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 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

Still getting the same error on fastlane spaceauth -u

Still getting the same error on fastlane spaceauth -u

@waseemsarwar57 Please update to the latest version. You are still using 2.224.0 as can be seen from the error message.

For some reason it's not working for me too. It's 2.225.0 version

@waseemsarwar57 Please update to the latest version. You are still using 2.224.0 as can be seen from the error message.

Thanks @max-ott , i have tried by updating to 2.225.0 too, however same issue,
additional  i also did these
unset FASTLANE_SESSION
export FASTLANE_PASSWORD='my developer account password'
rm -r ~/.fastlane/spaceship
bundle clean --force
bundle install --redownload
bundle exec fastlane

Any further hint to resolve it would be appreciated.

@waseemsarwar57 You are definitely not using bundle exec... Please read the error message. It provides you exactly what to do... `bundle exec fastlane spaceauth ....."

Works again, thanks!

@waseemsarwar57 You are definitely not using bundle exec... Please read the error message. It provides you exactly what to do... `bundle exec fastlane spaceauth ....."

Unfortunately using bundle exec fastlane spaceauth -u mydeveloperaccountid results the same error, may be its some caching issue which is not getting clear,

Still get "Access forbidden" error
fastlane 2.225.0

Works again, thanks!

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

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

after I updated to 2.225, still have the issue like this, so how can I fix it, please help me!
Session loaded from environment variable is not valid. Continuing with normal login.
The login credentials for 'xxxxl.com' seem to be wrong
Do you want to re-enter your password? (y/n)

Still get "Access forbidden" error fastlane 2.225.0

upd. My apple account has been blocked due to fastlane authorization bug. I unlocked it and the error returned to the same
"The login credentials for<EMAIL_ADDRESS>seem to be wrong
Do you want to re-enter your password? (y/n)"

✨ 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 😬

✨ 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.

same here

✨ 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

still getting the same error

Hi, I am facing the same issue. I have tried clearing the cache, but it's all in vain. I haven't found a solution yet.

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.

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.

You can unlock your account here: account.apple.com. Just follow the instructions
After that, you should generate a new an app-specific password if you use it in fastlane env.

I updated to version 2.225.0, and it worked correctly without needing to enter the password, which suggests that it might have been cached. I'm not sure, but this could indicate that the issue others are experiencing might be related to the password handling.
Thanks for the quick resolution of the issue! @joshdholtz

@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. 🤔

@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?

✨ Official Response 7
For anybody seeing errors with 2.225.0, are you using your Apple ID and its password? Or are you using an App Specific password? I see a lot about an App Specific password and curious if that is what everyone is using 🤔
I'm not able to reproduce what you are all seeing so I don't know where to even start with debugging 😬

How exactly should the cache be cleared? @alexito4 @IlliaHryshkevych
Even after running rm ~/.fastlane/spaceship/*, I can still log in by just providing my Apple ID, without being prompted for a password. The only thing that’s requested is the two-factor authentication (2FA) code:
Logging into to App Store Connect (my@email.com)...
Two-factor Authentication (6 digits code) is enabled for account<EMAIL_ADDRESS>More information about Two-factor Authentication: https://support.apple.com/en-us/HT204915

For context, I’m not using an App Specific Password, just the regular Apple ID password.

✨ Official Response 7
For anybody seeing errors with 2.225.0, are you using your Apple ID and its password? Or are you using an App Specific password? I see a lot about an App Specific password and curious if that is what everyone is using 🤔
I'm not able to reproduce what you are all seeing so I don't know where to even start with debugging 😬

I am not even entirely certain (I set this up back in 2018 and have not had a need to touch it since). Looks in my case like I fail when calling match like so:
match(git_url: "https://github.com/...",
git_branch: File.read("./teamID.txt"),
username: ",
app_identifier: File.read(appPath + "/appID.txt"),
team_id: File.read("./teamID.txt"),
type: "appstore"
)
So I think my Apple ID and password pulled from keychain? I dont see any password anything in any of my files (Fastfile, Gymfile, etc). I am on occasionally prompted for 2FA in the past, but that is not happening right now with this error. I thought maybe passing read_only:true in my Match call might help, but that did not help.

Updating to 2.225.0 fixed the issue.
I'm using the Apple ID and its password.
P.S. Do not set FASTLANE_USE_LEGACY_PRE_SIRP_AUTH to true.

✨ Official Response 7
For anybody seeing errors with 2.225.0, are you using your Apple ID and its password? Or are you using an App Specific password? I see a lot about an App Specific password and curious if that is what everyone is using 🤔
I'm not able to reproduce what you are all seeing so I don't know where to even start with debugging 😬

Here is my story. I had 2.219 and received this error with 503 status code. This environment was already used for couple of years.
After the fix, I have uninstalled my fastlane with brew and installed it with gem. Issue about 503 is gone, but it keeps rejecting my password and locked my account.
I have tried both passwords and tried entering it in the prompt and also setting it with export FASTLANE_PASSWORD="mypassword".
Probably, I need to reset/remove all the cache/sessions and reinstall the fastlane. Will let you know the result

2.225.0 fastlane spaceauth successfully logs in and generates a new FASTLANE_SESSION

✨ Official Response 8
This is soooooo frustrating 😩 I have no idea why this is happening to you all. The only thing I think of is maybe this change is properly propagated the world? Maybe something needs to change depending on where people are located? Not really sure...

fastlane puts your password in your keychain so that is where that pulls from
sessions are cached in ~/.fastlane/spaceship for reuse
If 2FA is not being hit, this means that the second/final SRP call to https://idmsa.apple.com/appleauth/auth/signin/complete?isRememberMeEnabled=true isn't succeeding (which is probably where the Access Forbidden might be coming from????

I'm trying to figure out how to best debug this since it's not failing for me.
Thoughts
QUESTIONS FOR EVERYONE HAVING ISSUES:

Do you all have these endpoints in your browser inspector when you try to sign in to the Developer Center? 👀
What country are you all signing in from?
Are these all App Store accounts or Enterprise accounts?
For anybody that is seeing errors, does fastlane spaceauth work at all? I'm trying to understand if its the auth end points that are failing or if its other endpoints after being authed

Init
Complete

✨ Official Response 8
This is soooooo frustrating 😩 I have no idea why this is happening to you all. The only thing I think of is maybe this change is properly propagated the world? Maybe something needs to change depending on where people are located? Not really sure...

fastlane puts your password in your keychain so that is where that pulls from
sessions are cached in ~/.fastlane/spaceship for reuse
If 2FA is not being hit, this means that the second/final SRP call to https://idmsa.apple.com/appleauth/auth/signin/complete?isRememberMeEnabled=true isn't succeeding (which is probably where the Access Forbidden might be coming from????

I'm trying to figure out how to best debug this since it's not failing for me.
Thoughts
QUESTIONS FOR EVERYONE HAVING ISSUES:

Do you all have these endpoints in your browser inspector when you try to sign in to the Developer Center? 👀
What country are you all signing in from?
Are these all App Store accounts or Enterprise accounts?
For anybody that is seeing errors, does fastlane spaceauth work at all? I'm trying to understand if its the auth end points that are failing or if its other endpoints after being authed

Init	Complete

First of all, THANK YOU for helping.

Yes. I see https://idmsa.apple.com/appleauth/auth/signin/complete?isRememberMeEnabled=true
U.S.
All of mine are Enterprise, yes.
fastlane spaceauth fails for me with the same error: [!] The request could not be completed because:
Invalid username and password combination. Used '' as the username.

I use an app id and password (stored in keychain). Not an app specific password. This has been working flawlessly for years.

All of mine are Enterprise, yes.

Okay, this is the only fishy thing here that is different than mine 🤔 I know this is a big ask but... would you be able to add me as a user (temporarily) to your Enterprise account? 😬 I know that this is a big ask from an internet stranger 😅 Not sure if there are some super minimal permissions you could give me 🤷♂

All of mine are Enterprise, yes.

@crweaver225 Okay, this is the only fishy thing here that is different than mine 🤔 I know this is a big ask but... would you be able to add me as a user (temporarily) to your Enterprise account? 😬 I know that this is a big ask from an internet stranger 😅 Not sure if there are some super minimal permissions you could give me 🤷♂

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

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 discussions or issues 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 🙏

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 :)

@joshdholtz

Yes
Canada
I have an app store account

tamimchowdhury@Tamims-MacBook-Pro-2 ios % fastlane spaceauth
[✔] 🚀
[18:11:45]: fastlane detected a Gemfile in the current directory
[18:11:45]: However, it seems like you didn't use bundle exec
[18:11:45]: To launch fastlane faster, please use
[18:11:45]:
[18:11:45]: $ bundle exec fastlane spaceauth
[18:11:45]:
[18:11:45]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
Logging into to App Store Connect (TamimChowdhury@live.com)...
The login credentials for<EMAIL_ADDRESS>seem to be wrong
The password was taken from the environment variable
Please make sure it is correct
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: Spaceship::InvalidUserCredentialsError
Looking for related GitHub issues on fastlane/fastlane...
Found no similar issues. To create a new issue, please visit:
https://github.com/fastlane/fastlane/issues/new
Run fastlane env to append the fastlane environment to your issue
[!] The request could not be completed because:
Invalid username and password combination. Used<EMAIL_ADDRESS>as the username.

@TamimC Would you be able to try running fastlane spaceauth --verbose so we can see how far its getting in the SRP process? Adding --verbose should print out logs after it passes the "init" and the "complete" so curious how far you are making it in there

tamimchowdhury@Tamims-MacBook-Pro-2 ios % fastlane spaceauth --verbose
fastlane spaceauth --verbose
[✔] 🚀
[18:43:39]: fastlane detected a Gemfile in the current directory
[18:43:39]: However, it seems like you didn't use `bundle exec`
[18:43:39]: To launch fastlane faster, please use
[18:43:39]:
[18:43:39]: $ bundle exec fastlane spaceauth --verbose
[18:43:39]:
[18:43:39]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
Successfully loaded Appfile at path '/Users/tamimchowdhury/Desktop/Projects/socialcloset/ios/fastlane/Appfile'
- app_identifier: 'io.socialcloset'
- apple_id<EMAIL_ADDRESS>- itc_team_id: '126528062'
- team_id: '6G98MFUD8H'
-------
Logging into to App Store Connect (TamimChowdhury@live.com)...
Reading keychain entry, because either user or password were empty
Starting SIRP Apple ID login
Received SIRP signin init response: {"iteration"=>20367, "salt"=>"+bWfRs3/ICAmkpg1TblKCQ==", "protocol"=>"s2k", "b"=>"H9x2V+4lcDDfFxEbtP6Iz1YxQ+kVyvZt6PA6N9DBB2dAp0IFmtFQTDEDDKNJ2NaL+0F94b7bi3li1hp7Be0ET5HSEd1pJhhAfz4b/asyl+G4QgJpDrHf02BPoaSRsXtrtPvTnlPTOFVcGGwa9hM5sTnKiifOuLqcCmaDU9DczK+Erm/abVb7IqrWA5qoQQZdfr29ouLoagkImp7L7Wx3qBzRr0mcK5Js+VzwI62YGSz0LJ8Up2QS/VWr8RA1dI8XfO1gJJxnwIDco+Vi0ASIX5pkiWPKixHA1sZm3hMXSPvjib4GNweosjBee5VxqW/Cy5wWSCag/kg5XvdarqH7IQ==", "c"=>"d-14-eae52c01-8ffd-11ef-823e-d3513746bc2f:MSA"}
The login credentials for<EMAIL_ADDRESS>seem to be wrong
The password was taken from the environment variable
Please make sure it is correct
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: Spaceship::InvalidUserCredentialsError

Looking for related GitHub issues on fastlane/fastlane...
Search query: The request could not be completed because:
        Invalid username and password combination. Used<EMAIL_ADDRESS>as the username.

URL: https://api.github.com/search/issues?q=The%20request%20could%20not%20be%20completed%20because%3A%0A%09Invalid%20username%20and%20password%20combination.%20Used%20%27TamimChowdhury%40live.com%27%20as%20the%20username.+repo:fastlane/fastlane
Found no similar issues. To create a new issue, please visit:
https://github.com/fastlane/fastlane/issues/new
Run `fastlane env` to append the fastlane environment to your issue
/opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:578:in `rescue in send_shared_login_request': [!] The request could not be completed because: (Spaceship::InvalidUserCredentialsError)
        Invalid username and password combination. Used<EMAIL_ADDRESS>as the username.
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:556:in `send_shared_login_request'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/tunes/tunes_client.rb:130:in `send_login_request'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:955:in `do_login'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:394:in `login'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:355:in `login'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/tunes/spaceship.rb:24:in `login'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/spaceauth_runner.rb:20:in `run'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/commands_generator.rb:46:in `block (2 levels) in run'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/commands_generator.rb:52:in `run'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/commands_generator.rb:15:in `start'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/fastlane/lib/fastlane/cli_tools_distributor.rb:115:in `take_off'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/bin/fastlane:23:in `<top (required)>'
        from /opt/homebrew/lib/ruby/gems/3.3.0/bin/fastlane:25:in `load'
        from /opt/homebrew/lib/ruby/gems/3.3.0/bin/fastlane:25:in `'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:1052:in `handle_error': Unauthorized Access (Spaceship::UnauthorizedAccessError)
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:1033:in `block in send_request'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:788:in `with_retry'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:1029:in `send_request'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:873:in `request'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:511:in `do_sirp'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:652:in `perform_login_method'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:576:in `send_shared_login_request'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/tunes/tunes_client.rb:130:in `send_login_request'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:955:in `do_login'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:394:in `login'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:355:in `login'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/tunes/spaceship.rb:24:in `login'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/spaceauth_runner.rb:20:in `run'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/commands_generator.rb:46:in `block (2 levels) in run'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/commands_generator.rb:52:in `run'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/commands_generator.rb:15:in `start'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/fastlane/lib/fastlane/cli_tools_distributor.rb:115:in `take_off'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/bin/fastlane:23:in `<top (required)>'
        from /opt/homebrew/lib/ruby/gems/3.3.0/bin/fastlane:25:in `load'
        from /opt/homebrew/lib/ruby/gems/3.3.0/bin/fastlane:25:in `'

@TamimC Very interesting... This is a very weird question to ask on the internet in a public forum but... does your password have any special characters or spaces or anything in it? 🤔

No spaces, some special characters.

I will change it after this conversation lol...
It is just an exclamation mark.

I will change it after this conversation lol... It is just an exclamation mark.

Ha, thank you! I'll try a password with an exclamation mark on mine to see if I get this same failure 🤷

Just more info, I havent played with this setup in a while because it was just working.
But I do remember that fastlane used to send me prompts for 2FA on my other apple devices.
Now it does not. I think thats the issue, the second call is throwing a 409.
On the apple website, it throws the 409 and then asks me to confirm with a token from my other apple devices.

Just more info, I havent played with this setup in a while because it was just working.
But I do remember that fastlane used to send me prompts for 2FA on my other apple devices. Now it does not. I think thats the issue, the second call is throwing a 409.
On the apple website, it throws the 409 and then asks me to confirm with a token from my other apple devices.

@TamimC 409 is what I would expect! If it succeeded it should log Completed SIRP authentication with status of 409 but its not. So I'm curious if special characters are causing issues with the hashing which is why its showing invalid credentials 🤔

✨ Official Response 8
This is soooooo frustrating 😩 I have no idea why this is happening to you all. The only thing I think of is maybe this change is properly propagated the world? Maybe something needs to change depending on where people are located? Not really sure...

fastlane puts your password in your keychain so that is where that pulls from
sessions are cached in ~/.fastlane/spaceship for reuse
If 2FA is not being hit, this means that the second/final SRP call to https://idmsa.apple.com/appleauth/auth/signin/complete?isRememberMeEnabled=true isn't succeeding (which is probably where the Access Forbidden might be coming from????

I'm trying to figure out how to best debug this since it's not failing for me.
Thoughts
QUESTIONS FOR EVERYONE HAVING ISSUES:

Do you all have these endpoints in your browser inspector when you try to sign in to the Developer Center? 👀
What country are you all signing in from?
Are these all App Store accounts or Enterprise accounts?
For anybody that is seeing errors, does fastlane spaceauth work at all? I'm trying to understand if its the auth end points that are failing or if its other endpoints after being authed

Init	Complete

Russia
App Store account
fastlane spaceauth not working at all (now I've got error "The request could not be completed because:
Access forbidden", probably apple blocked my account again.)

@TamimC Very interesting... This is a very weird question to ask on the internet in a public forum but... does your password have any special characters or spaces or anything in it? 🤔

My password contains only letters and numbers.

All of mine are Enterprise, yes.

@crweaver225 Okay, this is the only fishy thing here that is different than mine 🤔 I know this is a big ask but... would you be able to add me as a user (temporarily) to your Enterprise account? 😬 I know that this is a big ask from an internet stranger 😅 Not sure if there are some super minimal permissions you could give me 🤷♂

Unfortunately, these are client developer accounts that I do not have the account permissions to send invites for. My password does not have any special characters which makes me think that might not be the issue.

@DmitryKhristenko @crweaver225 NOOOOOOOOOO... I was hoping it was as simple as that 😩 Well... back to being stumped 🤷♂

@joshdholtz
I think I see the issue:
 def do_sirp(user, password, modified_cookie)
      require 'fastlane-sirp'
      require 'base64'

      client = SIRP::Client.new(2048)
      a = client.start_authentication

      data = {
        a: Base64.strict_encode64(to_byte(a)),
        accountName: user,
        protocols: ['s2k', 's2k_fo']
      }

      response = request(:post) do |req|
        req.url("https://idmsa.apple.com/appleauth/auth/signin/init")
        req.body = data.to_json
        req.headers['Content-Type'] = 'application/json'
        req.headers['X-Requested-With'] = 'XMLHttpRequest'
        req.headers['X-Apple-Widget-Key'] = self.itc_service_key
        req.headers['Accept'] = 'application/json, text/javascript'
        req.headers["Cookie"] = modified_cookie if modified_cookie
      end

      puts("Received SIRP signin init response: #{response.body}") if Spaceship::Globals.verbose?

      body = response.body
      iterations = body["iteration"]
      salt = Base64.strict_decode64(body["salt"])
      b = Base64.strict_decode64(body["b"])
      c = body["c"]

      key_length = 32
      encrypted_password = pbkdf2(password, salt, iterations, key_length)

      m1 = client.process_challenge(
        user,
        to_hex(encrypted_password),
        to_hex(salt),
        to_hex(b),
        is_password_encrypted: true
      )
      m2 = client.H_AMK

      if m1 == false
        puts("Error processing SIRP challenge") if Spaceship::Globals.verbose?
        raise SIRPAuthenticationError
      end

      data = {
        accountName: user,
        c: c,
        m1: Base64.encode64(to_byte(m1)).strip,
        m2: Base64.encode64(to_byte(m2)).strip,
        rememberMe: false
      }

      hashcash = self.fetch_hashcash

      response = request(:post) do |req|
        req.url("https://idmsa.apple.com/appleauth/auth/signin/complete?isRememberMeEnabled=false")
        req.body = data.to_json
        req.headers['Content-Type'] = 'application/json'
        req.headers['X-Requested-With'] = 'XMLHttpRequest'
        req.headers['X-Apple-Widget-Key'] = self.itc_service_key
        req.headers['Accept'] = 'application/json, text/javascript'
        req.headers["Cookie"] = modified_cookie if modified_cookie
        req.headers["X-Apple-HC"] = hashcash if hashcash
      end

      puts("Completed SIRP authentication with status of #{response.status}") if Spaceship::Globals.verbose?

      return response
    end

I think here somewhere you are getting an exception and therefore immediately throwing 403.
It never has a chance to get to this block:
 case response.status       when 403         raise InvalidUserCredentialsError.new, "Invalid username and password combination. Used '#{user}' as the username."       when 200         fetch_olympus_session         return response       when 409         # 2 step/factor is enabled for this account, first handle that         handle_two_step_or_factor(response)         # and then get the olympus session         fetch_olympus_session         return true       else ....

 By adding --verbose, it should log the response body from Apple on 401 and 403 so we can see what the actual error giving us is.

Update Gemfile and run bundle install, bundle update fastlane, or bundle update
gem "fastlane", :git => "https://github.com/fastlane/fastlane.git", :branch => "log-auth-errors"

@TamimC Would you be able to test #26601 for me when you get a chance? By adding --verbose, it should log the response body from Apple on 401 and 403 so we can see what the actual error giving us is.
Update Gemfile and run bundle install, bundle update fastlane, or bundle update
gem "fastlane", :git => "https://github.com/fastlane/fastlane.git", :branch => "log-auth-errors"

Running with that branch this is the error I get:
INFO [2024-10-22 01:57:18.95]: Starting login with user<EMAIL_ADDRESS>Reading keychain entry, because either user or password were empty
Loading session from<EMAIL_ADDRESS>Received 401 with Unauthenticated
Request ID: PUY6AEPIE2RKTP5T3SDYOQ6K6M.0.0
Available session is not valid anymore. Continuing with normal login.
Loading session from environment variable
Received 401 with Unauthenticated
Request ID: R5VCZX2IJKPKODEVN2VNLOJQSI.0.0
Session loaded from environment variable is not valid. Continuing with normal login.
Starting SIRP Apple ID login
Received SIRP signin init response:
<title>503 Service Temporarily Unavailable</title>

503 Service Temporarily Unavailable

Apple

Looking for related GitHub issues on fastlane/fastlane...
Search query: undefined method `unpack1' for nil
    str.unpack1("m0")
       ^^^^^^^^
URL: https://api.github.com/search/issues?q=undefined%20method%20%60unpack1%27%20for%20nil%0A%0A%20%20%20%20str.unpack1%28%22m0%22%29%0A%20%20%20%20%20%20%20%5E%5E%5E%5E%5E%5E%5E%5E+repo:fastlane/fastlane
➡  undefined method `unpack1' for nil (NoMethodError) in 2.225.0```

@TamimC Would you be able to test #26601 for me when you get a chance? By adding --verbose, it should log the response body from Apple on 401 and 403 so we can see what the actual error giving us is.
Update Gemfile and run bundle install, bundle update fastlane, or bundle update
gem "fastlane", :git => "https://github.com/fastlane/fastlane.git", :branch => "log-auth-errors"

@joshdholtz  Didn't seem to work for me. I was also getting the errors on 2.225 where it kept rejecting my password "Do you want to re-enter your password?".
I updated the gem to the version you listed (at log-auth-errors@f41446f) but still get same error.
I tried unset FASTLANE_PASSWORD, unset FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD, and unset FASTLANE_SESSION but still no luck
--verbose log (edited slightly to hide details)
Reading keychain entry, because either user or password were empty
Starting SIRP Apple ID login
Received SIRP signin init response: {"iteration"=>20540, "salt"=>"mJsJvREDACTEDsg==", "protocol"=>"s2k", "b"=>"JsskOSIHGyREDACTEDREDACTEDxrt6IaBUCSAifL5mA==", "c"=>"REDACTED-9365-db827ddac7d:PRN"}
The login credentials for<EMAIL_ADDRESS>seem to be wrong
Do you want to re-enter your password? (y/n)

@D3icidal Weird... did you run fastlane spaceauth --verbose? Or were you running some lane? And if so, were you attempting to upload a binary?

Space auth
tamimchowdhury@Tamims-MacBook-Pro-2 ios % fastlane spaceauth --verbose

[✔] 🚀
[21:53:52]: fastlane detected a Gemfile in the current directory
[21:53:52]: However, it seems like you didn't use `bundle exec`
[21:53:52]: To launch fastlane faster, please use
[21:53:52]:
[21:53:52]: $ bundle exec fastlane spaceauth --verbose
[21:53:52]:
[21:53:52]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
Successfully loaded Appfile at path '/Users/tamimchowdhury/Desktop/Projects/socialcloset/ios/fastlane/Appfile'
- app_identifier: '*******'
- apple_id: '*******'
- itc_team_id: '*******'
- team_id: '*******'
-------
Logging into to App Store Connect ('*******')...
Reading keychain entry, because either user or password were empty
Starting SIRP Apple ID login
Received SIRP signin init response: {"iteration"=>20367, "salt"=>"+bWfRs3/ICAmkpg1TblKCQ==", "protocol"=>"s2k", "b"=>"W7FyVHvseTD8mPTacD/Mu4s8Z41jk13CRiNBjxY9vui4Yd9IBGKT68FKoMaKtDbqeJdRIjXYvPsNUC2ZGRTFPqugUc1l3sp4KExCAQ5MC+KhsrM+RJYS2Gu+kXpirB1h4XrLzIpFvZrtu4WzH5RUCSOvIs/gytFo6S0aTZ4sQwmSDpdzwn4KCKH8H8rZdmuQynb3zHmer559+BsjDsqmKVtJO45VLNTk0yWcKI9/nZ6VRQ2YpstM+AR68cvSvxfdZcsaInsCwVb+FZGYIVE0KvkL/bVNd/WoDmyjZuy3uTyT+akp3y3ZsQVu+6X6OEm5ebL9cLwqchUAGwK8r/O1rw==", "c"=>"d-14-7dcaebcb-9018-11ef-a846-6f67a0181ff1:RNO"}
The login credentials for ''*******'' seem to be wrong
The password was taken from the environment variable
Please make sure it is correct
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: Spaceship::InvalidUserCredentialsError

Looking for related GitHub issues on fastlane/fastlane...
Search query: The request could not be completed because:
        Invalid username and password combination. Used '*******' as the username.

URL: https://api.github.com/search/issues?q=The%20request%20could%20not%20be%20completed%20because%3A%0A%09Invalid%20username%20and%20password%20combination.%20Used%20%27TamimChowdhury%40live.com%27%20as%20the%20username.+repo:fastlane/fastlane
➡  Apple ID auth not working - 503 Service Temporarily Unavailable on various fastlane modules
    https://github.com/fastlane/fastlane/issues/26368 [open] 117 💬
    43 minutes ago

🔗  You can ⌘ + double-click on links to open them directly in your browser.
/opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:578:in `rescue in send_shared_login_request': [!] The request could not be completed because: (Spaceship::InvalidUserCredentialsError)
        Invalid username and password combination. Used<EMAIL_ADDRESS>as the username.
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:556:in `send_shared_login_request'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/tunes/tunes_client.rb:130:in `send_login_request'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:955:in `do_login'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:394:in `login'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:355:in `login'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/tunes/spaceship.rb:24:in `login'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/spaceauth_runner.rb:20:in `run'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/commands_generator.rb:46:in `block (2 levels) in run'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/commands_generator.rb:52:in `run'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/commands_generator.rb:15:in `start'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/fastlane/lib/fastlane/cli_tools_distributor.rb:115:in `take_off'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/bin/fastlane:23:in `<top (required)>'
        from /opt/homebrew/lib/ruby/gems/3.3.0/bin/fastlane:25:in `load'
        from /opt/homebrew/lib/ruby/gems/3.3.0/bin/fastlane:25:in `'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:1052:in `handle_error': Unauthorized Access (Spaceship::UnauthorizedAccessError)
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:1033:in `block in send_request'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:788:in `with_retry'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:1029:in `send_request'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:873:in `request'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:511:in `do_sirp'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:652:in `perform_login_method'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:576:in `send_shared_login_request'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/tunes/tunes_client.rb:130:in `send_login_request'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:955:in `do_login'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:394:in `login'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/client.rb:355:in `login'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/tunes/spaceship.rb:24:in `login'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/spaceauth_runner.rb:20:in `run'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/commands_generator.rb:46:in `block (2 levels) in run'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/commands_generator.rb:52:in `run'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/spaceship/lib/spaceship/commands_generator.rb:15:in `start'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/fastlane/lib/fastlane/cli_tools_distributor.rb:115:in `take_off'
        from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.225.0/bin/fastlane:23:in `<top (required)>'
        from /opt/homebrew/lib/ruby/gems/3.3.0/bin/fastlane:25:in `load'
        from /opt/homebrew/lib/ruby/gems/3.3.0/bin/fastlane:25:in `'

@joshdholtz fastlane spaceauth -u<EMAIL_ADDRESS>--verbose
@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

@joshdholtz
MB, updated the version incorrectly!
Starting SIRP Apple ID login
Received SIRP signin init response: {"iteration"=>20367, "salt"=>"+bWfRs3/ICAmkpg1TblKCQ==", "protocol"=>"s2k", "b"=>"eKFy3vrt3txrVIph2J0Q2U7LWsSH4FxV81qDdxREp2JspKVu8x4a5BMnF56Iw9XDs2QXBaWYB1L2kh/qGJVmiF4jKsImudADTJfY/je+hQyhjkPYuRz+ejNQQPOFrmDyxVk/ok0p2QQ2kqXPB6NZ1TN0jH2GlsGhUanASbkfqhYpIVn4Lzm0S2qBLq4hr225bR7kH/x/wZzplFFR5iB+b897BKNnBuWLUvVwvoCPwYwVUS5j+FFI14t7nuxRnlcRWbhcY2bsXBTGc6s+bQ/eh8HBXOAUl6ATeeAaFq1ROlM0Nh2V6aRuOE4I17LjLCCnVAF4LyWEN/vpFkVxHa0gVw==", "c"=>"d-14-ea6e0755-901f-11ef-a689-a3275b057b3f:RNO"}
Received 401 with {"serviceErrors"=>[{"code"=>"-20101", "message"=>"Enter the email or phone number and password for your Apple Account.", "suppressDismissal"=>false}]}
The login credentials for<EMAIL_ADDRESS>seem to be wrong
Do you want to re-enter your password? (y/n)

@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 😕
@TamimC  Are you using -u? And if so, could you try without?

@D3icidal That is awesome news that you got it! But now... we need to figure out exactly why 😆
I did also just update my log-auth-errors branch again and explicitly NOT sending up any cookies (even though they should have been cleared). I'm curious if that may have been the issue 🤔
@TamimC Would you be able to try with my latest commit? 🙏

tamimchowdhury@Tamims-MacBook-Pro-2 ios % bundle exec fastlane spaceauth --verbose
[⠙] 🚀 /opt/homebrew/lib/ruby/gems/3.3.0/gems/httpclient-2.8.3/lib/httpclient/auth.rb:11: warning: mutex_m was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add mutex_m to your Gemfile or gemspec. Also contact author of httpclient-2.8.3 to add mutex_m into its gemspec.
[⠹] 🚀 /opt/homebrew/lib/ruby/gems/3.3.0/gems/highline-2.0.3/lib/highline.rb:17: warning: abbrev was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add abbrev to your Gemfile or gemspec. Also contact author of highline-2.0.3 to add abbrev into its gemspec.
[✔] 🚀
Successfully loaded Appfile at path '/Users/tamimchowdhury/Desktop/Projects/socialcloset/ios/fastlane/Appfile'

app_identifier: '*******'
apple_id<EMAIL_ADDRESS>itc_team_id:  '*******'
team_id:  '*******'

Logging into to App Store Connect (TamimChowdhury@live.com)...
Reading keychain entry, because either user or password were empty
Starting SIRP Apple ID login
Received SIRP signin init response: {"iteration"=>20367, "salt"=>"+bWfRs3/ICAmkpg1TblKCQ==", "protocol"=>"s2k", "b"=>"VV4oGg1nitPVB9TIWwaT6J0wUP5xQLDHqOMyscfplijzDgccHTQiLO3jeKxr7C0GUX7RfJeo5Z5Va8hBCtgaLAA9BPnBMR7p8Gmg7xFtB02JzcgGsD7UQhJuam5gvw6glc4IBAxk4ci0Va/dT7TQNDzk/vRu3wxAkG6AthIZ73HUscdEefbxcWHBNBTrsuUdUsYab3j43pg7zGdM6VGZmHsCJqQIuV3LTdnb9c6cgB+XYkzslxCNgN7eRwLFSP8IKO/GHItNNiaIYXnUBhUQQymugKMk9YPUINGQRmB7jJIDPhkVzh4kSOfAGrED/AzsBk/5+9zihrTo5v12bhqThg==", "c"=>"d-14-160d904b-9022-11ef-87ab-fd43d952ce03:PRN"}
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
URL: https://api.github.com/search/issues?q=undefined method `body' for nil+repo:fastlane/fastlane
➡  Assistance Needed with Jira Action Method Error in Fastlane
https://github.com/fastlane/fastlane/issues/21717 [open] 3 💬
16 Jul 2024
➡  Apple ID auth not working - 503 Service Temporarily Unavailable on various fastlane modules
https://github.com/fastlane/fastlane/issues/26368 [open] 124 💬
5 minutes ago
➡  Remove XCPretty dependency and add xcbeautify as an option
https://github.com/fastlane/fastlane/pull/19629 [closed] 30 💬
24 Nov 2023
and 66 more at: https://github.com/fastlane/fastlane/search?q=undefined method `body' for nil&type=Issues&utf8=✓
🔗  You can ⌘ + double-click on links to open them directly in your browser.
bundler: failed to load command: fastlane (/opt/homebrew/lib/ruby/gems/3.3.0/bin/fastlane)
/opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/client.rb:578:in rescue in send_shared_login_request': [!] undefined method body' for nil (NoMethodError)
    puts("Received UnauthorizedAccessError(1) with #{response.body}") if Spaceship::Globals.verbose?
                                                             ^^^^^
    from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/client.rb:556:in `send_shared_login_request'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/tunes/tunes_client.rb:130:in `send_login_request'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/client.rb:958:in `do_login'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/client.rb:394:in `login'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/client.rb:355:in `login'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/tunes/spaceship.rb:24:in `login'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/spaceauth_runner.rb:20:in `run'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/commands_generator.rb:46:in `block (2 levels) in run'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/commands_generator.rb:52:in `run'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/commands_generator.rb:15:in `start'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/fastlane/lib/fastlane/cli_tools_distributor.rb:115:in `take_off'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/bin/fastlane:23:in `<top (required)>'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bin/fastlane:25:in `load'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bin/fastlane:25:in `<top (required)>'
    from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/bundler/cli/exec.rb:58:in `load'
    from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/bundler/cli/exec.rb:58:in `kernel_load'
    from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/bundler/cli/exec.rb:23:in `run'
    from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/bundler/cli.rb:451:in `exec'
    from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
    from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
    from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
    from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/bundler/cli.rb:34:in `dispatch'
    from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
    from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/bundler/cli.rb:28:in `start'
    from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.5.4/exe/bundle:28:in `block in <top (required)>'
    from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/bundler/friendly_errors.rb:117:in `with_friendly_errors'
    from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.5.4/exe/bundle:20:in `<top (required)>'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bin/bundle:25:in `load'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bin/bundle:25:in `'

/opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/client.rb:1056:in handle_error': Unauthorized Access (Spaceship::UnauthorizedAccessError)         from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/client.rb:1036:in block in send_request'
from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/client.rb:791:in with_retry'         from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/client.rb:1032:in send_request'
from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/client.rb:876:in request'         from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/client.rb:511:in do_sirp'
from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/client.rb:655:in perform_login_method'         from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/client.rb:576:in send_shared_login_request'
from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/tunes/tunes_client.rb:130:in send_login_request'         from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/client.rb:958:in do_login'
from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/client.rb:394:in login'         from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/client.rb:355:in login'
from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/tunes/spaceship.rb:24:in login'         from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/spaceauth_runner.rb:20:in run'
from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/commands_generator.rb:46:in block (2 levels) in run'         from /opt/homebrew/lib/ruby/gems/3.3.0/gems/commander-4.6.0/lib/commander/command.rb:187:in call'
from /opt/homebrew/lib/ruby/gems/3.3.0/gems/commander-4.6.0/lib/commander/command.rb:157:in run'         from /opt/homebrew/lib/ruby/gems/3.3.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in run_active_command'
from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in run!'         from /opt/homebrew/lib/ruby/gems/3.3.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in run!'
from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/commands_generator.rb:52:in run'         from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/spaceship/lib/spaceship/commands_generator.rb:15:in start'
from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/fastlane/lib/fastlane/cli_tools_distributor.rb:115:in take_off'         from /opt/homebrew/lib/ruby/gems/3.3.0/bundler/gems/fastlane-3f075e4fd2aa/bin/fastlane:23:in <top (required)>'
from /opt/homebrew/lib/ruby/gems/3.3.0/bin/fastlane:25:in load'         from /opt/homebrew/lib/ruby/gems/3.3.0/bin/fastlane:25:in <top (required)>'
from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/bundler/cli/exec.rb:58:in load'         from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/bundler/cli/exec.rb:58:in kernel_load'
from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/bundler/cli/exec.rb:23:in run'         from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/bundler/cli.rb:451:in exec'
from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor/command.rb:28:in run'         from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command'
from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor.rb:527:in dispatch'         from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/bundler/cli.rb:34:in dispatch'
from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor/base.rb:584:in start'         from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/bundler/cli.rb:28:in start'
from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.5.4/exe/bundle:28:in block in <top (required)>'         from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/bundler/friendly_errors.rb:117:in with_friendly_errors'
from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.5.4/exe/bundle:20:in <top (required)>'         from /opt/homebrew/lib/ruby/gems/3.3.0/bin/bundle:25:in load'
from /opt/homebrew/lib/ruby/gems/3.3.0/bin/bundle:25:in `'
tamimchowdhury@Tamims-MacBook-Pro-2 ios %

@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 😕
@TamimC Are you using -u? And if so, could you try without?

I am not using -u flag
I am running with some Fastfile that has my username in it

Is everyone using an app-specific password that was created via account.apple.com?

Is everyone using an app-specific password that was created via account.apple.com?

@lemonkey I was not. I used a regular password in the end

"I always thought that the 503 error was due to my network issues, but it turns out that the whole world is unable to verify identity?"

@D3icidal  Yea I tried with a regular password and now my account is locked :(

same

I am positively waiting for someone to update that everything is fixed in place 👍🏽

and after resetting my apple ID password, I can't log into anything because it's trying to send the 2fa code to a device that is no longer logged into the apple ID heh

@D3icidal Yea I tried with a regular password and now my account is locked :(

@lemonkey You should be able to reset it easily at https://account.apple.com/ without having to change your password

I had same problem, updating latest fastlane version  resolved the issue. I had to re authenticate with spaceship to generate new session.

Updating fastlane to version 2.225.0 worked for me.

Here are the steps that worked for me. I cannot replicate the issue so I can't confirm if it should work again, but I was logging my steps.
Need to update the gemfile inside 1 of your projects to have this: gem "fastlane", :git => "https://github.com/fastlane/fastlane.git", :branch => "log-auth-errors"
gem uninstall fastlane
bundle update fastlane
bundle clean
gem cleanup

Start a new terminal session to make sure that only the dev branch version of the gem is used
unset FASTLANE_PASSWORD
unset FASTLANE_APP_SPECIFIC_PASSWORD
unset FASTLANE_SESSION
unset FASTLANE_USE_LEGACY_PRE_SIRP_AUTH
bundle exec fastlane spaceauth --verbose

So at that point, I had no credentials saved in env or appfile. fastlane spaceauth -u<EMAIL_ADDRESS>actually caused it to fail for me

FYI I made sure that there were NO fastlane related environment variables set as well wiping any spaceship cookies.
With the latest 2.225.0 fastlane release 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
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: Spaceship::NoUserCredentialsError

Looking for related GitHub issues on fastlane/fastlane...
Search query: The request could not be completed because:
        No login data provided

It's not even prompting me for a password.

I just checked keychain access and noticed that with my previous attempt where I entered a bogus email address, the fake password I entered for<EMAIL_ADDRESS>got saved in my login keychain as<EMAIL_ADDRESS>After wiping the "deliver." from keychain access, running fastlane spaceauth --verbose prompted me for the password and then the 2FA popup appeared. After entering the code it successfully authenticated and recommended I store the latest session in a FASTLANE_SESSION env var.
Username: xxxxx
Logging into to App Store Connect (xxx)...
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
-------------------------------------------------------------------------------------
Password (for xxxxx): ********************
Starting SIRP Apple ID login
Received SIRP signin init response: {"iteration"=>20017, "salt"=>"pjr1EQgy2VWu7yzByn/HZw==", "protocol"=>"s2k", "b"=>"ZyN2u6FN6/KDdXQtAdO2/V5sHefHR5ihgGCH4tG+clu74k/IE3DYW4QrhM/mCk7M6FqrL/q1z1w8HltpqyCQHGw4ET9mRKok5zJJ8sBM6KbkTiN7zNOoV0UdfTXR31KCyvOm/1nn3J3TuPnlpknsZefPNiqimnxwg1Rzwon1h6tMPV+rVyeirV6qc6G9/9b8Cjf1h6vPoIJhKFdDBEVdv25h3r35ayan9KucHDqZUYWOX42XYmkCeC1AT/Qf3X/O5DvB17sWyQj5P/qIuCFhKmXFXWWYbS2shorBZu8ber8RHoeOilTy2moY95J6RLRccx2BOFnQc703oLpa9HJg1Q==", "c"=>"d-595-5d452a46-9097-11ef-a15a-8f4a9fd10eb1:PRN"}
Completed SIRP authentication with status of 409
Two-factor Authentication (6 digits code) is enabled for account 'xxxxx'
More information about Two-factor Authentication: https://support.apple.com/en-us/HT204915

If you're running this in a non-interactive session (e.g. server or CI)
check out https://github.com/fastlane/fastlane/tree/master/spaceship#2-step-verification

(Input `sms` to escape this prompt and select a trusted phone number to send the code as a text message)

(You can also set the environment variable `SPACESHIP_2FA_SMS_DEFAULT_PHONE_NUMBER` to automate this)
(Read more at: https://github.com/fastlane/fastlane/blob/master/spaceship/docs/Authentication.md#auto-select-sms-via-spaceship_2fa_sms_default_phone_number)

Please enter the 6 digit code:
xxxxxx
Requesting session...
Successfully logged in to App Store Connect

---

Pass the following via the FASTLANE_SESSION environment variable:

Other tools like fastlane match, etc. are now working for me again. 👍

Using all lowercase in my username resolved the issue for me

It seems to be working for me, but produce fails with a 501:
Creating App ID with produce... Done!
Enabling AppID services with produce...
[21:27:38]: Starting login with user 'goffredo.marocchi@<redacted>'
[21:27:40]: Successfully logged in
[21:27:40]: [DevCenter] App found '<redacted>'
[21:27:40]: Enabling services
[21:27:40]: 	Access WiFi

Looking for related GitHub issues on fastlane/fastlane...

➡  Get current build number  and current version number
    https://github.com/fastlane/fastlane/issues/501 [closed] 1 💬
    22 Sep 2016

➡  [gym] (Xcode 9 b6) Generated exportOptionsPlist bundle identifiers contain variables instead of actual bundle identifiers
    https://github.com/fastlane/fastlane/issues/10315 [closed] 74 💬
    11 Jan 2018

🔗  You can ⌘ + double-click on links to open them directly in your browser.

[!] The request could not be completed because:
	Server error got 501

False alarm... It seems like it is working now:
Creating App ID with produce... Done!
Enabling AppID services with produce...
[21:33:12]: Starting login with user 'goffredo.marocchi@<redacted>'
[21:33:13]: Successfully logged in
[21:33:14]: [DevCenter] App found '<redacted>'
[21:33:14]: Enabling services
[21:33:14]: 	Access WiFi
[21:33:15]: 	App Groups
[21:33:15]: 	Apple Pay
[21:33:16]: 	Associated Domains
[21:33:16]: 	AutoFill Credential
[21:33:17]: 	Push Notifications
[21:33:17]: Done! Enabled 6 services.
Enabling AppID services with produce... Done!
_MERCHANT_ID_DEV = "merchant.<redacted>.<redacted>.com.<redacted>"
Setting up merchant ID with produce...
[21:33:19]: Starting login with user 'goffredo.marocchi@<redacted>'
[21:33:20]: Successfully logged in
[21:33:22]: Validating merchants before association
[21:33:23]: Finalising association with 1 merchant
[21:33:24]: Done!
Setting up merchant ID with produce... Done!

Similar to @renfrenkel, I was able to successfully authenticate just once by using all lowercase for my apple id.
In my case it was with the "fastlane sigh" command to download provisioning profiles.
Instead of fastlane sigh download_all -u<EMAIL_ADDRESS>-l "xxxxx" -o build/profiles
I did fastlane sigh download_all -u<EMAIL_ADDRESS>-l "xxxxx" -o build/profiles and it worked as before.

I also was able to get Match to successfully work by using an all lowercase Apple ID. But now I error out on upload_to_app_store
[15:04:59]: Successfully loaded <redacted>/fastlane/Deliverfile' 📄
[15:04:59]: No values defined in './fastlane/Deliverfile'
[15:04:59]: To not be asked about this value, you can specify it using 'username'
[15:04:59]: Your Apple ID Username: <redacted>
[15:05:05]: Login to App Store Connect (christopher.weaver@<redacted>)
[15:05:07]: Login successful

[15:05:08]: Making sure the latest version on App Store Connect matches '6.16.03'...
[15:05:08]: '6.16.03' is the latest version on App Store Connect
[15:05:08]: Uploading binary to App Store Connect
[15:05:08]: Going to upload updated app to App Store Connect
[15:05:08]: This might take a few minutes. Please don't interrupt the script.
[15:05:10]: [altool] 2024-10-22 15:05:10.714 *** Error: Unable to upload archive. Failed to get authorization for username 'christopher.weaver@<redacted>' and password. (

[15:05:10]: [altool]     "Error Domain=ITunesConnectionOperationErrorDomain Code=-19000 \"Sign in with the app-specific password you generated. If you forgot the app-specific password or need to create a new one, go to appleid.apple.com\" UserInfo={NSLocalizedRecoverySuggestion=Sign in with the app-specific password you generated. If you forgot the app-specific password or need to create a new one, go to appleid.apple.com, NSLocalizedDescription=Sign in with the app-specific password you generated. If you forgot the app-specific password or need to create a new one, go to appleid.apple.com, NSLocalizedFailureReason=App Store operation failed.}"

[15:05:10]: [altool] ) (-1011)

[15:05:10]: [altool]  {

[15:05:10]: [altool]     NSLocalizedDescription = "Unable to upload archive.";

[15:05:10]: [altool]     NSLocalizedFailureReason = "Failed to get authorization for username 'christopher.weaver@<redacted>' and password. (\n    \"Error Domain=ITunesConnectionOperationErrorDomain Code=-19000 \\\"Sign in with the app-specific password you generated. If you forgot the app-specific password or need to create a new one, go to appleid.apple.com\\\" UserInfo={NSLocalizedRecoverySuggestion=Sign in with the app-specific password you generated. If you forgot the app-specific password or need to create a new one, go to appleid.apple.com, NSLocalizedDescription=Sign in with the app-specific password you generated. If you forgot the app-specific password or need to create a new one, go to appleid.apple.com, NSLocalizedFailureReason=App Store operation failed.}\"\n)";

[15:05:10]: [altool] }

[15:05:10]: Application Loader output above ^
[15:05:10]: Error uploading '/var/folders/vt/6qb_sbvd4fb4mql6mhb00lw80000gn/T/3f491e7b-62cc-47b1-8d7d-baad95d1ac8d.ipa'.
[15:05:10]: Unable to upload archive. Failed to get authorization for username 'christopher.weaver@<redacted>' and password. (
[15:05:10]: The call to the altool completed with a non-zero exit status: 1. This indicates a failure.
[15:05:10]: Could not download/upload from App Store Connect!

Very strange

Issue was resolved for me by using lowercase app id

Hi all, not sure whether this information will help anyone, I also had an issue with logging in with the account I used before. I tried specifying login and password in env variables, and in cli, normal password and app specific password, etc.
What helped me was to use another account. I have once again cleared all the information and used another account in fastlane spaceauth.
I asked account holder to create another user and delegage certificate management rights to him and everything went fine.

Lowercase in apple_id (email address) worked for me.
Uuuugghh, Apple...no comments.

Just for reference, all the issues and solutions explained here https://github.com/fastlane/fastlane/issues/26368#issuecomment-2428772689 were with a lowercase email so I doubt that is the solution. But happy it works for others, what a weird bug! ^^

joshdholtz

Hi @joshdholtz ,
I tried to use fastlane ver 2.225.0, but issue still remains. When I use this fix of you
gem "fastlane", :git => "https://github.com/fastlane/fastlane.git", :branch => "joshdholtz/apple-auth-sirp"
the issue goes away and then all other pipelines in CI machine starts without this fix for next 24 hours(or less), again next day same 503 error comes back. Do we have a permanent solution or an update on this is merged to master ?
Is it working for everyone(Anyone have this behaviour I mentioned)?

Krishna

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'm watching now
Available session is not valid anymore. Continuing with normal login.
The login credentials for<EMAIL_ADDRESS>seem to be wrong
Do you want to re-enter your password? (y/n)
Any ideas ?
fastlane v2.225.0, branch: master

I tried everything in this thread but nothing worked. Deleted ~/.fastlane, checked that there's nothing in my keychain, ran fastlane spaceauth --verbose.
It didn't work multiple times then I decided to change the password of the account. Previously the account had some special characters in the password. Now I created a long password without any special characters.
Now it worked.  This may be anectodal and random but maybe it helps someone.
Also again, check that your account isn't locked by going to https://account.apple.com developer.apple.com didn't show my account was locked while account.apple.com did.

Oh yeah am also getting the
Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired. Please log in." UserInfo={payload={
    creationTimestamp = "2024-10-23T15:15:56Z";
    httpCode = 200;
    protocolVersion = QH65B2;
    requestUrl = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action";
    responseId = "c8b2de7e-0931-4582-9ecc-1b3d9706387f";
    resultCode = 1100;
    resultString = "Your session has expired. Please log in.";
    userLocale = "en_US";
    userString = "Your session has expired. Please log in.";
}, NSLocalizedDescription=Your session has expired. Please log in.}

during archive now. Why is it even contacting Apple? I have everything already and I am doing an Ad-Hoc build.

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))

@TheRisa I was able to replicate it a couple of times now. To confirm, did you update your gem file with gem "fastlane", :git => "https://github.com/fastlane/fastlane.git", :branch => "log-auth-errors" then do a bundle install?
And since the fastlane version is in the bundle, I would recommend trying bundle exec fastlane run update_fastlane

unset FASTLANE_PASSWORD
unset FASTLANE_APP_SPECIFIC_PASSWORD
unset FASTLANE_SESSION
unset FASTLANE_USE_LEGACY_PRE_SIRP_AUTH
rm /Users/[USERNAME]/.fastlane/spaceship/[EMAIL]/cookie
bundle exec fastlane spaceauth --verbose

Can confirm this worked for me, before I kept getting invalid combination of user and password, when running bundle exec fastlane match with  version 2.225

unset FASTLANE_PASSWORD
unset FASTLANE_APP_SPECIFIC_PASSWORD
unset FASTLANE_SESSION
unset FASTLANE_USE_LEGACY_PRE_SIRP_AUTH
bundle exec fastlane spaceauth --verbose
Did the successful auth, after this was able to run
bundle exec fastlane match as well!

unset FASTLANE_PASSWORD
unset FASTLANE_APP_SPECIFIC_PASSWORD
unset FASTLANE_SESSION
unset FASTLANE_USE_LEGACY_PRE_SIRP_AUTH
rm /Users/[USERNAME]/.fastlane/spaceship/[EMAIL]/cookie
bundle exec fastlane spaceauth --verbose

Unfortunately none of these helped in my case with fastlane 2.225, it kept printing out The login credentials for <your-apple-id> seem to be wrong. Do you want to re-enter your password? (y/n). I've also tried removing deliver. entries from keychain as well as removing gem and other suggestions from this thread.
The only thing that helped me was changing my apple id's password. I guess it was extra cached somewhere in my system, but I could not find where 🤷

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？

I have tried all the examples here. but still fails

Do anyone know what is the appIdKey in
https://idmsa.apple.com/IDMSWebAuth/signin?appIdKey={Key}&path=%2Faccount%2F&rv=1

I have tried all the examples here. but still fails
What finally helped me was changing the password in my apple Id account

I have tried all the examples here. but still fails

What finally helped me was changing the password in my apple Id account

@TheRisa I was able to replicate it a couple of times now. To confirm, did you update your gem file with gem "fastlane", :git => "https://github.com/fastlane/fastlane.git", :branch => "log-auth-errors" then do a bundle install?
And since the fastlane version is in the bundle, I would recommend trying bundle exec commands, and mainly bundle exec fastlane spaceauth
I wonder if updating the password is the fix itself, or if it invalidates the saved cookie. I haven't looked into the cookie yet to see if there is something here

I tryed both ("https://github.com/fastlane/fastlane.git", :branch => "log-auth-errors" & vanilla install of 2.225.0), but none worked.
I'm going to try to change the psw, but the account owner is a client of mine. It may take some time

@TheRisa I was able to replicate it a couple of times now. To confirm, did you update your gem file with gem "fastlane", :git => "https://github.com/fastlane/fastlane.git", :branch => "log-auth-errors" then do a bundle install?
And since the fastlane version is in the bundle, I would recommend trying bundle exec commands, and mainly bundle exec fastlane spaceauth
I wonder if updating the password is the fix itself, or if it invalidates the saved cookie. I haven't looked into the cookie yet to see if there is something here

I tryed both ("https://github.com/fastlane/fastlane.git", :branch => "log-auth-errors" & vanilla install of 2.225.0), but none worked. I'm going to try to change the psw, but the account owner is a client of mine. It may take a while

Hello,
I'm facing the same problem, I tryed both  ("https://github.com/fastlane/fastlane.git", :branch => "log-auth-errors" & vanilla install of 2.225.0) and not worked. I had changed password too, but still not working.
When I'm using vanilla install of 2.225.0, I'm receiving this error message "The login credentials for  seem to be wrong. Do you want to re-enter your password? (y/n)".
When I'm using "https://github.com/fastlane/fastlane.git", :branch => "log-auth-errors") branch, I receive this error stack.

If I tried some times, my account is blocked and received 'Spaceship::AccessForbiddenError', 'Access forbidden' error message. And when I unlock my account, I receive the previous errors.

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.

[spaceship] New AppleID Auth with SRP (#26415) via Josh Holtz (@snatchev and @joshdholtz)

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

just upgraded to 2.225.0 and it worked ✅

I am able to confirm that I am able to replicate this a couple of times - if I downgrade to 2.224 and confirm that the fastlane cookies and fastlane_session are cleared.
But I  can confirm that like @davidmdt21  I have to make a new session at least once a day. Could possibly be 4-5 hours but I haven't tested it.
It's curious that case sensitivity matters for some people. Wondering if it has to do with the salt being combined with the username, and without downcasing everything the resulting hash doesn't match?

@TheRisa I was able to replicate it a couple of times now. To confirm, did you update your gem file with `gem
If I tried some times, my account is blocked and received 'Spaceship::AccessForbiddenError', 'Access forbidden' error message. And when I unlock my account, I receive the previous errors.

Delete the deliver password from your keychain.

Also I would recommend creating a new app-specific password for fastlane via account.apple.com.

For all of you that experience an invalid password message such as
The login credentials for<EMAIL_ADDRESS>seem to be wrong
Do you want to re-enter your password? (y/n)

The workaround of changing your password works.
I don't think it is a bug in fastlane.
The SRP ceremonial requires the client to send a salt and a precompute password verifier value to the server.  The server must store these value to later authenticate the client.
If your password is very old (pre SRP), it is likely that Apple servers did not receive these values for your password, hence can not authenticate you.  Changing the password allows the client to send these values to the server.
My password was 12 years old (yes, I know ...) no surprise it was not accepted in a SRP protocol.
Now that I have changed my password, the authentication on Fastlane works.

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 am still encountering this issue even though I have upgraded fastlane version to 2.225.5
This error message came from Jenkins pipeline
[08:21:03]: ------------------------------
[08:21:03]: --- Step: default_platform ---
[08:21:03]: ------------------------------
[08:21:03]: Driving the lane 'ios deploy_uat2_on_testflight' 🚀
[08:21:03]: ---------------------------------------
[08:21:03]: --- Step: app_store_connect_api_key ---
[08:21:03]: ---------------------------------------
[08:21:03]: ----------------------------------
[08:21:03]: --- Step: upload_to_testflight ---
[08:21:03]: ----------------------------------
[08:21:03]: Creating authorization token for App Store Connect API
[08:21:03]: Ready to upload new build to TestFlight (App: XXXXXXXXXXX)...
[08:21:04]: Going to upload updated app to App Store Connect
[08:21:04]: This might take a few minutes. Please don't interrupt the script.
[08:21:05]: [altool] 2024-10-28 08:21:05.069 *** Error: Unable to upload archive. Failed to authenticate for session: (

[08:21:05]: [altool]     "Error Domain=ITunesConnectionAuthenticationErrorDomain Code=-26000 "The server returned an invalid response. This may indicate that a network proxy is interfering with communication, or that Apple servers are having issues. Please try your request again later.\nStatus Code: 0 (server error)\n\n(null)" UserInfo={NSLocalizedRecoverySuggestion=The server returned an invalid response. This may indicate that a network proxy is interfering with communication, or that Apple servers are having issues. Please try your request again later.\nStatus Code: 0 (server error)\n\n(null), NSLocalizedDescription=The server returned an invalid response. This may indicate that a network proxy is interfering with communication, or that Apple servers are having issues. Please try your request again later.\nStatus Code: 0 (server error)\n\n(null), NSLocalizedFailureReason=App Store operation failed.}"

[08:21:05]: [altool] ) (-1011)

[08:21:05]: [altool]  {

[08:21:05]: [altool]     NSLocalizedDescription = "Unable to upload archive.";

[08:21:05]: [altool]     NSLocalizedFailureReason = "Failed to authenticate for session: (\n    "Error Domain=ITunesConnectionAuthenticationErrorDomain Code=-26000 \"The server returned an invalid response. This may indicate that a network proxy is interfering with communication, or that Apple servers are having issues. Please try your request again later.\nStatus Code: 0 (server error)\n\n(null)\" UserInfo={NSLocalizedRecoverySuggestion=The server returned an invalid response. This may indicate that a network proxy is interfering with communication, or that Apple servers are having issues. Please try your request again later.\nStatus Code: 0 (server error)\n\n(null), NSLocalizedDescription=The server returned an invalid response. This may indicate that a network proxy is interfering with communication, or that Apple servers are having issues. Please try your request again later.\nStatus Code: 0 (server error)\n\n(null), NSLocalizedFailureReason=App Store operation failed.}"\n)";

[08:21:05]: [altool] }

[08:21:05]: Application Loader output above ^
[08:21:05]: ### The server returned an invalid MIME type: (null)

@joshdholtz Will this work if 2FA enabled?

@TheRisa I was able to replicate it a couple of times now. To confirm, did you update your gem file with `gem
If I tried some times, my account is blocked and received 'Spaceship::AccessForbiddenError', 'Access forbidden' error message. And when I unlock my account, I receive the previous errors.

Delete the deliver password from your keychain.