Why am I getting "Failed to pack new cache" error during builds?
Last updated: July 27, 2026
Context
You may encounter a "Failed to pack new cache" error during your build process, along with messages indicating that certain cache paths are not found. This typically occurs when there are issues with the cache configuration in your workflow, such as duplicate cache path entries or incorrect path specifications.
Answer
The most common cause of this error is having duplicate cache paths defined in your workflow configuration.
workflows:
example-workflow:
cache:
cache_paths:
- ~/.gradle/caches
- ~/.gradle/cachesTo resolve this issue:
Review your workflow cache configuration and look for any duplicate entries
Check specifically for paths like
/Users/builder/.gradle/cachesor~/.gradle/cachesthat may be defined multiple timesRemove any duplicate cache path entries from your configuration
Save your workflow configuration and trigger a new build
After removing the duplicate cache paths, your build should complete successfully without the caching error.
If the issue persists, please contact support for further investigation.