Skip to content

Fix wear "Failed to load": read response bodies inside the IO context#20

Merged
SiteRelEnby merged 3 commits into
mainfrom
fix/totp-recovery-login
Jul 7, 2026
Merged

Fix wear "Failed to load": read response bodies inside the IO context#20
SiteRelEnby merged 3 commits into
mainfrom
fix/totp-recovery-login

Conversation

@SiteRelEnby

Copy link
Copy Markdown
Collaborator

OkHttp's execute() returns once headers arrive; body.string() still reads from the socket, so reading it on Main threw NetworkOnMainThreadException for any response that wasn't already buffered - reliably for member lists, intermittently for login. Drain bodies in the same IO context as the call, and log the previously swallowed failures in the store and login screen.

Mirror the phone module's debug network security config in the wear
module, so debug watch builds can talk to a local dev server over
plain http on localhost/127.0.0.1/10.0.2.2. Release builds are
unaffected.
OkHttp's execute() returns once headers arrive; body.string() still
reads from the socket, so reading it on Main threw
NetworkOnMainThreadException for any response that wasn't already
buffered - reliably for member lists, intermittently for login. Drain
bodies in the same IO context as the call, and log the previously
swallowed failures in the store and login screen.
@SiteRelEnby SiteRelEnby enabled auto-merge July 7, 2026 01:19
@SiteRelEnby SiteRelEnby merged commit a332d27 into main Jul 7, 2026
1 check passed
@SiteRelEnby SiteRelEnby deleted the fix/totp-recovery-login branch July 7, 2026 01:24
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