koush / ion

Android Asynchronous Networking and Image Loading
Other
6.3k stars 1.04k forks source link

Peer not trusted by any of the system trust managers. #833

Open Faisal-Naseer opened 7 years ago

Faisal-Naseer commented 7 years ago

while using your library I am getting error

06-24 16:58:47.344 8807-8807/com.technologics.developer.motorcityarabia W/System.err: java.util.concurrent.ExecutionException: com.koushikdutta.async.AsyncSSLException: Peer not trusted by any of the system trust managers. 06-24 16:58:47.344 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.future.SimpleFuture.getResultOrThrow(SimpleFuture.java:71) 06-24 16:58:47.344 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.future.SimpleFuture.get(SimpleFuture.java:66) 06-24 16:58:47.344 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.technologics.developer.motorcityarabia.OfferBrandsActivity$1.onResponse(OfferBrandsActivity.java:154) 06-24 16:58:47.344 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run(ExecutorCallAdapterFactory.java:68) 06-24 16:58:47.344 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at android.os.Handler.handleCallback(Handler.java:733) 06-24 16:58:47.344 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95) 06-24 16:58:47.344 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at android.os.Looper.loop(Looper.java:136) 06-24 16:58:47.354 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5135) 06-24 16:58:47.354 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at java.lang.reflect.Method.invokeNative(Native Method) 06-24 16:58:47.354 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at java.lang.reflect.Method.invoke(Method.java:515) 06-24 16:58:47.354 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790) 06-24 16:58:47.354 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606) 06-24 16:58:47.354 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at dalvik.system.NativeStart.main(Native Method) 06-24 16:58:47.354 8807-8807/com.technologics.developer.motorcityarabia W/System.err: Caused by: com.koushikdutta.async.AsyncSSLException: Peer not trusted by any of the system trust managers. 06-24 16:58:47.354 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.AsyncSSLSocketWrapper.handleHandshakeStatus(AsyncSSLSocketWrapper.java:322) 06-24 16:58:47.354 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.AsyncSSLSocketWrapper.write(AsyncSSLSocketWrapper.java:401) 06-24 16:58:47.364 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.AsyncSSLSocketWrapper.handleHandshakeStatus(AsyncSSLSocketWrapper.java:276) 06-24 16:58:47.364 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.AsyncSSLSocketWrapper.access$000(AsyncSSLSocketWrapper.java:30) 06-24 16:58:47.364 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.AsyncSSLSocketWrapper$5.onDataAvailable(AsyncSSLSocketWrapper.java:213) 06-24 16:58:47.364 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.Util.emitAllData(Util.java:23) 06-24 16:58:47.364 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.AsyncNetworkSocket.onReadable(AsyncNetworkSocket.java:152) 06-24 16:58:47.364 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.AsyncServer.runLoop(AsyncServer.java:820) 06-24 16:58:47.364 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.AsyncServer.run(AsyncServer.java:657) 06-24 16:58:47.364 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.AsyncServer.access$800(AsyncServer.java:44) 06-24 16:58:47.364 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.AsyncServer$14.run(AsyncServer.java:599) 06-24 16:58:47.364 8807-8807/com.technologics.developer.motorcityarabia W/System.err: Caused by: javax.net.ssl.SSLException: hostname has been denied 06-24 16:58:47.374 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.AsyncSSLSocketWrapper.handleHandshakeStatus(AsyncSSLSocketWrapper.java:306) 06-24 16:58:47.374 8807-8807/com.technologics.developer.motorcityarabia W/System.err: ... 10 more 06-24 16:59:53.574 8807-8807/com.technologics.developer.motorcityarabia W/System.err: java.util.concurrent.ExecutionException: com.koushikdutta.async.AsyncSSLException: Peer not trusted by any of the system trust managers. 06-24 16:59:53.574 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.future.SimpleFuture.getResultOrThrow(SimpleFuture.java:71) 06-24 16:59:53.574 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.future.SimpleFuture.get(SimpleFuture.java:66) 06-24 16:59:53.574 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.technologics.developer.motorcityarabia.OfferBrandsActivity$1.onResponse(OfferBrandsActivity.java:154) 06-24 16:59:53.584 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run(ExecutorCallAdapterFactory.java:68) 06-24 16:59:53.584 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at android.os.Handler.handleCallback(Handler.java:733) 06-24 16:59:53.584 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95) 06-24 16:59:53.584 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at android.os.Looper.loop(Looper.java:136) 06-24 16:59:53.584 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5135) 06-24 16:59:53.594 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at java.lang.reflect.Method.invokeNative(Native Method) 06-24 16:59:53.594 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at java.lang.reflect.Method.invoke(Method.java:515) 06-24 16:59:53.594 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790) 06-24 16:59:53.594 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606) 06-24 16:59:53.594 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at dalvik.system.NativeStart.main(Native Method) 06-24 16:59:53.594 8807-8807/com.technologics.developer.motorcityarabia W/System.err: Caused by: com.koushikdutta.async.AsyncSSLException: Peer not trusted by any of the system trust managers. 06-24 16:59:53.594 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.AsyncSSLSocketWrapper.handleHandshakeStatus(AsyncSSLSocketWrapper.java:322) 06-24 16:59:53.594 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.AsyncSSLSocketWrapper.write(AsyncSSLSocketWrapper.java:401) 06-24 16:59:53.604 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.AsyncSSLSocketWrapper.handleHandshakeStatus(AsyncSSLSocketWrapper.java:276) 06-24 16:59:53.604 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.AsyncSSLSocketWrapper.access$000(AsyncSSLSocketWrapper.java:30) 06-24 16:59:53.604 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.AsyncSSLSocketWrapper$5.onDataAvailable(AsyncSSLSocketWrapper.java:213) 06-24 16:59:53.604 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.Util.emitAllData(Util.java:23) 06-24 16:59:53.604 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.AsyncNetworkSocket.onReadable(AsyncNetworkSocket.java:152) 06-24 16:59:53.604 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.AsyncServer.runLoop(AsyncServer.java:820) 06-24 16:59:53.604 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.AsyncServer.run(AsyncServer.java:657) 06-24 16:59:53.604 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.AsyncServer.access$800(AsyncServer.java:44) 06-24 16:59:53.614 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.AsyncServer$14.run(AsyncServer.java:599) 06-24 16:59:53.614 8807-8807/com.technologics.developer.motorcityarabia W/System.err: Caused by: javax.net.ssl.SSLException: hostname has been denied 06-24 16:59:53.614 8807-8807/com.technologics.developer.motorcityarabia W/System.err: at com.koushikdutta.async.AsyncSSLSocketWrapper.handleHandshakeStatus(AsyncSSLSocketWrapper.java:306) 06-24 16:59:53.614 8807-8807/com.technologics.developer.motorcityarabia W/System.err: ... 10 more 06-24 17:02:54.404 8807-9232/com.technologics.developer.motorcityarabia W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found. 06-24 17:03:17.724 8807-8813/? D/dalvikvm: Debugger has detached; object registry had 6655 entries 06-24 17:03:17.724 8807-8807/? I/dalvikvm: ignoring registerObject request in thread=1 06-24 17:03:17.724 8807-8807/? I/dalvikvm: ignoring registerObject request in thread=1

