{"record":{"id":"92dfbcdf3524c48d","repo":"GoogleContainerTools/jib","slug":"from-platforms-contains-a-platform-configuratio-92dfbc","errorCode":null,"errorMessage":"<from><platforms> contains a platform configuration that is missing required values or has invalid values: <message>: <invalidPlatform>","messagePattern":"<from><platforms> contains a platform configuration that is missing required values or has invalid values: <message>: <invalidPlatform>","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildImageMojo.java","lineNumber":134,"sourceCode":"              new MavenHelpfulSuggestions(HELPFUL_SUGGESTIONS_PREFIX))\n          .runBuild();\n\n    } catch (InvalidAppRootException ex) {\n      throw new MojoExecutionException(\n          \"<container><appRoot> is not an absolute Unix-style path: \" + ex.getInvalidPathValue(),\n          ex);\n\n    } catch (InvalidContainerizingModeException ex) {\n      throw new MojoExecutionException(\n          \"invalid value for <containerizingMode>: \" + ex.getInvalidContainerizingMode(), ex);\n\n    } catch (InvalidWorkingDirectoryException ex) {\n      throw new MojoExecutionException(\n          \"<container><workingDirectory> is not an absolute Unix-style path: \"\n              + ex.getInvalidPathValue(),\n          ex);\n    } catch (InvalidPlatformException ex) {\n      throw new MojoExecutionException(\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    } catch (InvalidContainerVolumeException ex) {\n      throw new MojoExecutionException(\n          \"<container><volumes> is not an absolute Unix-style path: \" + ex.getInvalidVolume(), ex);\n\n    } catch (InvalidFilesModificationTimeException ex) {\n      throw new MojoExecutionException(\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) {\n      throw new MojoExecutionException(","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildImageMojo.java#L116-L152","documentation":"When multi-platform images are configured via <from><platforms>, each platform entry must have valid required fields (architecture, os, and optionally variant, etc.). InvalidPlatformException carries a reason message and the offending platform configuration; execute() wraps it into a MojoExecutionException combining both.","triggerScenarios":"Declaring <platform> entries with missing <architecture> or <os>; using empty values; malformed values for optional fields like os.version or architecture variants; multiple platform blocks where one is incomplete.","commonSituations":"Building multi-arch images (e.g. amd64/arm64) for the first time and omitting <os>; typo'd platform fields; XML structure mistakes nesting <platform> outside <platforms>.","solutions":["Ensure every <platform> has both <architecture> (e.g. amd64) and <os> (e.g. linux).","Read the reason in the message to identify the specific invalid field and correct it.","Verify the XML nesting: <platforms><platform>...</platform></platforms>."],"exampleFix":"// before\n<platforms><platform><architecture>amd64</architecture></platform></platforms>\n// after\n<platforms><platform><architecture>amd64</architecture><os>linux</os></platform></platforms>","handlingStrategy":"validation","validationCode":"for (Platform p : platforms) {\n  if (p.getArchitecture() == null || p.getArchitecture().isEmpty() || p.getOs() == null || p.getOs().isEmpty()) {\n    throw new IllegalArgumentException(\"Each <platform> requires non-empty <architecture> and <os>\");\n  }\n}","typeGuard":null,"tryCatchPattern":"catch (MojoExecutionException e) { if (e.getMessage().contains(\"platforms\")) { /* fix the platform fields named in the message */ } }","preventionTips":["Always specify both <architecture> and <os> in every <platform>","Use standard values like amd64/arm64 and linux","Verify XML nesting of <platforms><platform>"],"tags":["maven","jib","configuration","platforms","validation"],"backgroundTag":"invalid-config-value","analyzedSha":"fb949e2676afbbd7dd7a1ef61e20251931325654","analyzedAt":"2026-09-06T14:04:09.491Z","contentChangedAt":"2026-09-06T14:04:09.491Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}