I’m using ConfigurableDevicesScanner.
ConfigurableDevicesScanner devicesScanner = new ConfigurableDevicesScanner(this);
devicesScanner.setOwnDevicesFiltering(true);
devicesScanner.setDeviceTypes(DeviceType.LOCATION_BEACON);
devicesScanner.setScanPeriodMillis(1000);
While the app scans, I always get an exception and no devices are found.
Strange is, if I using mobile data connection it seems to run very well, but if I using Wi-Fi connection, I get this:
E/EstimoteSDK: com.estimote.sdk.connection.scanner.ConfigurableDevicesScanner$5.failure:511 Unable to obtain owned devices
com.estimote.sdk.exception.EstimoteServerException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
at com.estimote.sdk.cloud.internal.InternalEstimoteCloud$7.failure(InternalEstimoteCloud.java:391)
at com.estimote.sdk.repackaged.retrofit_v1_9_0.retrofit.CallbackRunnable$2.run(CallbackRunnable.java:53)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7229)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by: com.estimote.sdk.repackaged.retrofit_v1_9_0.retrofit.RetrofitError: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
at com.estimote.sdk.repackaged.retrofit_v1_9_0.retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:394)
at com.estimote.sdk.repackaged.retrofit_v1_9_0.retrofit.RestAdapter$RestHandler.access$000(RestAdapter.java:219)
at com.estimote.sdk.repackaged.retrofit_v1_9_0.retrofit.RestAdapter$RestHandler$1.obtainResponse(RestAdapter.java:277)
at com.estimote.sdk.repackaged.retrofit_v1_9_0.retrofit.CallbackRunnable.run(CallbackRunnable.java:42)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at com.estimote.sdk.repackaged.retrofit_v1_9_0.retrofit.Platform$Android$2$1.run(Platform.java:134)
at java.lang.Thread.run(Thread.java:818)
Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:357)
at com.android.okhttp.internal.http.SocketConnector.connectTls(SocketConnector.java:212)
at com.android.okhttp.Connection.connect(Connection.java:1322)
at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:1410)
at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128)
at com.android.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:466)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:447)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:353)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:476)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:418)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:540)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:25)
at com.estimote.sdk.repackaged.retrofit_v1_9_0.retrofit.client.UrlConnectionClient.readResponse(UrlConnectionClient.java:73)
at com.estimote.sdk.repackaged.retrofit_v1_9_0.retrofit.client.UrlConnectionClient.execute(UrlConnectionClient.java:38)
at com.estimote.sdk.repackaged.retrofit_v1_9_0.retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:325)
at com.estimote.sdk.repackaged.retrofit_v1_9_0.retrofit.RestAdapter$RestHandler.access$000(RestAdapter.java:219)
at com.estimote.sdk.repackaged.retrofit_v1_9_0.retrofit.RestAdapter$RestHandler$1.obtainResponse(RestAdapter.java:277)
at com.estimote.sdk.repackaged.retrofit_v1_9_0.retrofit.CallbackRunnable.run(CallbackRunnable.java:42)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at com.estimote.sdk.repackaged.retrofit_v1_9_0.retrofit.Platform$Android$2$1.run(Platform.java:134)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:337)
at com.android.org.conscrypt.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:231)
at com.android.org.conscrypt.Platform.checkServerTrusted(Platform.java:115)
at com.android.org.conscrypt.OpenSSLSocketImpl.verifyCertificateChain(OpenSSLSocketImpl.java:643)
at com.android.org.conscrypt.NativeCrypto.SSL_d