I am trying to load this image into Ion

url = "https://www.motorscity.com/img/brand/165x165x0-1414590207Chevrolet_logo.png";

Bitmap bmImg = Ion.with(this)
                                        .load(url).asBitmap().get();
                                Drawable d = new BitmapDrawable(getResources(), bmImg);
koush commented 7 years ago

ion version?

Faisal-Naseer commented 7 years ago

compile 'com.koushikdutta.ion:ion:2.+'

koush commented 7 years ago

android version? and are you linked to google play services?

Faisal-Naseer commented 7 years ago

Yes I am using google play services in my app..min sdk 17 max sdk 25. It was working fine a few days ago I ve invalidated caches and it stopped working.

On Sat, Jun 24, 2017 at 11:08 AM, Koushik Dutta notifications@github.com wrote:

android version? and are you linked to google play services?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/koush/ion/issues/833#issuecomment-310817346, or mute the thread https://github.com/notifications/unsubscribe-auth/AO8Ul1_f291oHJqWC4hkwehn01XUrc9iks5sHKfUgaJpZM4ODfyc .

koush commented 7 years ago

What android version can I test on I mean? If you can specify an emulator, that would be helpful.

Faisal-Naseer commented 7 years ago

I am testing it on real device huawei y625 android 4.4 On 25 Jun 2017 06:36, "Koushik Dutta" notifications@github.com wrote:

What android version can I test on I mean? If you can specify an emulator, that would be helpful.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/koush/ion/issues/833#issuecomment-310864337, or mute the thread https://github.com/notifications/unsubscribe-auth/AO8Ul-7jn1NpVVxuwYzKc280cyzoLBabks5sHXNTgaJpZM4ODfyc .

koush commented 7 years ago

Working fine on a 4.4 emulator here.

can you set the version to ion version 2.2.1 and try again?

LiaoZhuo commented 6 years ago

com.koushikdutta.async.AsyncSSLException: Peer not trusted by any of the system trust managers. https no self sign certificate Android 5.0 prior is not working, retrofit is ok. tlsVersion:TLS_1_0 cipherSuite:TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA

I set the version to ion version 2.2.1 and tried on a Genymotion 4.1.1,but it still not working. Waiting for your feedback. Thanks.

I found a very puzzling phenomenon: In Android 5.0 following handshake, PeerCertificate's Subject shows a domain name, then failed; in Android 5.0 above PeerCertificates show another domain name, then success.

djdance commented 5 years ago

SDK 17, old GP services (no map), and same ION error