DNS lookup crash
See original GitHub issueReceived this stacktrace from one of the users of an app i working on now. Okhttp v2.7
Caused by java.net.UnknownHostException: Unable to resolve host "api.bandlab.com": No address associated with hostname
at java.net.InetAddress.lookupHostByName(InetAddress.java:427)
at java.net.InetAddress.getAllByNameImpl(InetAddress.java:252)
at java.net.InetAddress.getAllByName(InetAddress.java:215)
at com.squareup.okhttp.Dns$1.lookup(Dns.java:39)
at com.squareup.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:175)
at com.squareup.okhttp.internal.http.RouteSelector.nextProxy(RouteSelector.java:141)
at com.squareup.okhttp.internal.http.RouteSelector.next(RouteSelector.java:83)
at com.squareup.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:164)
at com.squareup.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:126)
at com.squareup.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:95)
at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:283)
at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:224)
at com.squareup.okhttp.Call.getResponse(Call.java:286)
at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:243)
at com.bandlab.bandlab.data.rest.AuthInterceptor.intercept(AuthInterceptor.java:36)
at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:232)
at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:205)
at com.squareup.okhttp.Call.execute(Call.java:80)
at retrofit.client.OkClient.execute(OkClient.java:53)
at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:326)
at retrofit.RestAdapter$RestHandler.access$100(RestAdapter.java:220)
at retrofit.RestAdapter$RestHandler$1.invoke(RestAdapter.java:265)
at retrofit.RxSupport$2.run(RxSupport.java:55)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at retrofit.Platform$Android$2$1.run(Platform.java:142)
at java.lang.Thread.run(Thread.java:818)
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to solve crash: Dns.java okhttp3.Dns$1.lookup?
If the server is OK (and most probably yes) So this is a normal exception thrown whenever there is a problem in mobile...
Read more >UnknownHostException from OkHttp3.Dns.lookup cause app ...
I saw in Fabric (Crashlitics) crash caused by UnknownHostException from okhttp3.Dns$1.lookup Here crash report from Fabric: ...
Read more >Firefox Locks up System on DNS lookup failure when using ...
I attempt to visit a non-existant domain that will bring up a DNS error on the proxy server. The moment between me submiting...
Read more >system crash on DNS lookup / Newbie Corner / Arch Linux ...
my system freezes for unknown reasons. The problem is about 2 or 3 weeks old. It ran stable before. The crash behavior is...
Read more >DNS lookup failures such as "Unable to resolve DNS query for ...
The BMServer log shows multiple DNS lookup failures of the type "Unable to resolve DNS query for . ", when in debug or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@swankjesse Thanks for advice. I don’t have plans for retrofit 2.0 update. All subscribers are configured for error handling. Problem is this exception crashes an app before it could be catched in onError handler.
That’s a problem with your wiring unfortunately. OkHttp throws IOExceptions when the network is unreachable. If you can’t handle that, there isn’t anything OkHttp can do for you.