hyperledger / web3j-gradle-plugin

web3j Gradle plugin
https://web3j.io
Other
40 stars 27 forks source link

"An existing connection was forcibly closed by the remote host" during processTestResources #71

Open bhardwahnitish19 opened 1 year ago

bhardwahnitish19 commented 1 year ago

I am using windows 11 and used gradle 6.5 and 7.5 to validate this issue. Things used to work as expected till now until I shut off a build process which was stuck for a long time from IntelliJ Run window -> stop button. After that, whenever I am trying to rebuild the project, I get the same error.

RE-tried by re-booting the system, still facing the issue.

Tried running the build using CLI, got following error:

^-------------------------------^
Index 0 out of bounds for length 0
Daemon vm is shutting down... The daemon has exited normally or was terminated in response to a user interrupt.
----- End of the daemon log -----

FAILURE: Build failed with an exception.

* What went wrong:
Could not dispatch a message to the daemon.

It fails at: generateContractWrappers with a message An existing connection was forcibly closed by the remote host

Starting Gradle Daemon...
Gradle Daemon started in 1 s 129 ms
> Task :nodeSetup UP-TO-DATE
> Task :npmSetup SKIPPED
> Task :resolveSolidity UP-TO-DATE
> Task :npmInstall UP-TO-DATE
> Task :compileSolidity UP-TO-DATE
> Task :generateContractWrappers

NOTE: Gradle build works fine if I don't use this plugin to compile my solidity code.

I tried in Linux environment yet the build failed.

3:27:47 PM: Executing 'build'...

Starting Gradle Daemon...
Gradle Daemon started in 787 ms
> Task :nodeSetup UP-TO-DATE
> Task :npmSetup SKIPPED
> Task :resolveSolidity UP-TO-DATE
> Task :npmInstall UP-TO-DATE
> Task :compileSolidity UP-TO-DATE

> Task :processResources
Execution optimizations have been disabled for task ':processResources' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/home/nitish/work/demo/build/resources/main'. Reason: Task ':generateContractWrappers' uses this output of task ':processResources' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5/userguide/validation_problems.html#implicit_dependency for more details about this problem.

> Task :compileTestSolidity NO-SOURCE
> Task :generateTestContractWrappers NO-SOURCE
> Task :processTestResources NO-SOURCE
> Task :generateContractWrappers
3:27:52 PM: Execution finished 'build'.

Pleas help, I am stuck here.