Estimote / Android-Indoor-SDK

Estimote Indoor SDK for Android
MIT License
63 stars 28 forks source link

Unable to resolve host "cloud.estimote.com" #22

Open Marky25 opened 5 years ago

Marky25 commented 5 years ago

Prerequisites

Basic information

Estimote SDK version: com.estimote:indoorsdk:2.5.4

Android devices affected: Huawei P9

Android OS version affected: Android 7.0

Beacon hardware version: F3.3

Description

If internet connection is available, indoorskd starts location update with no problem. When internet connection is not available, after some time application crashes during call of startPositioning() on ScanningIndoorLocationManager (In my case I need to restart the application 3-4x and then it will result into this error).

Steps to reproduce:

  1. Disable internet connection on Android device
  2. Attempt to start application and call startPositioning()
  3. Watch the result

Expected behavior: Even there is no internet connection, it would be great if call on startPositioning() would not crash the whole app...

Actual behavior: Currently, when there is no internet connection, calling startPositioning() will result in an exception and in application crash.

(Optional) Additional information

Console output:

W/System.err: io.reactivex.exceptions.OnErrorNotImplementedException: Unable to resolve host "cloud.estimote.com": No address associated with hostname
        at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:704)
        at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:701)
        at io.reactivex.internal.observers.LambdaObserver.onError(LambdaObserver.java:77)
        at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeOnObserver.onError(ObservableSubscribeOn.java:63)
        at com.jakewharton.retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onError(BodyObservable.java:72)
        at com.jakewharton.retrofit2.adapter.rxjava2.CallObservable.subscribeActual(CallObservable.java:55)
        at io.reactivex.Observable.subscribe(Observable.java:10981)
        at com.jakewharton.retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:34)
        at io.reactivex.Observable.subscribe(Observable.java:10981)
        at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
        at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:452)
        at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
        at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at java.lang.Thread.run(Thread.java:776)
W/System.err: Caused by: java.net.UnknownHostException: Unable to resolve host "cloud.estimote.com": No address associated with hostname
        at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:125)
        at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:74)
        at java.net.InetAddress.getAllByName(InetAddress.java:752)
        at okhttp3.Dns$1.lookup(Dns.java:39)
        at okhttp3.internal.connection.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:171)
        at okhttp3.internal.connection.RouteSelector.nextProxy(RouteSelector.java:137)
        at okhttp3.internal.connection.RouteSelector.next(RouteSelector.java:82)
        at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:171)
        at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:121)
        at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:100)
        at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
        at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
        at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
W/System.err:     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
        at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
        at com.estimote.indoorsdk_module.cloud.f.intercept(Unknown Source)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
        at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)
        at okhttp3.RealCall.execute(RealCall.java:69)
        at retrofit2.OkHttpCall.execute(OkHttpCall.java:174)
        at com.jakewharton.retrofit2.adapter.rxjava2.CallObservable.subscribeActual(CallObservable.java:41)
        ... 12 more
    Caused by: android.system.GaiException: android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)
        at libcore.io.Posix.android_getaddrinfo(Native Method)
        at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:55)
        at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:106)
        ... 39 more
W/System.err: Caused by: android.system.ErrnoException: android_getaddrinfo failed: ENETUNREACH (Network is unreachable)
        ... 42 more
Marky25 commented 5 years ago

Will this be fixed in new release (3.0.0) ? I saw some beta versions on maven repository. Looking forward to full release.