Fix sign-in 503 by not naming com.apple.dt.Xcode in X-Mme-Client-Info - #14
Open
xiaopebaka wants to merge 1 commit into
Open
Fix sign-in 503 by not naming com.apple.dt.Xcode in X-Mme-Client-Info#14xiaopebaka wants to merge 1 commit into
xiaopebaka wants to merge 1 commit into
Conversation
Apple's GrandSlam edge answers any request whose X-Mme-Client-Info names com.apple.dt.Xcode with an HTML 503 page, before the request reaches the backend at all. Signing in has been failing on the very first request since around 2026-08-31. Bisected against gsa.apple.com/grandslam/GsService2 with an init-shaped body, three requests per row: <com.apple.AuthKit/1 (com.apple.dt.Xcode/25183.54.10)> 503 503 503 <com.apple.AuthKit/1 (com.apple.dt.Xcode/26.0)> 503 503 503 <com.apple.AuthKit/1 (com.apple.dt.Xcode)> 503 503 503 <com.apple.AuthKit/1 (com.apple.dt.Xcodex/26.0)> 503 503 503 <com.apple.AuthKit/1 (com.apple.foo/1.0)> 200 200 200 <com.apple.AuthKit/1 (com.apple.akd/1.0)> 200 200 200 <com.apple.AuthKit/1> 200 200 200 The match is on the com.apple.dt.Xcode prefix, not on the version and not on the parentheses: appending a character to the identifier is still blocked, while any other identifier is served. Dropping the trailing identifier is enough, and the Xcode flow is still identified by X-Apple-App-Info and X-Xcode-Version, neither of which is filtered. X-Mme-Client-Info is only ever sent as a header - the copy in the anisette client-provided data is commented out and AnisetteData::_device_description is unused - so nothing else depends on this string. Also make the failure legible if Apple does this again. plist_request checked nothing before handing the body to the plist parser, so an HTML error page surfaced as a parse error that named neither the status code nor the fact that the response came from the edge rather than the backend. It now verifies the status and Content-Type first and reports both plus a snippet of the body, and retries 5xx responses five times with exponential backoff. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0194fngS3qeEqdSqR2JubDHE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signing in has been failing since around 2026-08-31 with a 503 from
gsa.apple.com/grandslam/GsService2, on the very first request of the flow.Cause
Apple's GrandSlam edge answers any request whose
X-Mme-Client-Infonamescom.apple.dt.Xcodewith an HTML 503 page, before the request reaches thebackend at all.
Bisected against
gsa.apple.com/grandslam/GsService2with an init-shaped body,three requests per row:
X-Mme-Client-Infothird segment<com.apple.AuthKit/1 (com.apple.dt.Xcode/25183.54.10)><com.apple.AuthKit/1 (com.apple.dt.Xcode/26.0)><com.apple.AuthKit/1 (com.apple.dt.Xcode)><com.apple.AuthKit/1 (com.apple.dt.Xcodex/26.0)><com.apple.AuthKit/1 (com.apple.foo/1.0)><com.apple.AuthKit/1 (com.apple.akd/1.0)><com.apple.AuthKit/1>The match is on the
com.apple.dt.Xcodeprefix, not on the version and not onthe parentheses — appending a character to the identifier is still blocked,
while any other identifier is served normally.
Two things it is not:
akd/1.0 CFNetwork/808.1.4,akd/1.0 CFNetwork/978.0.7 Darwin/18.7.0andAuthKit/1 (Macintosh; OS X 26.5.2) (com.apple.dt.Xcode/26.0)are servednormally once the client info is clean, and all three are blocked while it is
not. (Note the last one names
com.apple.dt.Xcodetoo, and is still fine —the filter only looks at
X-Mme-Client-Info.)connection all returned 200. The failure was on the first request of a fresh
connection.
I mention both because the AltSign fixes for the same symptom
(#47,
#50,
#52) change exactly those two
things, and neither made a difference here.
Fix
Drop the trailing
(com.apple.dt.Xcode/...)from the client info. The Xcodeflow is still identified by
X-Apple-App-Info: com.apple.gs.xcode.authandX-Xcode-Version, neither of which is filtered.X-Mme-Client-Infois only ever sent as a header — the copy in the anisetteclient-provided data is commented out and
AnisetteData::_device_descriptionis unused — so nothing else depends on this string.
Also: make the next one legible
plist_requestchecked nothing before handing the body to the plist parser, soan HTML error page surfaced as a parse error naming neither the status code nor
the fact that the response came from the edge rather than the backend. This is
the same opaque failure AltStore saw as
NSCocoaErrorDomain 3840.It now verifies the status and Content-Type first and reports both plus a
snippet of the body, and retries 5xx responses five times with exponential
backoff. Three tests cover it against a local server: the retry path, a valid
plist over a single request, and HTML served with a 200.
Finding the cause above was only possible because of this change — the original
error said nothing useful.
Verification
initnow reaches the backend and returns a real GrandSlam status. Against anonexistent account, 3/3:
And a full sign-in on a real account goes through end to end with no retries:
cargo test,cargo fmt --checkandcargo clippyare clean on the touchedfiles, and the
wasmfeature still builds.Note
apple-codesign-quickcarries the same bug and needs the same one-line change;I can open a second PR against that branch if you want it.
🤖 Generated with Claude Code
https://claude.ai/code/session_0194fngS3qeEqdSqR2JubDHE