GoogleContainerTools/jib · error · GradleException
error running extension '${extensionName}': ${ex.getMessage(
Error message
error running extension '${extensionName}': ${ex.getMessage()} What it means
Jib's Gradle plugin wraps any JibPluginExtensionException thrown while executing a Jib extension (e.g. jib-extension-gradle-quarkus, jib-extension-gradle-jibquarkus) into a GradleException during the jibBuild task. The extension name is the extension class's fully qualified name and the extension's own message is appended. This means the extension plugin, not core Jib, detected a problem while transforming the container build.
Source
Thrown at jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildImageTask.java:166
} catch (InvalidFilesModificationTimeException ex) {
throw new GradleException(
"container.filesModificationTime should be an ISO 8601 date-time (see "
+ "DateTimeFormatter.ISO_DATE_TIME) or special keyword \"EPOCH_PLUS_SECOND\": "
+ ex.getInvalidFilesModificationTime(),
ex);
} catch (InvalidCreationTimeException ex) {
throw new GradleException(
"container.creationTime should be an ISO 8601 date-time (see "
+ "DateTimeFormatter.ISO_DATE_TIME) or a special keyword (\"EPOCH\", "
+ "\"USE_CURRENT_TIMESTAMP\"): "
+ ex.getInvalidCreationTime(),
ex);
} catch (JibPluginExtensionException ex) {
String extensionName = ex.getExtensionClass().getName();
throw new GradleException(
"error running extension '" + extensionName + "': " + ex.getMessage(), ex);
} catch (IncompatibleBaseImageJavaVersionException ex) {
throw new GradleException(
HelpfulSuggestions.forIncompatibleBaseImageJavaVersionForGradle(
ex.getBaseImageMajorJavaVersion(), ex.getProjectMajorJavaVersion()),
ex);
} catch (InvalidImageReferenceException ex) {
throw new GradleException(
HelpfulSuggestions.forInvalidImageReference(ex.getInvalidReference()), ex);
} catch (ExtraDirectoryNotFoundException ex) {
throw new GradleException(
"extraDirectories.paths contain \"from\" directory that doesn't exist locally: "
+ ex.getPath(),
ex);
} finally {View on GitHub (pinned to fb949e2676)
Solutions
- Read the extension name and message in the error to identify which extension failed and fix its configuration in build.gradle (e.g. quarkusJib { ... })
- Run the underlying build first (gradle build) so the extension can find the artifacts it needs (e.g. quarkus-app)
- Align Jib plugin and extension versions in build.gradle/plugins block so they are compatible
- Temporarily remove the jibExtensions block to confirm the base jibBuild works, then re-add incrementally
Example fix
// before
jib { ... }
quarkusJib { }
// after
jib { to { image = 'gcr.io/project/app' } }
quarkusJib { environmentName = 'prod' } // configure required extension values
// and ensure: gradle build ran before gradle jibBuild Defensive patterns
Strategy: try-catch
Validate before calling
// Verify extension config before running jibBuild
def hasExtension = project.extensions.findByName('quarkusJib') != null
if (hasExtension && !file('build/quarkus-app').exists()) {
throw new GradleException('Run the Quarkus build before jibBuild')
} Try / catch
try {
// gradle jibBuild equivalent
} catch (GradleException e) {
if (e.message.startsWith('error running extension')) {
logger.error('Jib extension failed: ' + e.message)
}
throw e
} Prevention
- Keep Jib core plugin and extension plugin versions aligned
- Run the underlying framework build (e.g. gradle build) before jibBuild when an extension needs its output
- Add extensions incrementally so failures are easy to attribute
When it happens
Trigger: Running a Gradle build that applies and configures a Jib plugin extension via the plugins 'jibExtensions' block (e.g. quarkusJib extension), where the extension throws JibPluginExtensionException because required configuration is missing, unsupported Jib version, or the project's build output does not match what the extension expects (e.g. no quarkus-app build produced).
Common situations: Using jib-extension-gradle-quarkus on a non-Quarkus project or before running 'gradle build' so the quarkus-app directory does not exist; misconfigured extension closure; Jib core version incompatible with the installed extension version; extension applied via older syntax.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- container.appRoot is not an absolute Unix-style path: ${inva
- invalid value for containerizingMode: ${invalidContainerizin
- container.workingDirectory is not an absolute Unix-style pat
- from.platforms contains a platform configuration that is mis
- container.volumes is not an absolute Unix-style path: ${inva
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/2def06b96242ee78.
Report an issue: GitHub.