{"record":{"id":"26550c3d36f5a813","repo":"GoogleContainerTools/jib","slug":"could-not-determine-jib-plugin-version","errorCode":null,"errorMessage":"Could not determine Jib plugin version","messagePattern":"Could not determine Jib plugin version","errorType":"exception","errorClass":"GradleException","httpStatus":null,"severity":"error","filePath":"jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/JibPlugin.java","lineNumber":78,"sourceCode":"              + GradleVersion.current()\n              + \", but jib requires \"\n              + GRADLE_MIN_VERSION\n              + \" or higher. You can upgrade by running 'gradle wrapper --gradle-version=\"\n              + GRADLE_MIN_VERSION.getVersion()\n              + \"'.\");\n    }\n  }\n\n  /** Check the Jib version matches the required version (if specified). */\n  private static void checkJibVersion() {\n    // todo: should retrieve from project properties?\n    String requiredVersion = System.getProperty(REQUIRED_VERSION_PROPERTY_NAME);\n    if (requiredVersion == null) {\n      return;\n    }\n    String actualVersion = GradleProjectProperties.TOOL_VERSION;\n    if (actualVersion == null) {\n      throw new GradleException(\"Could not determine Jib plugin version\");\n    }\n    VersionChecker<GradleVersion> checker = new VersionChecker<>(GradleVersion::version);\n    if (!checker.compatibleVersion(requiredVersion, actualVersion)) {\n      String failure =\n          String.format(\n              \"Jib plugin version is %s but is required to be %s\", actualVersion, requiredVersion);\n      throw new GradleException(failure);\n    }\n  }\n\n  @Override\n  public void apply(Project project) {\n    checkGradleVersion();\n    checkJibVersion();\n\n    JibExtension jibExtension =\n        project.getExtensions().create(JIB_EXTENSION_NAME, JibExtension.class, project);\n","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/JibPlugin.java#L60-L96","documentation":"checkJibVersion enforces the `jib.requiredVersion` system property (used by Skaffold to pin a compatible Jib version). When the property is set but GradleProjectProperties.TOOL_VERSION is null — Jib could not determine its own plugin version — plugin application fails with this GradleException because compatibility cannot be verified.","triggerScenarios":"Running with -Djib.requiredVersion=<x> (e.g. via _skaffoldFailIfJibOutOfDate) while GradleProjectProperties.TOOL_VERSION is null, usually because the plugin jar's version metadata (MANIFEST/implementation-version) is missing — e.g. a locally built, mangled, or shaded plugin jar.","commonSituations":"Using a locally-installed/published Jib plugin snapshot whose jar lost version metadata; classpath shading stripping the manifest; Skaffold-managed builds with a modified Jib plugin installation.","solutions":["Reinstall/rebuild the Jib plugin so its jar contains version metadata (use the official release from the plugin portal)","Check the plugin jar's MANIFEST.MF for Implementation-Version and rebuild if missing","Temporarily unset jib.requiredVersion / the Skaffold check to unblock the build, then fix the plugin install","Upgrade Skaffold and the Jib plugin together to matching supported versions"],"exampleFix":"null","handlingStrategy":"validation","validationCode":"if (System.getProperty('jib.requiredVersion') != null &&\n    GradleProjectProperties.TOOL_VERSION == null) {\n  logger.warn('jib.requiredVersion is set but plugin version metadata is missing; reinstall the Jib plugin')\n}","typeGuard":null,"tryCatchPattern":"try {\n  jib.build()\n} catch (GradleException e) {\n  if (e.message == 'Could not determine Jib plugin version') {\n    logger.error('Reinstall the Jib plugin from the official portal; jar is missing version metadata')\n  } else { throw e }\n}","preventionTips":["Install the Jib plugin only from the Gradle plugin portal / Maven Central","Avoid shaded or locally repackaged plugin jars in buildscript classpaths","Verify plugin jar MANIFEST Implementation-Version when using snapshots","Keep Skaffold and Jib plugin versions paired per Skaffold's compatibility notes"],"tags":["gradle","jib","version-check","plugin-metadata"],"backgroundTag":"missing-config-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"}