fix(mobile): retry MFA/auth on transport/IO aborts (stale-connection) — ported to main#87
Merged
ahmetabdullahgultekin merged 1 commit intoJun 6, 2026
Conversation
…nnection) Ports the stranded fix from fix/mfa-request-retry-stale-connection (was 24 commits behind main, never merged or released) onto current main, resolving the NetworkModule.kt conflict. The identity HttpClient now installs Ktor HttpRequestRetry (maxRetries=2, exponentialDelay) that retries ONLY on transport/IO exceptions (IOException / SocketTimeout / ConnectTimeout / ClosedReceiveChannelException) — never on 4xx/5xx, so a consumed MFA code is never resubmitted; the body is a serialized object, fully replayable. Fixes the OkHttp h2 stale-connection abort that the server logged as "Malformed request body: I/O error while reading input message" (misdiagnosed as slow-uplink truncation). Verified: :shared:compileDebugKotlinAndroid passes (JDK 21, Ktor 3.1.1). Reaches devices on the next APK build. Surfaced by scripts/drift-check.sh. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ahmetabdullahgultekin
added a commit
that referenced
this pull request
Jun 6, 2026
…tion retry fix (#88) v5.3.0 (versionCode 12) shipped without the Ktor HttpRequestRetry fix (#87, now on main). Bump to 5.3.1 / code 13 so the next CI-signed APK upgrades in place over v5.3.0 and carries the transport/IO retry. Signed APK is produced by the android-build.yml workflow (build_type=release, keystore secrets held in GitHub). Co-authored-by: Ahmet Abdullah Gultekin <rollingcat.help@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ahmetabdullahgultekin
added a commit
that referenced
this pull request
Jun 6, 2026
…otes (#89) - CHANGELOG: promote [Unreleased] → [5.3.1] - 2026-06-06; add the MFA transport/IO retry fix (#87, headline) and cross-device/session fixes (#86) that had landed post-5.3.0 without changelog entries; keep the #82/#83 items. - CLAUDE.md: refresh stale "Latest: v5.2.3 / versionCode 10" → "v5.3.1 / versionCode 13"; document the CI signed-build command (host has no keystore pw); add a "v5.3.1 — MFA stale-connection retry" section. Co-authored-by: Ahmet Abdullah Gultekin <rollingcat.help@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Lands a stranded reliability fix:
fix/mfa-request-retry-stale-connection(1 ahead / 24 behind main) was never merged or shipped (git cherryconfirms it's absent from main andv5.3.0, and main had no retry mechanism). Ported onto current main, resolving theNetworkModule.ktconflict.Change: the identity
HttpClientinstalls KtorHttpRequestRetry(maxRetries=2, exponential backoff) that retries only on transport/IO exceptions (IOException / SocketTimeout / ConnectTimeout / ClosedReceiveChannelException) — never on 4xx/5xx, so a consumed MFA code is never resubmitted; the request body is serialized and fully replayable.Fixes the OkHttp HTTP/2 stale-connection abort the server logged as "Malformed request body: I/O error while reading input message" (previously misdiagnosed as slow-uplink truncation).
Verified:
:shared:compileDebugKotlinAndroidpasses (JDK 21, Ktor 3.1.1). Identical retry logic to the original fix commitc1a758a7. Reaches devices on the next APK build (separate operator step). Found viascripts/drift-check.sh.🤖 Generated with Claude Code