docker/compose · warning

could not open Docker Desktop Compose UI

Error message

could not open Docker Desktop Compose UI

What it means

Raised by the compose navigation menu when the user presses 'o' (View Config) and open.Run fails for the docker-desktop://dashboard/docker-compose/<project> deep link. It is display-only (keyboardError("View Config", ...)) inside a detached goroutine; compose itself is unaffected. Like error 80, it discards the underlying open.Run error, so the true cause is not visible.

Source

Thrown at cmd/formatter/shortcut.go:234

					err = fmt.Errorf("could not open Docker Desktop")
					lk.keyboardError("View", err)
				}
				return err
			})()
	}()
}

func (lk *LogKeyboard) openDDComposeUI(ctx context.Context, project *types.Project) {
	if !lk.IsDockerDesktopActive {
		return
	}
	go func() {
		_ = tracing.EventWrapFuncForErrGroup(ctx, "menu/gui/composeview", tracing.SpanOptions{},
			func(ctx context.Context) error {
				link := fmt.Sprintf("docker-desktop://dashboard/docker-compose/%s", project.Name)
				err := open.Run(link)
				if err != nil {
					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)

View on GitHub (pinned to ddc4b044b6)

Solutions

  1. Confirm Docker Desktop is running and is a recent version that ships the Compose dashboard (open docker-desktop://dashboard/docker-compose/<name> manually in a browser/launcher).
  2. Update Docker Desktop to the latest release so the deep-link routes exist.
  3. Re-run the compose menu after restarting Docker Desktop so the URL scheme handler is re-registered.
  4. Ignore it if you do not need the GUI: 'o' is optional and compose continues normally.
  5. Maintainers: preserve the cause with fmt.Errorf("could not open Docker Desktop Compose UI: %w", err).

Example fix

// before
err := open.Run(link)
if err != nil {
    err = fmt.Errorf("could not open Docker Desktop Compose UI")
    lk.keyboardError("View Config", err)
}

// after
err := open.Run(link)
if err != nil {
    err = fmt.Errorf("could not open Docker Desktop Compose UI: %w", err)
    lk.keyboardError("View Config", err)
}
Defensive patterns

Strategy: fallback

Validate before calling

// cheap capability probe at menu start
if _, err := desktopClient.Ping(ctx); err != nil {
    lk.IsDockerDesktopActive = false // disables 'o' and friends
}

Try / catch

err := open.Run(link)
if err != nil {
    lk.keyboardError("View Config", fmt.Errorf("could not open Docker Desktop Compose UI: %w", err))
    return nil // swallow; UI-only action
}

Prevention

When it happens

Trigger: Pressing 'o' in the menu while IsDockerDesktopActive is true but the OS has no working handler for the docker-desktop:// scheme, or Docker Desktop rejects/ignores the deep link (older DD version without the compose dashboard route).

Common situations: Older Docker Desktop versions that predate the docker-compose dashboard route; DD installed but not running; Linux hosts with no desktop environment or a broken xdg-open; DD upgraded while the compose menu session was still attached to a stale detection result.

Related errors


AI-assisted analysis of docker/compose@ddc4b044b6 (2026-08-15). Data as JSON: /api/errors/c7869e14fc3ca0e8. Report an issue: GitHub.