GoogleContainerTools/jib · error · InvalidPlatformException

platform configuration is missing an architecture value

Error message

platform configuration is missing an architecture value

What it means

InvalidPlatformException thrown by PluginConfigurationProcessor.getPlatformsSet() — a validation helper parsing the <platforms>/<platform> configuration into Platform objects. It fires when a PlatformConfiguration entry omits the required 'architecture' field (e.g. a platform specified with only os, or an empty <platform> element), so the multi-platform build list cannot be constructed; the build aborts rather than guessing a default architecture.

Source

Thrown at jib-plugins-common/src/main/java/com/google/cloud/tools/jib/plugins/common/PluginConfigurationProcessor.java:809

   * Parses the list of platforms to a set of {@link Platform}.
   *
   * @param rawConfiguration raw configuration data
   * @return the set of parsed platforms
   * @throws InvalidPlatformException if there exists a {@link PlatformConfiguration} in the
   *     specified platforms list that is missing required fields or has invalid values
   */
  @VisibleForTesting
  static Set<Platform> getPlatformsSet(RawConfiguration rawConfiguration)
      throws InvalidPlatformException {
    Set<Platform> platforms = new LinkedHashSet<>();
    for (PlatformConfiguration platformConfiguration : rawConfiguration.getPlatforms()) {
      Optional<String> architecture = platformConfiguration.getArchitectureName();
      Optional<String> os = platformConfiguration.getOsName();
      String platformToString =
          "architecture=" + architecture.orElse("<missing>") + ", os=" + os.orElse("<missing>");

      if (!architecture.isPresent()) {
        throw new InvalidPlatformException(
            "platform configuration is missing an architecture value", platformToString);
      }
      if (!os.isPresent()) {
        throw new InvalidPlatformException(
            "platform configuration is missing an OS value", platformToString);
      }

      platforms.add(new Platform(architecture.get(), os.get()));
    }
    return platforms;
  }

  /**
   * Parses the list of raw volumes directories to a set of {@link AbsoluteUnixPath}.
   *
   * @param rawConfiguration raw configuration data
   * @return the set of parsed volumes.
   * @throws InvalidContainerVolumeException if {@code volumes} are not valid absolute Unix paths

View on GitHub (pinned to fb949e2676)

Solutions

  1. Add an <architecture> (e.g. amd64, arm64) to every <platform> entry in the jib configuration
  2. Remove empty or incomplete <platform> elements from <platforms>
  3. Verify plugin configuration XML/DSL structure so the architecture value is actually bound (correct nesting and property name)
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at jib-plugins-common/src/main/java/com/google/cloud/tools/jib/plugins/common/PluginConfigurationProcessor.java:809 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06). Data as JSON: /api/errors/363a509ba09459d5. Report an issue: GitHub.