wagoodman/dive · error
controller unable to update view: %w
Error message
controller unable to update view: %w
What it means
The root cause wrapped by errors 25/26: controller.Update() iterates all registered view renderers and this wraps the first view whose Update() returns an error. It identifies the state-refresh phase of the TUI loop, immediately before rendering.
Source
Thrown at cmd/dive/cli/internal/ui/v1/app/controller.go:134
err := c.Update()
if err != nil {
return fmt.Errorf("controller failed update: %w", err)
}
err = c.Render()
if err != nil {
return fmt.Errorf("controller failed render: %w", err)
}
return nil
}
// Update refreshes the state objects for future rendering.
func (c *controller) Update() error {
for _, v := range c.views.Renderers() {
err := v.Update()
if err != nil {
return fmt.Errorf("controller unable to update view: %w", err)
}
}
return nil
}
// Render flushes the state objects to the screen.
func (c *controller) Render() error {
for _, v := range c.views.Renderers() {
if v.IsVisible() {
err := v.Render()
if err != nil {
return err
}
}
}
return nil
}
View on GitHub (pinned to d6c691947f)
Solutions
- Capture the full error chain (fmt %w preserves the view-level cause) and note which interaction triggered it (layer switch, filter, toggle).
- Re-run with the same image avoiding that interaction to confirm the trigger, then report upstream.
- Try a newer dive release; several view-state bugs were fixed over time.
- Fall back to non-interactive mode (--json or --ci) while the TUI bug blocks you.
Defensive patterns
Strategy: fallback
Prevention
- Use --json/--ci modes when automating; view update errors only occur in the TUI.
- Note which keypress precedes the failure to include in bug reports.
- Keep dive updated; view-state fixes land regularly.
When it happens
Trigger: Any of the views (layer list, layer details, image details, filetree, filter, status) failing to recompute its display state — commonly nil-pointer access on analysis data or an invalid current-layer index after the user switches layers or toggles aggregation.
Common situations: Images where a layer has no file data (foreign/scratch layers); switching between aggregated and per-layer views on images with a single layer; stale view state after rapid key input.
Related errors
- controller failed update: %w
- controller failed render: %w
- controller unable to switch to next pane: %w
- controller unable to switch to previous pane: %w
- controller unable to toggle view: %w
AI-assisted analysis of wagoodman/dive@d6c691947f (2026-08-15).
Data as JSON: /api/errors/880b30da6717c456.
Report an issue: GitHub.