OkHttp throws IOException on second API call in Google Play review environment after first POST request succeeds (verified via server tcpdump)
Our Android app (Kotlin, OkHttp 5.x, kotlinx.serialization, R8 enabled) passes all local tests on physical devices and emulators, as well as Google Play Internal Testing. However, during Google Play's review run, the app completes POST /api/v1/auth/guestLogin (200 OK) and immediately fails on the next call (GET /api/v1/homeScreen) with an IOException (triggering our UI error "Couldn't reach the server").
Using tcpdump on port 443 and Nginx access logs, we isolated the exact review session from Google's IPv6 range (2001:4860:1022::/48):
Plaintext
12:55:19.983 UTC Client (IPv6) -> Server : TCP SYN / TLS 1.3 ClientHello (SNI: our-domain)
12:55:20.176 UTC POST /api/v1/auth/guestLogin -> HTTP 200 OK (127ms)
12:56:35.178 UTC Server -> Client (IPv6) : TCP FIN (idle socket closed after 75s)
No GET /api/v1/homeScreen packet ever arrives at the server—not even a DNS lookup or TCP SYN to our droplet IP—proving the IOException happens on the client before reaching our server.
TLS 1.3 and dual-stack IPv4/IPv6 (A and AAAA records) are verified working since guestLogin succeeds over IPv6.
Dynamic Host Rewriting (BaseUrlInterceptor): An OkHttp interceptor reads api_base_url from FirebaseRemoteConfig (initialized asynchronously via fetchAndActivate() at splash) and rewrites the request host for every outgoing call.
Global App Check Interceptor (AuthInterceptor): Fetches a Firebase App Check token (3-second timeout) and attaches x-firebase-appcheck to every request. In Google's review environment, Play Integrity fails and sends {"error":"UNKNOWN_ERROR"} (Base64), which our backend ignores on guestLogin and homeScreen.
Splash Timeout: The splash screen waits up to 8 seconds for login, saves the JWT token, and navigates to the Home screen where GET /api/v1/homeScreen is triggered.
Why would OkHttp throw an IOException on GET /api/v1/homeScreen specifically inside Google Play's review environment immediately after POST /api/v1/auth/guestLogin succeeds over the same domain?
Specifically:
Can FirebaseRemoteConfig.fetchAndActivate() completing mid-session (between guestLogin and homeScreen) cause BaseUrlInterceptor to rewrite the host to a cached/conditional value or malformed URL that fails on IPv6-only NAT64 networks?
Does Google Play's review sandbox apply any HTTP/2 connection pooling, proxy, or background network restrictions between splash-to-home transitions that can cause OkHttp to fail locally without emitting a packet?