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: ${ex.getMessage()}: ${ex.getInvalidPlatform()} What it means
Each entry in jib.from.platforms must specify a valid architecture (e.g. amd64) and OS (e.g. linux); InvalidPlatformException is thrown when a platform configuration is missing required fields or has invalid values (including unknown architecture/OS pairs), and this GradleException includes the detailed message and the offending platform.
Source
Thrown at jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildTarTask.java:160
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
- Set both architecture and os explicitly and use canonical values: architecture 'amd64' or 'arm64', os 'linux', e.g. platform { architecture = 'arm64'; os = 'linux' }
- Remove empty/invalid platform blocks so only complete platform entries remain
- Cross-check values against multi-base-image support in the installed Jib plugin version (upgrade if arm64/multi-platform is unsupported)
- Verify the base image actually publishes a manifest for the requested platform
Example fix
// before
jib { from { platforms { platform { architecture = 'x86_64' } } } } // invalid arch, no os
// after
jib { from { platforms { platform { architecture = 'amd64'; os = 'linux' } } } } Defensive patterns
Strategy: validation
Validate before calling
def validArch = ['amd64','arm64']
def validOs = ['linux']
project.jib.from.platforms.get().each { p ->
def arch = p.architecture.getOrElse('')
def os = p.os.getOrElse('')
assert arch in validArch && os in validOs : "Invalid platform: arch=$arch os=$os"
} Prevention
- Always set both architecture and os in each platform block
- Use canonical values (amd64/arm64, linux), not Docker display names
- Confirm the base image publishes manifests for each requested platform
When it happens
Trigger: Running gradle jibBuildTar with jib { from { platforms { platform { architecture = '' } } } } (missing architecture), missing os, empty strings, or an arch/os combination the build cannot resolve (e.g. architecture 'x86_64' instead of 'amd64').
Common situations: Using Docker-style names like 'x86_64' or 'arm' instead of Jib's expected 'amd64'/'arm64'; leaving a platform block with only os or only architecture; typos like 'os: linus'; copying a platforms block between projects with different field names.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Platform must be of form os/architecture.
- <image> is a manifest list, but the list does not contain an
- Invalid image reference ${invalidReference}, perhaps you sho
- HelpfulSuggestions.forInvalidImageReference(${ex.getInvalidR
- container.appRoot is not an absolute Unix-style path: ${ex.g
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/9f2b7f63e8245e60.
Report an issue: GitHub.