Estimote / Android-Fleet-Management-SDK

Estimote Fleet Management SDK for Android
https://developer.estimote.com
MIT License
836 stars 451 forks source link

com.estimote.coresdk.common.exception.EstimoteCloudException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x63cc14b0: Failure in SSL library, usually a protocol error #287

Closed chorusfr closed 5 years ago

chorusfr commented 6 years ago

Prerequisites

Basic information

**Estimote SDK version:1.4.0

**Android devices affected:Samsung GT-I9305

**Android OS version affected:4.4.4

**Beacon hardware version:G1.12

Description

[Description of the issue] When we launch our application that includes the Estimote SDK, we receive Exceptions and nothing seems to work.

If we try function

InternalEstimoteCloud.getInstance().getDevices(new CloudCallback<List>() { @Override public void success(List beacons) {

We don't pass throw failure callback but the success callback is called with List beacons that contains no elements

===

The rest of application is working well, but no events are called if we are near a Beacon We use beaconManager.startLocationDiscovery();

(Optional) Steps to reproduce:

  1. Launch app

**Expected behavior:LoadDeviceList and monitoring receive beacons

**Actual behavior:loadDeviceList return an empty list and monitoring never finds beacons

Logs and code

05-31 15:13:18.135 28368-28368/com.cosm.stepin.test I/EstimoteSDK: BeaconService.onCreate:79 Creating beacon service for android version 19
05-31 15:13:18.155 28368-28368/com.cosm.stepin.test E/dalvikvm: Could not find class 'android.bluetooth.le.ScanSettings$Builder', referenced from method com.estimote.coresdk.scanning.bluetooth.settings.EstimoteScanSettingsFactory.settingsForLollipop
05-31 15:13:18.155 28368-28368/com.cosm.stepin.test W/dalvikvm: VFY: unable to resolve new-instance 84 (Landroid/bluetooth/le/ScanSettings$Builder;) in Lcom/estimote/coresdk/scanning/bluetooth/settings/EstimoteScanSettingsFactory;
05-31 15:13:18.155 28368-28368/com.cosm.stepin.test E/dalvikvm: Could not find class 'android.bluetooth.le.ScanSettings$Builder', referenced from method com.estimote.coresdk.scanning.bluetooth.settings.EstimoteScanSettingsFactory.settingsForMarshmallow
05-31 15:13:18.155 28368-28368/com.cosm.stepin.test W/dalvikvm: VFY: unable to resolve new-instance 84 (Landroid/bluetooth/le/ScanSettings$Builder;) in Lcom/estimote/coresdk/scanning/bluetooth/settings/EstimoteScanSettingsFactory;
05-31 15:13:18.155 28368-28368/com.cosm.stepin.test E/dalvikvm: Could not find class 'android.bluetooth.le.ScanSettings$Builder', referenced from method com.estimote.coresdk.scanning.bluetooth.settings.EstimoteScanSettingsFactory.settingsForNougat
05-31 15:13:18.155 28368-28368/com.cosm.stepin.test W/dalvikvm: VFY: unable to resolve new-instance 84 (Landroid/bluetooth/le/ScanSettings$Builder;) in Lcom/estimote/coresdk/scanning/bluetooth/settings/EstimoteScanSettingsFactory;
05-31 15:13:18.155 28368-28368/com.cosm.stepin.test D/dalvikvm: DexOpt: unable to opt direct call 0x01ba at 0x02 in Lcom/estimote/coresdk/scanning/bluetooth/settings/EstimoteScanSettingsFactory;.settingsForLollipop
    DexOpt: unable to opt direct call 0x01ba at 0x03 in Lcom/estimote/coresdk/scanning/bluetooth/settings/EstimoteScanSettingsFactory;.settingsForMarshmallow
05-31 15:13:18.160 28368-28368/com.cosm.stepin.test D/dalvikvm: DexOpt: unable to opt direct call 0x01ba at 0x04 in Lcom/estimote/coresdk/scanning/bluetooth/settings/EstimoteScanSettingsFactory;.settingsForNougat
05-31 15:13:18.325 28368-28368/com.cosm.stepin.test D/EstimoteHelper: [Estimote] - Connected to beacon service
    [Estimote] - Data is not yet loaded
05-31 15:13:25.450 28368-28368/com.cosm.stepin.test E/EstimoteSDK: InternalEstimoteCloud$7.failure:531 javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x63cc14b0: Failure in SSL library, usually a protocol error
    error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error (external/openssl/ssl/s23_clnt.c:744 0x5cdf6d74:0x00000000)
05-31 15:13:25.460 28368-28368/com.cosm.stepin.test E/EstimoteHelper: [Estimote] - Error getting list of beacons
    com.estimote.coresdk.common.exception.EstimoteCloudException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x63cc14b0: Failure in SSL library, usually a protocol error
    error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error (external/openssl/ssl/s23_clnt.c:744 0x5cdf6d74:0x00000000)
        at com.estimote.coresdk.cloud.internal.InternalEstimoteCloud$7.failure(InternalEstimoteCloud.java:535)
        at com.estimote.coresdk.repackaged.retrofit_v1_9_0.retrofit.CallbackRunnable$2.run(CallbackRunnable.java:53)
        at android.os.Handler.handleCallback(Handler.java:733)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:146)
        at android.app.ActivityThread.main(ActivityThread.java:5679)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:515)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
        at dalvik.system.NativeStart.main(Native Method)
    Caused by: com.estimote.coresdk.repackaged.retrofit_v1_9_0.retrofit.RetrofitError: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x63cc14b0: Failure in SSL library, usually a protocol error
    error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error (external/openssl/ssl/s23_clnt.c:744 0x5cdf6d74:0x00000000)
        at com.estimote.coresdk.repackaged.retrofit_v1_9_0.retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:394)
        at com.estimote.coresdk.repackaged.retrofit_v1_9_0.retrofit.RestAdapter$RestHandler.access$000(RestAdapter.java:219)
        at com.estimote.coresdk.repackaged.retrofit_v1_9_0.retrofit.RestAdapter$RestHandler$1.obtainResponse(RestAdapter.java:277)
        at com.estimote.coresdk.repackaged.retrofit_v1_9_0.retrofit.CallbackRunnable.run(CallbackRunnable.java:42)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
        at com.estimote.coresdk.repackaged.retrofit_v1_9_0.retrofit.Platform$Android$2$1.run(Platform.java:134)
        at java.lang.Thread.run(Thread.java:841)
    Caused by: javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x63cc14b0: Failure in SSL library, usually a protocol error
    error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error (external/openssl/ssl/s23_clnt.c:744 0x5cdf6d74:0x00000000)
        at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:449)
        at android.net.SSLCertificateSocketFactory.verifyHostname(SSLCertificateSocketFactory.java:234)
        at android.net.SSLCertificateSocketFactory.createSocket(SSLCertificateSocketFactory.java:483)
