Skip to content

Stop advising the terms flow when no localizedError came back - #5

Merged
wanderdev0 merged 1 commit into
mainfrom
fix/delegate-status-is-not-terms
Sep 16, 2026
Merged

wanderdev0 merged 1 commit into
mainfrom
fix/delegate-status-is-not-terms

Conversation

@wanderdev0

Copy link
Copy Markdown
Owner

The com.apple.mobileme delegate response has two independent error channels, and only one is about terms. localizedError is where a response explains itself in words; the delegate's own status is where it reports that it will not serve the account. _describe() branched on UNAUTHORIZED and then fell through to the terms advice for everything else, so a status-only failure was answered with a sentence about iCloud terms and an instruction to report a field that was not in the response.

OpenTagViewer#221 is what that looks like on a phone. The response was status=1, status-message='A server problem is blocking Apple ID sign in. Try signing in later.' with no localizedError at all, and the reporter — whose terms were fine — was shown an empty document list and told to accept some.

What the status actually means is not established from here, so the new branch reports rather than concludes. Clients sharing this sign-in path meet it on Apple IDs that have never been used with an Apple device, and the advice that circulates is to complete the account at appleid.apple.com: macless-haystack#84, #86 and #87, where the same delegate status arrives both with this "server problem" wording and with "Account limit reached". Apple's own text says to try later; across those clients it does not clear on its own, so the message declines to repeat that.

Adds names_a_localized_error so callers branch on the channel rather than the exception type, which is the distinction they need.

Four tests. Three of them fail against the current code; the fourth pins the existing behaviour that the status and status-message survive into the message, and passes either way on purpose. 871 passed on the full suite, ruff and ruff format clean on findmy/errors.py.

🤖 Generated with Claude Code

The delegate response has two independent error channels, and only one of
them is about terms. `localizedError` is where a response explains itself;
the delegate's own `status` is where it reports that it will not serve the
account at all. _describe() had UNAUTHORIZED and then everything else, so a
status-only failure was answered with a sentence about iCloud terms and an
instruction to report a field that was not in the response.

OpenTagViewer#221 is what that looks like on a phone: an account whose terms
are fine, told to go and accept some, having been shown an empty document
list on the way.

What it actually means is not established from here, so the new branch
reports rather than concludes. Every client sharing this sign-in path meets
it on Apple IDs that have never been used with an Apple device, and the
advice that circulates is to complete the account at appleid.apple.com --
see macless-haystack#84, malmeloo#86 and malmeloo#87, where the same delegate status arrives
both with this "server problem" wording and with "Account limit reached".
Apple's own text says to try later; across those clients it does not clear
on its own, so the message declines to repeat that.

Adds names_a_localized_error so callers can branch on the channel rather
than on the exception type, which is the distinction they actually need.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@wanderdev0
wanderdev0 merged commit d956fc8 into main Sep 16, 2026
wanderdev0 added a commit to wanderdev0/OpenTagViewer that referenced this pull request Sep 16, 2026
Picks up wanderdev0/FindMy.py#5, which stops the library's own delegate
error advising the terms flow when the response never used that channel.

All four sites together, per rule 14: the Chaquopy install line, the bridge
tests' requirements, the exporter's pyproject, and uv.lock via `uv lock`.
test_the_whole_repository_pins_one_findmy and
test_pinned_versions_match_the_app_build both pass.

Nothing user-facing depends on this any more - the app and the exporter each
produce their own sentence for this case now, so the library's message is
read by developers rather than shown to anyone. It is still the text that
lands in a log or a stack trace, which is where the next person diagnosing
this will meet it.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
saamdotexe pushed a commit to saamdotexe/OpenTagViewer that referenced this pull request Oct 22, 2026
Issue wanderdev0#221. Apple took the password and the code, then the com.apple.mobileme
delegate refused the account: status=1, status-message "A server problem is
blocking Apple ID sign in. Try signing in later." There was no localizedError
in the response at all.

That matters because the response has two independent error channels and
terms arrive on only one of them. classifyLoginFailure mapped every
MobileMeDelegateError to REASON_TERMS, so the reporter - whose terms were
fine, as iCloud on the web confirmed - was taken to a terms screen, shown an
empty document list, and told that accepting terms was the remedy.

Splits REASON_ICLOUD_REFUSED out of it, branching on whether the response
used the localizedError channel at all. The new sentence says authentication
worked, says it is not about terms, and passes on what the neighbouring
clients have worked out: this turns up on Apple IDs that have never been used
with an Apple device, and completing the account at appleid.apple.com is what
clears it. macless-haystack#84, wanderdev0#86 and wanderdev0#87 are where that comes from, and
they are credited in the comments rather than only here.

Deliberately not REASON_APPLE_DECLINED. That one advises waiting and offers
the Anisette server route; Apple's own wording here also says to try later,
and across those clients it does not clear on its own. Sending somebody to
retry an unchanged sign-in forever is worse than naming the account.

Reads error.localized_error rather than the names_a_localized_error property
added in wanderdev0/FindMy.py#5, so this works against the pinned commit
and does not drag rule 14's four files into the fix.

Six bridge tests and one Espresso test. Two of the bridge tests go red
against the old classification, verified by reverting the branch. The Java
is not compiled here - this machine has no Android toolchain - so the
instrumented test and the build are CI's word, not mine.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant