Closed justozz closed 9 years ago
@justozz In the same wifi, have you tried calling your api using postman or similar desktop rest clients? What's the result?
Through the postman all works. If I'm not using retrofit (I used Volley in example), all also works through wi-fi
I also could reproduce this behaviour. Can anyone help ? If it helps, retrofit 1.9 works well but takes ages to complete the request.
@swankjesse any ideas here? redirect + resolve
bug, perhaps?
Here is some analysis. I was digging into the source code of retrofit and found the attached case. Not sure if it helps.
Hi @JakeWharton
I see this ticket has "needs info" tag. Please mention what data is needed. I might be of help.
Your screenshot is not showing a URL. InetSocketAddress is showing you two things: a hostname and an IP address, separated by a slash. Note that there is no http:
.
In your original report, you said can't connect to http://someapi.com/[IPv6 address]
. My guess is that you mistyped the error, which probably said can't connect to someapi.com/[IPv6 address]
without the http://
prefix. In this case its a simple issue of an unreachable host.
Please mention what data is needed.
A reproducible test case.
We had similar issue in our app (not using Retrofit at that time only OkHttp). The DNS had record for both IPv4 and IPv6. The app would try to connect to the IPv6 address but bug in the WiFi router of the users (pretty common device) resulted in timeout. I think this could be resolved with Happy Eyeballs algorithm in OkHttp https://github.com/square/okhttp/issues/506 . Some applications have this or similar already implemented so the issue may not occur with them
Hi Jake,
Please follow the url for sample code that recreates the issue in an IpV6 network.
I don't think this is a Retrofit issue. If you'd like to report an issue with OkHttp, please do! As is, I suspect your best bet is to get your users to fix their broken IPv6 networks.
I think it is format of the error message that is causing the confusion and that the /<IP address>
is just a red herring.
The domain/<IP address>
comes from the toString
method on InetSocketAddress
I'm making a call using retrofit 2.0 (using wi-fi). I'm using base url, in example, "http://someapi.com", using annotation @POST("/api/somemethod"), then call using "call.execute()". I've got a timeoutexception and it shows me "can't connect to http://someapi.com/[IPv6 address]" (in example http://someapi.com/2001:db8:1234:0000:0000:0000:0000:0000. why didn't it calls "http://someapi.com/api/somemethod"?
P.S. All works using 3G or LTE connection