javax.net.ssl.SSLHandshakeException is coming while showing the image with glide in android 9.0 and 8.0 but running well in android 6.0 &10

Viewed 147

I am trying to show image in imageView with glide library but While using the glide library to load image with secured server(https) it is is giving error. I tried with customizing the glide module by writing the class below and unsafeclient class to bypass the client.

/Glide: Load failed for https://www.link.com/api/images/categories/12 with 
size [410x410]
class com.bumptech.glide.load.engine.GlideException: Failed to load resource
There was 1 cause:
javax.net.ssl.SSLHandshakeException(Handshake failed)
 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
There was 1 cause:
javax.net.ssl.SSLHandshakeException(Handshake failed)
 call GlideException#logRootCauses(String) for more detail
    Cause (1 of 1): class javax.net.ssl.SSLHandshakeException: Handshake failed            

    

val glideUrl = GlideUrl(
            tempData[position].categoryImage, LazyHeaders.Builder()
                .addHeader("Authorization", "Basic " + AppUtilities().loadImage())
                .build()
        )


GlideApp.with(context!!).asBitmap()
            .placeholder(R.drawable.placeholder_category)
            .load(glideUrl)
            .transform(CenterCrop())
            .centerCrop()
            .diskCacheStrategy(DiskCacheStrategy.RESOURCE)
            .skipMemoryCache(true)
            .into(holder.productImage)
0 Answers
Related