Building with gradle fails log shows java.io.StreamCorruptedException: invalid type code: 00
There seems to be a bug in IJ, whenever I import my gradle projects, it can't build them, it doesn't pick up settings in my gradle.properties file and IJ log shows "java.io.StreamCorruptedException: invalid type code: 00" indicating some kind of JVM mismatch.
Using the latest community edition, a clean install / new machine. On another machine, I had to revert back to a year+ old version to get it to work, and it still wasn't picking up gradle settings unless I defined them in the project, and then after a couple of tries/deleting indexes etc, it finally works.
This is getting tiresome, and I am wondering if IJ is ever going to work correctly and I need to use a different ide.
Builds fine using gradle from CLI
Please sign in to leave a comment.
IDE uses Gradle Tooling API when working (building, importing) with Gradle projects. This is the exception the Gradle Tooling API throws is caused by the serialization issues b/c of the Gradle and JDK versions mismatch. This problem is reported to Gradle: https://github.com/gradle/gradle/issues/8285 It would be ver nice if you can attach an isolated test case with specifying the Gradle and JDK version you use to run it. See also this thread: https://github.com/gradle/gradle/issues/9339 e.g. this comment for some more workarounds to try (using different Gradle/JDK versions).
Looking at the references you provided, it seems like the main issue is that IJ is not picking up my gradle properties either from my home .gradle folder or from the project being imported, and that is causing an exception which causes the problem reported in the log. That inability to pick up gradle properties is what is keeping IJ from building my project. It needs those settings to use the correct TLS protocol for artifactory, I am getting protocol version errors and the build fails. This does not happen when building with the cli.
My gradle properties include the following lines suggested here the last time I raised the issue, and they mostly work on my old machine, but building out a new one they are not working there.
org.gradle.jvmargs=-Dcom.ibm.jsse2.overrideDefaultTLS=true -Dcom.ibm.jsse2.overrideDefaultProtocol=TLSv12 -Dhttps.protocols=TLSv1.2 -Djdk.tls.client.protocols=TLSv1.2
Yes, indeed, I remember you contacted the support with gradle properties problem. But I was able to reproduce this when only I set them as `-D` properties via the
But it works for me when I specify them as
There was a related issue created: https://youtrack.jetbrains.com/issue/IDEA-268211