'Koush ION crashes after Gradle upgrade
After Gradle upgrade ION gives me this error, when trying to send very simple request. It gives me same error on AVD and my physical device. For now I dodged error with going reverting the upgrade. What could be causing following error?
2020-10-24 12:34:14.275 20605-20647/my.example.project E/AndroidRuntime: FATAL EXCEPTION: ion-ion
Process: my.example.project, PID: 20605
java.lang.AssertionError
at com.koushikdutta.async.AsyncSSLSocketWrapper.write(AsyncSSLSocketWrapper.java:474)
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(Unknown Source:12)
at com.koushikdutta.async.future.SimpleFuture.lambda$setCallback$0(SimpleFuture.java:216)
at com.koushikdutta.async.future.-$$Lambda$SimpleFuture$h_gK5Y1XHZI1H8JTE2xOg4dXbp8.onCompleted(Unknown Source:2)
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:195)
at com.koushikdutta.async.future.SimpleFuture.setComplete(SimpleFuture.java:175)
at com.koushikdutta.async.future.-$$Lambda$VNAuWcttAhMr3VsWCERbmWE6yR0.success(Unknown Source:2)
at com.koushikdutta.async.future.SimpleFuture.lambda$success$4(SimpleFuture.java:287)
at com.koushikdutta.async.future.-$$Lambda$SimpleFuture$DxIsaj7NQi76eWgOKS4iviWPLV0.onCompleted(Unknown Source:4)
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:195)
at com.koushikdutta.async.future.SimpleFuture.setComplete(SimpleFuture.java:182)
at com.koushikdutta.async.http.-$$Lambda$cBC5du-82c5EcL72rP5wNK7Y2Y4.onConnectCompleted(Unknown Source:2)
at com.koushikdutta.async.AsyncServer.runLoop(AsyncServer.java:906)
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)
I can't find same error in issues list of this library.
Solution 1:[1]
I am a bit late to answer, but if someone is still looking for a solution , simply update the Ion version to 3.1.0 in app.gradle file and it should fix the crash.
implementation 'com.koushikdutta.ion:ion:3.1.0'
Solution 2:[2]
Did you try this: https://github.com/koush/ion/issues/937 ?
Solution 1:
Go to: File > Invalidate Caches/Restart and select Invalidate and Restart
Solution 2:
Go to: Build > Select Build Variant and select release instead of debug
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Faisal |
Solution 2 | Lukáš Brhlík |