Good morning, I have a React Native app on production that has issues with Android 14 data connectivity in the US.
The app works smoothly on Europe and with European network providers, but in the US (Verizon and AT&T) it does not.
The app works fine on Wi-Fi and VPN, but with Data connection the first api call tooks 2+ minutes to get a response, while on wi-fi or Data connection + VPN it only took 1 second.
I've updated everything and the issue is still there
I can paste the code here if needed, I did not because since it only affects Usa's users with Android 14 and data connection I suspect it's not strictly related to my code
any idea is welcomed
I try reproducing the issue but I can't, it seems to affect only Android 14 users with Data connection in the USA
I've tried upgrading all of the RN packages, Expo packages and axios, but I still can't figure it out what's going wrong
I know these are not a lot of informations, I don't have much else - only video of the user's and timestamps that proof that the initial api fetch is not firing immediately
I was able to solve this issue, I hope posting this answer might help someone else. This issue is actually related to a known issue with networks where IPv4 and IPv6 are enabled. In my case, our server/network is NOT configured for IPv6, but the WAF is, and users with Android 14 and Verizon or AT&T were experiencing this issue 100% of the times.
We are trying to sort the IPv6 routing on our infrastructure, but in the mean time, the following work around seems to work for us :
add below dependencies to android/app/build.gradle to force use okhttp 5.0.0-alpha.12
dependencies {
// others dependencies
implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.12'
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.12'
implementation 'com.squareup.okhttp3:okhttp-urlconnection:5.0.0-alpha.12'
}
There are several threads on React Native, okHttp and Expo github, they are not easy to find until you realize that this is an IPv6 related issue. I've posted an answer in this thread that also links other issue if you want to check it out.
If you are not sure if the service you are using support IPv6 connection, you can check it here; if you see both A and AAAA records then it does.
For example
Cheers