GoogleContainerTools/jib · error · GradleException
from.platforms contains a platform configuration that is mis
Error message
from.platforms contains a platform configuration that is missing required values or has invalid values: ${message}: ${invalidPlatform} What it means
Jib validates each entry in from.platforms (container build platforms, e.g. architecture/os pairs). InvalidPlatformException is thrown when a platform configuration is missing required fields (like os or architecture) or has invalid values, and the task rethrows it as this GradleException with the underlying message and the invalid platform value.
Source
Thrown at jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildImageTask.java:138
globalConfig,
new GradleHelpfulSuggestions(HELPFUL_SUGGESTIONS_PREFIX))
.runBuild();
} catch (InvalidAppRootException ex) {
throw new GradleException(
"container.appRoot is not an absolute Unix-style path: " + ex.getInvalidPathValue(), ex);
} catch (InvalidContainerizingModeException ex) {
throw new GradleException(
"invalid value for containerizingMode: " + ex.getInvalidContainerizingMode(), ex);
} catch (InvalidWorkingDirectoryException ex) {
throw new GradleException(
"container.workingDirectory is not an absolute Unix-style path: "
+ ex.getInvalidPathValue(),
ex);
} catch (InvalidPlatformException ex) {
throw new GradleException(
"from.platforms contains a platform configuration that is missing required values or has invalid values: "
+ ex.getMessage()
+ ": "
+ ex.getInvalidPlatform(),
ex);
} catch (InvalidContainerVolumeException ex) {
throw new GradleException(
"container.volumes is not an absolute Unix-style path: " + ex.getInvalidVolume(), ex);
} 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) {View on GitHub (pinned to fb949e2676)
Solutions
- Ensure each platform specifies both architecture and os, e.g. { architecture = 'amd64'; os = 'linux' }.
- Fix unsupported values (use os 'linux' or 'windows'; architectures like 'amd64', 'arm64').
- Remove the platforms block to use the default linux/amd64 platform.
- Read the embedded ex.getMessage() for which field was invalid.
Example fix
// before
jib {
from { platforms { platform { architecture = 'arm64' } } }
}
// after
jib {
from {
platforms {
platform { architecture = 'arm64'; os = 'linux' }
}
}
} Defensive patterns
Strategy: validation
Validate before calling
jib.from.platforms.each { p ->
if (!p.architecture || !p.os) {
throw new GradleException("Each platform needs non-empty architecture and os, got: $p")
}
} Try / catch
try {
tasks.named('jib').get().execute()
} catch (GradleException e) {
if (e.message?.startsWith('from.platforms contains a platform')) {
logger.error("Check each platform's architecture/os fields: ${e.message}")
}
throw e
} Prevention
- Always set both architecture and os on every platform entry.
- Use canonical values: linux/windows and amd64/arm64.
- Remove the platforms block if you only need the default linux/amd64.
When it happens
Trigger: Configuring jib.from.platforms with a platform missing 'architecture' or 'os', empty strings, or unsupported os/architecture combinations, then running a jib build task.
Common situations: Copy-paste of multi-platform (arm64/amd64) config with a field accidentally deleted; setting only 'architecture' without 'os'; typos like 'arch' instead of 'architecture'; specifying platforms with a plugin version that requires both fields.
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
- from.platforms contains a platform configuration that is mis
- container.appRoot is not an absolute Unix-style path: ${inva
- invalid value for containerizingMode: ${invalidContainerizin
- container.workingDirectory is not an absolute Unix-style pat
- 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/b60917dd51e97440.
Report an issue: GitHub.