Gradle exception: the trustAnchors parameter must be non-empty

Status
Duplicate
Type
Product/platform
MCreator/macOS
Priority
Normal
Issue description

I have made an issue similar to this, but since then I have done some research and am prepared to explain my persistent problem with more detail. MCreator will not let me 1) Export workspaces to files (neither .jar nor .zip), 2) Start a Minecraft test environment, and 3) Recompile the code. Something about a "trustAnchors parameter" needing to be "non-empty." Here's the error log (again):

 

   
Executing gradle command: clean build
Downloading https://services.gradle.org/distributions/gradle-2.14-bin.zip
Exception in thread "main" javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
   at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:190)
   at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1747)
   at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1708)
   at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1691)
   at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1222)
   at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1199)
   at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:476)
   at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166)
   at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1195)
   at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
   at org.gradle.wrapper.Download.downloadInternal(Download.java:58)
   at org.gradle.wrapper.Download.download(Download.java:44)
   at org.gradle.wrapper.Install$1.call(Install.java:59)
   at org.gradle.wrapper.Install$1.call(Install.java:46)
   at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
   at org.gradle.wrapper.Install.createDist(Install.java:46)
   at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:126)
   at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
   at sun.security.validator.PKIXValidator.(PKIXValidator.java:57)
   at sun.security.validator.Validator.getInstance(Validator.java:161)
   at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:108)
   at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:204)
   at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:249)
   at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1188)
   at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:135)
   at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593)
   at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529)
   at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:943)
   at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1188)
   at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1215)
   ... 13 more
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
   at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:183)
   at java.security.cert.PKIXParameters.(PKIXParameters.java:103)
   at java.security.cert.PKIXBuilderParameters.(PKIXBuilderParameters.java:87)
   at sun.security.validator.PKIXValidator.(PKIXValidator.java:55)
   ... 24 more
Task completed with return code 1 in 3586 milliseconds

I have tried reinstalling Java, tried reinstalling MCreator (both 32-bit and 64-bit) and tried every other solution you guys have given me (which, frankly, has not been very many), to no avail.

 

P.S. Sorry for my impatience.

Issue comments

This issue it the same as the first one: https://mcreator.net/tracker/issue/42419

I am aware you can not do anything as Gradle can't work without proper SSL setup on the computer. It is rather strange that you have an issue with this, but keep in mind this is not MCreator related but rather an issue on your Mac. I have googled some solutions for you in the original issue. You might have to do some more manual research to find out what causes the Gradle to not be able to complete a SSL handshake on internet connections.

Make sure to hava Java 8u172 as default Java too.

Is it possible to get access to the entire mod code, copy it, paste it into a text file, and manually convert it to a .jar file?



Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.