docker/compose · warning
could not open Docker Desktop Logs view: %w
Error message
could not open Docker Desktop Logs view: %w
What it means
Raised by the compose navigation menu when the user presses 'l' (View Logs) and open.Run fails to open desktop.BuildLogsURL(project.Name) — a docker-desktop:// deep link to the DD logs view. Unlike errors 80/81 this one wraps the underlying error with %w, so the message includes the OS-level cause. It is gated on IsLogsViewEnabled and is display-only via keyboardError("View Logs", ...).
Source
Thrown at cmd/formatter/shortcut.go:252
err = fmt.Errorf("could not open Docker Desktop Compose UI")
lk.keyboardError("View Config", err)
}
return err
})()
}()
}
func (lk *LogKeyboard) openDDLogsView(ctx context.Context, project *types.Project) {
if !lk.IsLogsViewEnabled {
return
}
go func() {
_ = tracing.EventWrapFuncForErrGroup(ctx, "menu/gui/logsview", tracing.SpanOptions{},
func(ctx context.Context) error {
link := desktop.BuildLogsURL(project.Name)
err := open.Run(link)
if err != nil {
err = fmt.Errorf("could not open Docker Desktop Logs view: %w", err)
lk.keyboardError("View Logs", err)
}
return err
})()
}()
}
func (lk *LogKeyboard) openDDWatchDocs(ctx context.Context, project *types.Project) {
go func() {
_ = tracing.EventWrapFuncForErrGroup(ctx, "menu/gui/watch", tracing.SpanOptions{},
func(ctx context.Context) error {
link := fmt.Sprintf("docker-desktop://dashboard/docker-compose/%s/watch", project.Name)
err := open.Run(link)
if err != nil {
err = fmt.Errorf("could not open Docker Desktop Compose UI")
lk.keyboardError("Watch Docs", err)
}
return errView on GitHub (pinned to ddc4b044b6)
Solutions
- Read the wrapped cause in the displayed message — it names the actual OS failure (e.g. 'no application registered...', 'exec: no such file').
- Ensure Docker Desktop is running and up to date, then retry 'l'.
- Test the URL manually: xdg-open "docker-desktop://dashboard/docker-compose/<project>/logs" (adjust to the BuildLogsURL format).
- If DD support is flaky in your environment, use 'docker compose logs -f <svc>' instead of the 'l' shortcut.
Defensive patterns
Strategy: fallback
Validate before calling
if !lk.IsLogsViewEnabled || !desktopReachable() {
return // skip the 'l' action entirely
} Try / catch
if err := open.Run(link); err != nil {
// message already wraps cause with %w; display and continue
lk.keyboardError("View Logs", fmt.Errorf("could not open Docker Desktop Logs view: %w", err))
return nil
} Prevention
- Read the wrapped cause — it identifies the exact OS failure.
- Fall back to 'docker compose logs -f' when the DD link fails.
- Verify the logs feature exists in your DD version before enabling the shortcut.
When it happens
Trigger: Pressing 'l' in the menu when the logs view is enabled but the docker-desktop:// scheme cannot be opened: no handler registered, Docker Desktop not running, or a DD build that lacks the logs deep-link route.
Common situations: Feature-flagged logs view enabled against an older Docker Desktop that has no logs route; Docker Desktop crashed or was quit mid-session; Linux without a desktop session; project name containing characters the DD router rejects.
Related errors
- could not open Docker Desktop
- could not open Docker Desktop Compose UI
- --index requires one service to be selected
- watch is not yet configured. Learn more: %s
- unexpected status code: %d
AI-assisted analysis of docker/compose@ddc4b044b6 (2026-08-15).
Data as JSON: /api/errors/54683da848dec01a.
Report an issue: GitHub.