GoogleContainerTools/skaffold · error
image is missing buildpacks metadata; perhaps built with old
Error message
image is missing buildpacks metadata; perhaps built with older lifecycle?
What it means
Fires in updateForCNBImage when transforming a Cloud Native Buildpacks (CNB) container for debugging: the image lacks the buildpacks metadata label expected on the image config, usually because it was built with an older Cloud Native Buildpacks lifecycle version that did not emit the metadata label.
Source
Thrown at pkg/skaffold/debug/cnb.go:116
// process is launched.
// 2. If the first argument is `--` then the remaining arguments are treated as a _direct exec_.
// 3. Otherwise the first argument is treated as a shell script launch with the first
// argument as the script and remaining arguments are positional arguments to the script.
// 2. If there are no arguments, a process type is taken from the `CNB_PROCESS_TYPE`
// environment variable, defaulting to `web`.
// - In Platform API 0.4 (pack 0.13 / lifecycle 0.9) the process types are turned into executables
// found in `/cnb/process/`, and the image entrypoint is set to the corresponding executable for
// the default process type. `CNB_PROCESS_TYPE` is ignored in this situation. A different process
// can be used by overriding the image entrypoint. Direct and script launches are supported by
// setting the entrypoint to `/cnb/lifecycle/launcher` and providing the appropriate arguments.
func updateForCNBImage(adapter types.ContainerAdapter, ic ImageConfiguration, transformer func(adapter types.ContainerAdapter, ic ImageConfiguration) (types.ContainerDebugConfiguration, string, error)) (types.ContainerDebugConfiguration, string, error) {
// buildpacks/lifecycle 0.6.0 embeds the process definitions into a special image label.
// The build metadata isn't absolutely required as the image args could be
// a command line (e.g., `python xxx`) but it likely indicates the
// image was built with an older lifecycle.
metadataJSON, found := ic.Labels["io.buildpacks.build.metadata"]
if !found {
return types.ContainerDebugConfiguration{}, "", fmt.Errorf("image is missing buildpacks metadata; perhaps built with older lifecycle?")
}
m := cnb.BuildMetadata{}
if err := json.Unmarshal([]byte(metadataJSON), &m); err != nil {
return types.ContainerDebugConfiguration{}, "", fmt.Errorf("unable to parse image buildpacks metadata")
}
if len(m.Processes) == 0 {
return types.ContainerDebugConfiguration{}, "", fmt.Errorf("buildpacks metadata has no processes")
}
needsCnbLauncher := ic.Entrypoint[0] != cnbLauncher
// Rewrites the command-line with cnbLauncher as the entrypoint
ic, rewriter := adjustCommandLine(m, ic)
// The CNB launcher uses CNB_APP_DIR (defaults to /workspace) and ignores the image's working directory.
if appDir := ic.Env["CNB_APP_DIR"]; appDir != "" {
ic.WorkingDir = appDir
} else {
ic.WorkingDir = "/workspace"View on GitHub (pinned to a1189de023)
Solutions
- Rebuild the image with a recent pack/lifecycle version so buildpacks metadata is embedded
- If debugging support isn't needed for this image, disable the debug transform or skip `skaffold debug` for it
- Pin compatible builder/lifecycle versions in the buildpack build config
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pkg/skaffold/debug/cnb.go:116 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/4e61d7f7755baca5.
Report an issue: GitHub.