From 38714a0d70d4594c4f990918ab9f98a062dd0fec Mon Sep 17 00:00:00 2001 From: Alexander Dulyasov Date: Sun, 13 Sep 2026 14:27:45 +0200 Subject: [PATCH 1/2] fix: identify as akd in GSA requests to avoid HTTP 503 Apple's Grand Slam endpoint now refuses any request whose X-MMe-Client-Info names com.apple.dt.Xcode, answering with a bare HTTP 503 before credentials are checked. Every login therefore fails with "UnhandledProtocolError: Error response for GSA request: 503". _gsa_request already sends an akd user agent; send a matching client info string via the new BaseAnisetteProvider.client_akd property. Other requests keep using the Xcode client string. --- findmy/reports/account.py | 2 +- findmy/reports/anisette.py | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/findmy/reports/account.py b/findmy/reports/account.py index 5077549..8101d9e 100644 --- a/findmy/reports/account.py +++ b/findmy/reports/account.py @@ -979,7 +979,7 @@ async def _gsa_request(self, parameters: dict[str, Any]) -> dict[str, Any]: "Content-Type": "text/x-xml-plist", "Accept": "*/*", "User-Agent": "akd/1.0 CFNetwork/978.0.7 Darwin/18.7.0", - "X-MMe-Client-Info": self._anisette.client, + "X-MMe-Client-Info": self._anisette.client_akd, } resp = await self._http.post( diff --git a/findmy/reports/anisette.py b/findmy/reports/anisette.py index 1c5e3e5..cc99f36 100644 --- a/findmy/reports/anisette.py +++ b/findmy/reports/anisette.py @@ -125,6 +125,20 @@ def client(self) -> str: "" ) + @property + def client_akd(self) -> str: + """ + Client string identifying as ``akd``, the daemon that performs Grand Slam requests. + + Same format and platform as :attr:`client`, differing only in the app bundle. + Apple's GSA endpoint refuses requests that identify as Xcode with an HTTP 503, + so this is the string to send alongside an ``akd`` user agent. + """ + return ( + " " + "" + ) + async def get_headers( self, user_id: str, From c44151ddb299af77dab8a06f85df0c36b596fd40 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Sun, 13 Sep 2026 12:28:42 +0000 Subject: [PATCH 2/2] [pre-commit.ci lite] apply automatic fixes --- findmy/reports/anisette.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/findmy/reports/anisette.py b/findmy/reports/anisette.py index cc99f36..30d5ab1 100644 --- a/findmy/reports/anisette.py +++ b/findmy/reports/anisette.py @@ -134,10 +134,7 @@ def client_akd(self) -> str: Apple's GSA endpoint refuses requests that identify as Xcode with an HTTP 503, so this is the string to send alongside an ``akd`` user agent. """ - return ( - " " - "" - ) + return " " async def get_headers( self,