-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Description
I'm crossposting this based on an issue in React Native that seems to be fixed by prioritizing IPv4 IP addresses in DNS requests over IPv6 ones.
There's more context here: facebook/react-native#32730
I have a device where the lack of IPv6 would hang any network requests to domains that advertise IPv6 addresses. This device is an Oppo A72 if it's relevant.
Android connectivity issues have been frequently reported in React Native. So much so that there is a workaround posted here: https://gist.github.com/danmaas/c60af5fed9f55d2bc616ce302696540d which did indeed fix the problem I was seeing.
However, after further troubleshooting I noticed that the device itself did not have IPv6 connectivity or an IPv6 address at all. I'm not sure why okhttp would even attempt to use IPv6.
Eventually I went into the router's admin panel and reconnected IPv6, which resulted in the connectivity being brought back online. This instantly fixed the faulty device.
I have two Android devices to test with, one did not exhibit the problem while the second one did. It could be an implementation detail or a bug in the device, however, other apps did not seem to have issues.
Is there anything okhttp could do about this? Please see facebook/react-native#32730 for a full description of the issue.