1

Am using Koltin v1.3.40,in that try load images from server using glide getting SSL exception in lower end devices.meanwhile implemented TLS functionality for low end devices.After removing kotlin plugin images getting loaded properly from server.Kindly suggest to resolve the problem.

class com.bumptech.glide.load.engine.GlideException:
Failed to load resource There was 1 cause: 
javax.net.ssl.SSLHandshakeException(javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x7d8e2a90: Failure in SSL library, usually a protocol error error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version (external/openssl/ssl/s23_clnt.c:744 0x746ab7e8:0x00000000)) call GlideException#logRootCauses(String) for more detail Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class java.io.InputStream, REMOTE –
c-an
  • 3,543
  • 5
  • 35
  • 82
  • Can you add the error here? – c-an Jul 05 '19 at 13:10
  • class com.bumptech.glide.load.engine.GlideException: Failed to load resource There was 1 cause: javax.net.ssl.SSLHandshakeException(javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x7d8e2a90: Failure in SSL library, usually a protocol error error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version (external/openssl/ssl/s23_clnt.c:744 0x746ab7e8:0x00000000)) call GlideException#logRootCauses(String) for more detail Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class java.io.InputStream, REMOTE – user2911064 Jul 06 '19 at 06:56

1 Answers1

0

Create a xml folder in res then create network_security_config.xml

So, res/xml/network_security_config.xml

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <base-config cleartextTrafficPermitted="true"/>
</network-security-config>

Then,

Go to the manifests.xml and add this attribute in the <application

android:networkSecurityConfig="@xml/network_security_config"

reference: https://developer.android.com/training/articles/security-config

c-an
  • 3,543
  • 5
  • 35
  • 82
  • Thanks for ur reply.For API version 16 to 22 only image not getting loaded.Other devices its working fine.Implemented the above code image not loaded. – user2911064 Jul 06 '19 at 06:58
  • Already implemented code for TLS enabling.After added kotlin only image not getting loaded in API version below 22 – user2911064 Jul 06 '19 at 07:02
  • maybe check this out: https://stackoverflow.com/questions/41114569/glide-javax-net-ssl-sslhandshakeexception-java-security-cert-certpathvalidato – c-an Jul 09 '19 at 05:46