ubipo / osmfocus

Open source tool for examining OpenStreetMap elements by moving around on a map.
Apache License 2.0
43 stars 5 forks source link

Unhandled exception: Unable to resolve host "api.openstreetmap.org": No address associated with hostname #44

Closed deevroman closed 1 year ago

deevroman commented 2 years ago

Exception details

Message: Unable to resolve host "api.openstreetmap.org": No address associated with hostname

What happened / what actions did you take before the bug occurred?

if the Internet connection is lost, then downloading new data leads to a crash.

Comments

-- Fill here if necessary --

Stack trace

net.pfiers.osmfocus.service.osmapi.OsmApiConnectionException: Unable to resolve host "api.openstreetmap.org": No address associated with hostname
    at net.pfiers.osmfocus.service.osmapi.ApiKt.map(api.kt:36)
    at net.pfiers.osmfocus.service.osmapi.ApiKt$map$1.invokeSuspend(Unknown Source:10)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:3)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:18)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:1)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:10)
Caused by: java.net.UnknownHostException: Unable to resolve host "api.openstreetmap.org": No address associated with hostname
    at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:156)
    at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:103)
    at java.net.InetAddress.getAllByName(InetAddress.java:1152)
    at com.android.okhttp.Dns$1.lookup(Dns.java:41)
    at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:178)
    at com.android.okhttp.internal.http.RouteSelector.nextProxy(RouteSelector.java:144)
    at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:86)
    at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:176)
    at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128)
    at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
    at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289)
    at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232)
    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465)
    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131)
    at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:90)
    at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:30)
    at com.github.kittinunf.fuel.toolbox.HttpClient.doRequest(HttpClient.kt:72)
    at com.github.kittinunf.fuel.toolbox.HttpClient.awaitRequest(HttpClient.kt:2)
    at com.github.kittinunf.fuel.core.requests.SuspendableRequest.executeRequest(SuspendableRequest.kt:5)
    at com.github.kittinunf.fuel.core.requests.SuspendableRequest.awaitResult(SuspendableRequest.kt:10)
    at com.github.kittinunf.fuel.core.DeserializableKt.awaitResponseResult(Deserializable.kt:8)
    at net.pfiers.osmfocus.service.osmapi.ApiKt$apiReq$$inlined$awaitStringResponseResult$default$1.invokeSuspend(Coroutines.kt:1)
    ... 4 more
Caused by: android.system.GaiException: android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)
    at libcore.io.Linux.android_getaddrinfo(Native Method)
    at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:136)
    at libcore.io.BlockGuardOs.android_getaddrinfo(BlockGuardOs.java:221)
    at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:136)
    at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:135)
    ... 25 more

System / app info

App version: 1.5.0-fdroid
App version code: 150
App build type: release
Android version: 31
Device name: samsung SM-A525F
ubipo commented 1 year ago

Fixed in v1.5.1