Troubleshooting "Too long with no output" on Windows with gradlew.bat

Problem

When using Gradle with the Windows executors/orb, you may experience a timeout error:

Too long with no output (exceeded 10m0s): context deadline exceeded

 

Solution

For context, gradlew.bat doesn't return the exit code for PowerShell. So, the step doesn't stop when the command has finished.

To resolve, set shell: bash.exe.

This will cause the batch file and step to run in Bash, not PowerShell.

 

For example:

      - run: 
          shell: bash.exe
          command: ./gradlew.bat build

 

Additional Resources

See information on our Windows Orb:
https://circleci.com/developer/orbs/orb/circleci/windows

You can also reference Gradle's troubleshooting user guides:
https://docs.gradle.org/current/userguide/troubleshooting.html

If you are still experiencing problems after trying this, for further questions or suggestions for your particular use-case, please contact CircleCI Support.

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.