05-31 15:13:25.465 28368-28368/com.cosm.stepin.test E/EstimoteHelper:     at com.android.okhttp.Connection.upgradeToTls(Connection.java:131)
        at com.android.okhttp.Connection.connect(Connection.java:107)
        at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:294)
        at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255)
        at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206)
        at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345)
        at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:296)
        at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:503)
        at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:136)
        at com.estimote.coresdk.repackaged.retrofit_v1_9_0.retrofit.client.UrlConnectionClient.readResponse(UrlConnectionClient.java:73)
        at com.estimote.coresdk.repackaged.retrofit_v1_9_0.retrofit.client.UrlConnectionClient.execute(UrlConnectionClient.java:38)
        at com.estimote.coresdk.repackaged.retrofit_v1_9_0.retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:325)
        ... 7 more
    Caused by: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x63cc14b0: Failure in SSL library, usually a protocol error
    error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error (external/openssl/ssl/s23_clnt.c:744 0x5cdf6d74:0x00000000)
        at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
        at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:406)
        ... 21 more
heypiotr commented 5 years ago

[Cleaning up stale issues following the rebranding of Estimote SDK to Estimote Fleet Management SDK]

Feel free to re-open this issue if the problem still persists with the latest version of the SDK, and affects the fleet management APIs (BulkUpdater, connecting to beacons and changing settings, etc.).

For enter/exit events, we're asking developers to migrate to our Proximity SDK:

https://developer.estimote.com/proximity/android-tutorial/

If you need any help with the migration, let us know on our forums:

https://forums.estimote.com