{"record":{"id":"9f2b7f63e8245e60","repo":"GoogleContainerTools/jib","slug":"from-platforms-contains-a-platform-configuration-t-9f2b7f","errorCode":null,"errorMessage":"from.platforms contains a platform configuration that is missing required values or has invalid values: ${ex.getMessage()}: ${ex.getInvalidPlatform()}","messagePattern":"from\\.platforms contains a platform configuration that is missing required values or has invalid values: (.+?): (.+?)","errorType":"exception","errorClass":"GradleException","httpStatus":null,"severity":"error","filePath":"jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildTarTask.java","lineNumber":160,"sourceCode":"              globalConfig,\n              new GradleHelpfulSuggestions(HELPFUL_SUGGESTIONS_PREFIX))\n          .runBuild();\n\n    } catch (InvalidAppRootException ex) {\n      throw new GradleException(\n          \"container.appRoot is not an absolute Unix-style path: \" + ex.getInvalidPathValue(), ex);\n\n    } catch (InvalidContainerizingModeException ex) {\n      throw new GradleException(\n          \"invalid value for containerizingMode: \" + ex.getInvalidContainerizingMode(), ex);\n\n    } catch (InvalidWorkingDirectoryException ex) {\n      throw new GradleException(\n          \"container.workingDirectory is not an absolute Unix-style path: \"\n              + ex.getInvalidPathValue(),\n          ex);\n    } catch (InvalidPlatformException ex) {\n      throw new GradleException(\n          \"from.platforms contains a platform configuration that is missing required values or has invalid values: \"\n              + ex.getMessage()\n              + \": \"\n              + ex.getInvalidPlatform(),\n          ex);\n\n    } catch (InvalidContainerVolumeException ex) {\n      throw new GradleException(\n          \"container.volumes is not an absolute Unix-style path: \" + ex.getInvalidVolume(), ex);\n\n    } catch (InvalidFilesModificationTimeException ex) {\n      throw new GradleException(\n          \"container.filesModificationTime should be an ISO 8601 date-time (see \"\n              + \"DateTimeFormatter.ISO_DATE_TIME) or special keyword \\\"EPOCH_PLUS_SECOND\\\": \"\n              + ex.getInvalidFilesModificationTime(),\n          ex);\n\n    } catch (InvalidCreationTimeException ex) {","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildTarTask.java#L142-L178","documentation":"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.","triggerScenarios":"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').","commonSituations":"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.","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"],"exampleFix":"// before\njib { from { platforms { platform { architecture = 'x86_64' } } } } // invalid arch, no os\n// after\njib { from { platforms { platform { architecture = 'amd64'; os = 'linux' } } } }","handlingStrategy":"validation","validationCode":"def validArch = ['amd64','arm64']\ndef validOs = ['linux']\nproject.jib.from.platforms.get().each { p ->\n  def arch = p.architecture.getOrElse('')\n  def os = p.os.getOrElse('')\n  assert arch in validArch && os in validOs : \"Invalid platform: arch=$arch os=$os\"\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["jib","gradle","platform","validation","multi-arch"],"backgroundTag":"invalid-enum-value","analyzedSha":"fb949e2676afbbd7dd7a1ef61e20251931325654","analyzedAt":"2026-09-06T14:04:09.491Z","contentChangedAt":"2026-09-06T14:04:09.491Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}