Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal Exception with no explanations only with gradle 4.1.0 #937

Closed
Helma-T opened this issue Oct 15, 2020 · 9 comments
Closed

Fatal Exception with no explanations only with gradle 4.1.0 #937

Helma-T opened this issue Oct 15, 2020 · 9 comments

Comments

@Helma-T
Copy link

Helma-T commented Oct 15, 2020

My app works perfectly fine with ION but after upgrading the app from grade 3.5.1 to 4.1.0, it gives below fatal exception. I tested and the app works fine until gradle 4.0.2. The problem is only with 4.1.0

2020-10-16 16:33:15.295 22067-22127/[MYAPP] E/AndroidRuntime: FATAL EXCEPTION: ion-ion
Process: [MYAPP], 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)

@serrokitskiy
Copy link

I have also updated 'com.android.tools.build:gradle:4.0.2' to 'com.android.tools.build:gradle:4.1.0' and am getting the same error.

@mathislaurentpiquoti
Copy link

same problem for me but you can use the lib if you set debuggable to false in your gradle app variant

@akhilakhi84
Copy link

Finally i found a soultion

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

@JuliCodes
Copy link

I also run into the error. According to https://developer.android.com/studio/releases/gradle-plugin?hl=de the new gradle version the compiler rewrites the app code in debug mode:
“ Assertions in debug builds

When you build the debug version of your app using Android Gradle plugin 4.1.0 and higher, the built-in compiler (D8) will rewrite your app's code to enable assertions at compile time, so you always have assertion checks active.”

@actor10
Copy link

actor10 commented Oct 29, 2020

That means we can't debug apps with ION with Gradle is at 4.1.0? That seems unfortunate.

@koush
Copy link
Owner

koush commented Oct 29, 2020

I'm preparing an update that will remove the asserts.

@koush
Copy link
Owner

koush commented Nov 8, 2020

Fixed in 3.1.0 please confirm

@JuliCodes
Copy link

It works now at my end. - Thanks!

@actor10
Copy link

actor10 commented Nov 11, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants