Skip to content

[Android] Fix crash right after login (okhttp-urlconnection 5) - #641

Merged
terrerox merged 2 commits into
masterfrom
fix/android-okhttp-cookie-crash
Oct 9, 2026
Merged

terrerox merged 2 commits into
masterfrom
fix/android-okhttp-cookie-crash

Conversation

@terrerox

@terrerox terrerox commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

What

The Android app crashes right after login since 1.12.0. It happens on every device, and reinstalling doesn't help.

Why

We use okhttp 5, but React Native's cookie handling still pulled in okhttp-urlconnection 4. That version relies on a class okhttp 5 removed, so the first request that sends cookies (right after login) crashes with NoClassDefFoundError: okhttp3.internal.Util.

Fix

Add okhttp-urlconnection 5.3.2 so it matches okhttp, plus a packaging exclude for a duplicate META-INF file it brings in.

Testing

  • Reproduced the crash on an Android 14 emulator.
  • With the fix, the app opens to Home logged in and nothing crashes.

React Native's cookie jar was still coming from okhttp-urlconnection 4,
which doesn't work with okhttp 5 and crashed the app on the first request
after login.
@terrerox
terrerox force-pushed the fix/android-okhttp-cookie-crash branch from 0499acc to c23a042 Compare October 9, 2026 12:06
@terrerox terrerox changed the title [Android] Fix crash right after login (okhttp-urlconnection 5) Fix Android crash right after login Oct 9, 2026
@terrerox terrerox changed the title Fix Android crash right after login [Android] Fix crash right after login (okhttp-urlconnection 5)- #641 Oct 9, 2026
@terrerox terrerox changed the title [Android] Fix crash right after login (okhttp-urlconnection 5)- #641 [Android] Fix crash right after login (okhttp-urlconnection 5) Oct 9, 2026
@sonarqubecloud

sonarqubecloud Bot commented Oct 9, 2026

Copy link
Copy Markdown

@terrerox
terrerox requested a review from sg-gs October 9, 2026 13:17
sg-gs
sg-gs previously approved these changes Oct 9, 2026
@terrerox
terrerox requested a review from CandelR October 9, 2026 14:38
@terrerox
terrerox changed the base branch from release-1.12.1 to master October 9, 2026 14:40
@terrerox
terrerox dismissed sg-gs’s stale review October 9, 2026 14:40

The base branch was changed.

@terrerox
terrerox requested a review from sg-gs October 9, 2026 14:40
@terrerox
terrerox merged commit ff24c82 into master Oct 9, 2026
3 checks passed
@terrerox
terrerox deleted the fix/android-okhttp-cookie-crash branch October 9, 2026 15:15
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.

2 participants