gohugoio/hugo · error
{}
Error message
{} What it means
Returned by dispatcherPool.Execute in internal/warpc/warpc.go:257 when the WASM codec call completed but the response header carried a non-empty Err string. The {} placeholder is that remote error text — i.e. the codec (webp/avif/etc.) reported a failure of its own.
Source
Thrown at internal/warpc/warpc.go:257
select {
case call = <-call.donec:
case <-p.donec:
return d.zeroR, p.Err()
case <-ctx.Done():
return d.zeroR, ctx.Err()
case <-timer.C:
return d.zeroR, errors.New("timeout")
}
if call.err != nil {
return d.zeroR, call.err
}
resp, err := call.response, p.Err()
if err == nil && resp.Header.Err != "" {
err = errors.New(resp.Header.Err)
}
return resp, err
}
func (d *dispatcher[Q, R]) newCall(q Message[Q]) (*call[Q, R], error) {
if q.Header.ID == 0 {
q.Header.ID = d.id.Add(1)
}
if err := q.init(); err != nil {
return nil, err
}
responseKinds := maphelpers.NewConcurrentMap[string, bool]()
for _, rk := range q.Header.ResponseKinds {
responseKinds.Set(rk, true)
}
call := &call[Q, R]{
donec: make(chan *call[Q, R], 1),View on GitHub (pinned to 52c9bd7908)
Solutions
- Inspect the full error text Hugo prints (the header Err) for the codec-specific reason.
- Validate the source image opens in a standard decoder before passing it to the Hugo pipeline.
- Re-encode the source (e.g. PNG/JPEG round-trip) to clear malformed metadata the codec rejects.
- Try a different output format to confirm whether the fault is codec-specific.
Example fix
// before
{{ $webp = $corruptImg.Resize "800x webp" }}
// after (validate first)
{{ $okImg = $corruptImg | fingerprint }}
{{ $webp = $okImg.Resize "800x webp" }} Defensive patterns
Strategy: validation
Validate before calling
// Validate the source decodes cleanly before the warpc pipeline.
{{ $img := resources.Get "x.png" }}
{{ if not $img }}{{ errorf "source image missing" }}{{ end }} Prevention
- Sanity-check source images with image.DecodeConfig before processing.
- Re-encode suspect sources to a clean PNG/JPEG first.
- Read the codec's header Err text to pinpoint the cause.
When it happens
Trigger: Any warpc codec invocation (image encode/decode/config) where the WASM plugin populates response.Header.Err — e.g. corrupt input bytes, unsupported color model, or an internal codec assertion.
Common situations: Feeding a truncated/corrupt image to the webp or avif codec, an unsupported pixel format, or a codec version that rejects the given parameters.
Related errors
- timeout
- ${value}
- Error reading from stdin
- Error parsing JSON '${new TextDecoder().decode(arr)}' from s
- webp: animated image has no frames
AI-assisted analysis of gohugoio/hugo@52c9bd7908 (2026-08-09).
Data as JSON: /api/errors/a06790ace10beb08.
Report an issue: GitHub.