Resolving Apple ID Authentication Issues: Troubleshooting the 503 Service Unavailable Error | Fastlane Login Issue

Understanding the 503 Service Unavailable Error

When you encounter the message ‘503 Service Temporarily Unavailable,’ it can be quite confusing, especially when you’re trying to log into your Apple ID using various Fastlane modules. This error indicates that the server is currently unable to handle the request, usually due to maintenance or overloading. Understanding this can help you remain patient while troubleshooting.

Issue Description

get_certificates aborts with:

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

 

Command executed

The problem seems to be related to the url:

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

Apple now seems to be using a slightly different url

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

and also the POST body has changed to:

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

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

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

 

Steps to Fix Fastlane Login Issue

If you’re facing these authentication issues, here are some steps you can follow:

  • Update your Gemfile File inside the IOS File replace
    gem “fastlane”, :git => “https://github.com/fastlane/fastlane.git”
    to
    gem “fastlane”, :git => “https://github.com/fastlane/fastlane.git”, :branch => “joshdholtz/apple-auth-sirp”
  • run bundle installbundle update fastlane, or bundle update


For more details Follow the this Link: GITHUB