spring-projects/spring-boot · error · IllegalStateException
Error response received when pushing image: {}
Error message
Error response received when pushing image: {} What it means
ErrorCaptureUpdateListener watches the streaming JSON response from POST /images/{name}/push. If the daemon emits an event with a non-null errorDetail, the push failed and the listener throws IllegalStateException carrying the daemon's error message verbatim.
Source
Thrown at buildpack/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/DockerApi.java:631
private void assertValidResponseReceived() {
Assert.state(StringUtils.hasText(this.stream),
() -> "Invalid response received when loading image" + image());
}
}
/**
* {@link UpdateListener} used to capture the details of an error in a response
* stream.
*/
private static final class ErrorCaptureUpdateListener implements UpdateListener<PushImageUpdateEvent> {
@Override
public void onUpdate(PushImageUpdateEvent event) {
ErrorDetail errorDetail = event.getErrorDetail();
if (errorDetail != null) {
throw new IllegalStateException(
"Error response received when pushing image: " + errorDetail.getMessage());
}
}
}
enum Feature {
BASELINE(ApiVersion.of(1, 24)),
PLATFORM_IMAGE_PULL(ApiVersion.of(1, 41)),
PLATFORM_CONTAINER_CREATE(ApiVersion.of(1, 41)),
PLATFORM_IMAGE_INSPECT(ApiVersion.of(1, 49)),
PLATFORM_IMAGE_EXPORT(ApiVersion.of(1, 48));
View on GitHub (pinned to 270dfe353f)
Solutions
- Re-authenticate with the registry (docker login <registry>) and rerun the build
- Verify the image tag/namespace and that the user has push permission
- Inspect the Docker daemon logs for the full errorDetail, then retry
Defensive patterns
Strategy: retry
Validate before calling
// Verify push permission and credentials before pushing
try { docker.auth().registryAuthFor(registry); }
catch (Exception e) { /* credentials missing -- fix before push */ } Try / catch
try { docker.push(image); } catch (IllegalStateException ex) { log.error("Registry rejected push: {}", ex.getMessage()); /* re-auth then retry once */ } Prevention
- Run docker login <registry> before invoking the buildpack
- Verify the image tag/namespace matches the user's push permission
- Inspect daemon logs for the full errorDetail when a push fails
When it happens
Trigger: Push to a registry that rejected the manifest or a layer: authentication failure, authorization denied, quota exceeded, tag policy violation, mid-push network error.
Common situations: Missing or expired registry credentials; image name not matching the registry namespace the user can push to; registry storage quota exceeded; flaky network dropping the connection mid-push.
Related errors
- Invalid Docker {} registry configuration, either token or us
- Invalid Docker {type} registry configuration, either token o
- Docker API version must be at least %s to support this featu
- %s' exited with code %d: %s
- Error parsing Docker configuration file '{}'
AI-assisted analysis of spring-projects/spring-boot@270dfe353f (2026-08-11).
Data as JSON: /api/errors/c1b4fec7d1448c22.
Report an issue: GitHub.