Workspace creation always fails at 'stopping running graddle daemons

Published by Bongo50 on
Status
Resolved
Issue description
Executing 
    Gradle task: genSources eclipse

Build 
    info: MCreator 2020.3.21322, fabric-1.15.2, 64-bit, 7567 MB, Windows 10, 
    JVM 1.8.0_252, JAVA_HOME: C:\Program Files\Pylo\MCreator\jdk

org.gradle.tooling.GradleConnectionException: 
    Could not execute build using Gradle distribution 
    'https://services.gradle.org/distributions/gradle-6.3-bin.zip'.


 
      at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:55)

 
      at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:29)

 
      at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:43)

 
      at 
    org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor.lambda$run$0(DefaultAsyncConsumerActionExecutor.java:57)

 
      at 
    org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)

 
      at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)

 
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

 
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

 
      at 
    org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)

 
      at java.lang.Thread.run(Thread.java:748)

Caused 
    by: org.gradle.api.GradleException: Unable to start the daemon process.

This 
    problem might be caused by incorrect configuration of the daemon.

For 
    example, an unrecognized jvm option is used.

Please 
    refer to the User Manual chapter on the daemon at 
    https://docs.gradle.org/6.3/userguide/gradle_daemon.html

Process 
    command line: C:\Program Files\Pylo\MCreator\jdk\bin\java.exe -Xms625m 
    -Xmx2048m -Dfile.encoding=windows-1252 -Duser.country=GB 
    -Duser.language=en -Duser.variant -cp 
    C:\Users\hmrgi\.mcreator\gradle\wrapper\dists\gradle-6.3-bin\8tpu6egwsccjzp10c1jckl0rx\gradle-6.3\lib\gradle-launcher-6.3.jar 
    org.gradle.launcher.daemon.bootstrap.GradleDaemon 6.3

Please 
    read the following process output to find out more:

-----------------------

Error: 
    Could not find or load main class 
    org.gradle.launcher.daemon.bootstrap.GradleDaemon


 
      at org.gradle.launcher.daemon.client.DaemonGreeter.parseDaemonOutput(DaemonGreeter.java:38)

 
      at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startProcess(DefaultDaemonStarter.java:175)

 
      at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startDaemon(DefaultDaemonStarter.java:137)

 
      at 
    org.gradle.launcher.daemon.client.DefaultDaemonConnector.doStartDaemon(DefaultDaemonConnector.java:217)

 
      at org.gradle.launcher.daemon.client.DefaultDaemonConnector.startDaemon(DefaultDaemonConnector.java:211)

 
      at org.gradle.launcher.daemon.client.DefaultDaemonConnector.connect(DefaultDaemonConnector.java:133)

 
      at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:145)

 
      at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:99)

 
      at 
    org.gradle.tooling.internal.provider.DaemonBuildActionExecuter.execute(DaemonBuildActionExecuter.java:51)

 
      at 
    org.gradle.tooling.internal.provider.DaemonBuildActionExecuter.execute(DaemonBuildActionExecuter.java:35)

 
      at 
    org.gradle.tooling.internal.provider.LoggingBridgingBuildActionExecuter.execute(LoggingBridgingBuildActionExecuter.java:60)

 
      at 
    org.gradle.tooling.internal.provider.LoggingBridgingBuildActionExecuter.execute(LoggingBridgingBuildActionExecuter.java:38)

 
      at org.gradle.tooling.internal.provider.ProviderConnection.run(ProviderConnection.java:203)

 
      at org.gradle.tooling.internal.provider.ProviderConnection.run(ProviderConnection.java:138)

 
      at org.gradle.tooling.internal.provider.DefaultConnection.getModel(DefaultConnection.java:206)

 
      at 
    org.gradle.tooling.internal.consumer.connection.CancellableModelBuilderBackedModelProducer.produceModel(CancellableModelBuilderBackedModelProducer.java:54)

 
      at 
    org.gradle.tooling.internal.consumer.connection.PluginClasspathInjectionSupportedCheckModelProducer.produceModel(PluginClasspathInjectionSupportedCheckModelProducer.java:38)

 
      at 
    org.gradle.tooling.internal.consumer.connection.AbstractConsumerConnection.run(AbstractConsumerConnection.java:64)

 
      at 
    org.gradle.tooling.internal.consumer.connection.ParameterValidatingConsumerConnection.run(ParameterValidatingConsumerConnection.java:49)

 
      at org.gradle.tooling.internal.consumer.DefaultBuildLauncher$1.run(DefaultBuildLauncher.java:97)

 
      at org.gradle.tooling.internal.consumer.DefaultBuildLauncher$1.run(DefaultBuildLauncher.java:89)

 
      at 
    org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:87)

 
      at 
    org.gradle.tooling.internal.consumer.connection.CancellableConsumerActionExecutor.run(CancellableConsumerActionExecutor.java:45)

 
      at 
    org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.java:61)

 
      at 
    org.gradle.tooling.internal.consumer.connection.RethrowingErrorsConsumerActionExecutor.run(RethrowingErrorsConsumerActionExecutor.java:38)

 
      at 
    org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor.lambda$run$0(DefaultAsyncConsumerActionExecutor.java:55)

 
      ... 6 more


TASK 
    EXECUTION FAILED

Task 
    completed in 4500 milliseconds

I've been getting an error (see above) when trying to create a new workspace. This occurred with the forge generator, as well as a fabric generator that I got from a plugin.

Issue comments

In some cases, Gradle caches that make sure the build process does not take too long can get corrupted. In such a case, go to:

<your user home folder>/.mcreator/gradle

In this folder, there is a folder called caches. Delete this folder and open MCreator again. Next build will take a bit longer as caches need to be rebuilt. If you can not delete all files in this folder (which is necessary), reboot the computer first to remove any potential file locks.

If this is not enough to make things work, delete the entire gradle folder, not just caches, and try again.

If even this fails, try to delete the entire <your user home folder>/.mcreator/gradle folder, create a new workspace with the same generator version as the version of the workspace failing, after the setup of this new workspace is done, open your current workspace, and click Build & run -> Build workspace, then Build & run -> Reload gradle project and then Build & run -> Regenerate code and build.

I've followed these steps to the best of my ability, but it's still not working. With the last set of instructions, I'm unable to complete the last few steps as a window pops up telling me the build process fails and it won't let me interact the the window behind it.

First I deleted the cache folder I'm the grade folder. I still got the same error. I then deleted the entire gradle folder and still got the same error. This stopped me from clicking any of the menus across the top do I couldn't complete the last few steps. 

Try this order then:

If even this fails, try to delete the entire <your user home folder>/.mcreator/gradle folder, create a new workspace with the same generator version as the version of the workspace failing, after the setup of this new workspace is done, open your current workspace, and click Build & run -> Reload gradle project and then Build & run -> Regenerate code and build.