koush / ion

Android Asynchronous Networking and Image Loading
Other
6.29k stars 1.03k forks source link

SSL failing on android 4.1 #929

Open zkrige opened 4 years ago

zkrige commented 4 years ago

I've implemented a custom trust manager which allows ALL ssl transfers, but im still getting this error

06-18 09:02:04.742 6183-6237/? E/Downloads: Unexpected message type has been received: 21
    javax.net.ssl.SSLProtocolException: Unexpected message type has been received: 21
        at org.apache.harmony.xnet.provider.jsse.SSLRecordProtocol.unwrap(SSLRecordProtocol.java:360)
        at org.apache.harmony.xnet.provider.jsse.SSLEngineImpl.unwrap(SSLEngineImpl.java:464)
        at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:383)
        at com.koushikdutta.async.AsyncSSLSocketWrapper$6.onDataAvailable(AsyncSSLSocketWrapper.java:296)
        at com.koushikdutta.async.Util.emitAllData(Util.java:23)
        at com.koushikdutta.async.AsyncNetworkSocket.onReadable(AsyncNetworkSocket.java:163)
        at com.koushikdutta.async.AsyncServer.runLoop(AsyncServer.java:879)
        at com.koushikdutta.async.AsyncServer.run(AsyncServer.java:727)
        at com.koushikdutta.async.AsyncServer.access$800(AsyncServer.java:46)
        at com.koushikdutta.async.AsyncServer$8.run(AsyncServer.java:681)
tomeroto commented 4 years ago

I have same issues, after update my Android Studio to 4.1.

10-14 20:00:29.799 5110-5151/com.test.http E/AndroidRuntime: FATAL EXCEPTION: ion-ion
    Process: com.test.http, PID: 5110
    java.lang.AssertionError
        at com.koushikdutta.async.AsyncSSLSocketWrapper.write(AsyncSSLSocketWrapper.java:492)
        at com.koushikdutta.async.AsyncSSLSocketWrapper.handleHandshakeStatus(AsyncSSLSocketWrapper.java:378)
        at com.koushikdutta.async.AsyncSSLSocketWrapper.handshake(AsyncSSLSocketWrapper.java:182)
        at com.koushikdutta.async.http.AsyncSSLSocketMiddleware.tryHandshake(AsyncSSLSocketMiddleware.java:89)
        at com.koushikdutta.async.http.AsyncSSLSocketMiddleware$2.onConnectCompleted(AsyncSSLSocketMiddleware.java:106)
        at com.koushikdutta.async.http.AsyncSocketMiddleware.lambda$getSocket$3$AsyncSocketMiddleware(AsyncSocketMiddleware.java:217)
        at com.koushikdutta.async.http.-$$Lambda$AsyncSocketMiddleware$glazjOxu-iNIRY4N890Wl1ngyGo.onCompleted(lambda)
        at com.koushikdutta.async.future.SimpleFuture.lambda$setCallback$0(SimpleFuture.java:212)
        at com.koushikdutta.async.future.-$$Lambda$SimpleFuture$h_gK5Y1XHZI1H8JTE2xOg4dXbp8.onCompleted(lambda)
        at com.koushikdutta.async.future.SimpleFuture$FutureCallsite.loop(SimpleFuture.java:130)
        at com.koushikdutta.async.future.SimpleFuture.handleCallbackUnlocked(SimpleFuture.java:153)
        at com.koushikdutta.async.future.SimpleFuture.setComplete(SimpleFuture.java:191)
        at com.koushikdutta.async.future.SimpleFuture.setComplete(SimpleFuture.java:174)
        at com.koushikdutta.async.future.-$$Lambda$VNAuWcttAhMr3VsWCERbmWE6yR0.success(lambda)
        at com.koushikdutta.async.future.SimpleFuture.lambda$success$4(SimpleFuture.java:279)
        at com.koushikdutta.async.future.-$$Lambda$SimpleFuture$DxIsaj7NQi76eWgOKS4iviWPLV0.onCompleted(lambda)
        at com.koushikdutta.async.future.SimpleFuture$FutureCallsite.loop(SimpleFuture.java:130)
        at com.koushikdutta.async.future.SimpleFuture.handleCallbackUnlocked(SimpleFuture.java:153)
        at com.koushikdutta.async.future.SimpleFuture.setComplete(SimpleFuture.java:191)
        at com.koushikdutta.async.future.SimpleFuture.setComplete(SimpleFuture.java:178)
        at com.koushikdutta.async.http.-$$Lambda$cBC5du-82c5EcL72rP5wNK7Y2Y4.onConnectCompleted(lambda)
        at com.koushikdutta.async.AsyncServer.runLoop(AsyncServer.java:896)
        at com.koushikdutta.async.AsyncServer.run(AsyncServer.java:717)
        at com.koushikdutta.async.AsyncServer.access$800(AsyncServer.java:46)
        at com.koushikdutta.async.AsyncServer$11.run(AsyncServer.java:671)
10-14 20:00:29.984 5110-5128/com.test.http E/Surface: getSlotFromBufferLocked: unknown buffer: 0x7f9a075e20
Helma-T commented 4 years ago

Same issue here think

H, [14.10.20 16:34] 2020-10-16 16:33:15.295 22067-22127/APP E/AndroidRuntime: FATAL EXCEPTION: ion-ion Process:APP, PID: 22067 java.lang.AssertionError at com.koushikdutta.async.AsyncSSLSocketWrapper.write(AsyncSSLSocketWrapper.java:390) at com.koushikdutta.async.AsyncSSLSocketWrapper.handleHandshakeStatus(AsyncSSLSocketWrapper.java:276) at com.koushikdutta.async.AsyncSSLSocketWrapper.handshake(AsyncSSLSocketWrapper.java:114) at com.koushikdutta.async.http.AsyncSSLSocketMiddleware.tryHandshake(AsyncSSLSocketMiddleware.java:91) at com.koushikdutta.async.http.AsyncSSLSocketMiddleware$2.onConnectCompleted(AsyncSSLSocketMiddleware.java:108) at com.koushikdutta.async.AsyncServer.runLoop(AsyncServer.java:849) at com.koushikdutta.async.AsyncServer.run(AsyncServer.java:658) at com.koushikdutta.async.AsyncServer.access$800(AsyncServer.java:44) at com.koushikdutta.async.AsyncServer$14.run(AsyncServer.java:600)