rancher/rancher · error
invalid value for maxCpuCores query param
Error message
invalid value for maxCpuCores query param
What it means
Thrown when json.Unmarshal fails on the manifest blob fetched into memory (pkg/catalogv2/oci/client.go:172), i.e. the stored bytes are not a valid ocispecv1.Manifest JSON document. The media-type check already passed, so this means structurally invalid JSON or a manifest shape the OCI struct cannot decode.
Source
Thrown at pkg/api/norman/customization/alibaba/listers.go:134
if cpuArch != "" {
request.CpuArchitecture = tea.String(cpuArch)
}
minCPUStr := req.URL.Query().Get("minCpuCores")
if minCPUStr != "" {
minCPU, err := strconv.ParseInt(minCPUStr, 10, 32)
if err != nil {
return nil, http.StatusBadRequest, errors.New("invalid value for minCpuCores query param")
}
minCPU32 := int32(minCPU)
request.MinimumCpuCoreCount = &minCPU32
}
maxCPUStr := req.URL.Query().Get("maxCpuCores")
if maxCPUStr != "" {
maxCPU, err := strconv.ParseInt(maxCPUStr, 10, 32)
if err != nil {
return nil, http.StatusBadRequest, errors.New("invalid value for maxCpuCores query param")
}
maxCPU32 := int32(maxCPU)
request.MaximumCpuCoreCount = &maxCPU32
}
minMemoryStr := req.URL.Query().Get("minMemorySize")
if minMemoryStr != "" {
minMemory, err := strconv.ParseFloat(minMemoryStr, 32)
if err != nil {
return nil, http.StatusBadRequest, errors.New("invalid value for minMemorySize query param")
}
minMemory32 := float32(minMemory)
request.MinimumMemorySize = &minMemory32
}
maxMemoryStr := req.URL.Query().Get("maxMemorySize")
if maxMemoryStr != "" {
maxMemory, err := strconv.ParseFloat(maxMemoryStr, 32)View on GitHub (pinned to 932558d4e6)
Solutions
- Inspect the raw manifest: 'oras manifest fetch <url>' — if it is not clean JSON, the artifact is broken
- Re-push the chart with helm push to replace the corrupt manifest
- Fix any reverse proxy in front of the registry that rewrites or truncates response bodies
Defensive patterns
Strategy: retry
Try / catch
var syn *json.SyntaxError
if errors.As(err, &syn) {
// blob bytes are not JSON: artifact or proxy is corrupt.
// Do not retry blindly; verify the manifest out-of-band, then re-push.
} Prevention
- Ensure reverse proxies in front of the registry pass response bodies through untouched
- Verify pushes completed successfully before tagging a release
- Smoke-test artifacts after publish with 'oras manifest fetch'
When it happens
Trigger: The manifest blob is corrupt or truncated — a bad push, a registry backend returning an HTML error page captured as the blob, or a proxy mangling the response body.
Common situations: Corrupted artifact from an interrupted push; registries behind misconfigured reverse proxies that inject error pages with 200 status; extremely rare on healthy registries.
Related errors
- unable to unmarshal manifest blob of %s: %w
- regionId can not be empty
- received empty response
- invalid value for maxResults query param
- invalid value for minCpuCores query param
AI-assisted analysis of rancher/rancher@932558d4e6 (2026-08-16).
Data as JSON: /api/errors/bf753961242bf49e.
Report an issue: GitHub.