{"record":{"id":"c7869e14fc3ca0e8","repo":"docker/compose","slug":"could-not-open-docker-desktop-compose-ui","errorCode":null,"errorMessage":"could not open Docker Desktop Compose UI","messagePattern":"could not open Docker Desktop Compose UI","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cmd/formatter/shortcut.go","lineNumber":234,"sourceCode":"\t\t\t\t\terr = fmt.Errorf(\"could not open Docker Desktop\")\n\t\t\t\t\tlk.keyboardError(\"View\", err)\n\t\t\t\t}\n\t\t\t\treturn err\n\t\t\t})()\n\t}()\n}\n\nfunc (lk *LogKeyboard) openDDComposeUI(ctx context.Context, project *types.Project) {\n\tif !lk.IsDockerDesktopActive {\n\t\treturn\n\t}\n\tgo func() {\n\t\t_ = tracing.EventWrapFuncForErrGroup(ctx, \"menu/gui/composeview\", tracing.SpanOptions{},\n\t\t\tfunc(ctx context.Context) error {\n\t\t\t\tlink := fmt.Sprintf(\"docker-desktop://dashboard/docker-compose/%s\", project.Name)\n\t\t\t\terr := open.Run(link)\n\t\t\t\tif err != nil {\n\t\t\t\t\terr = fmt.Errorf(\"could not open Docker Desktop Compose UI\")\n\t\t\t\t\tlk.keyboardError(\"View Config\", err)\n\t\t\t\t}\n\t\t\t\treturn err\n\t\t\t})()\n\t}()\n}\n\nfunc (lk *LogKeyboard) openDDLogsView(ctx context.Context, project *types.Project) {\n\tif !lk.IsLogsViewEnabled {\n\t\treturn\n\t}\n\tgo func() {\n\t\t_ = tracing.EventWrapFuncForErrGroup(ctx, \"menu/gui/logsview\", tracing.SpanOptions{},\n\t\t\tfunc(ctx context.Context) error {\n\t\t\t\tlink := desktop.BuildLogsURL(project.Name)\n\t\t\t\terr := open.Run(link)\n\t\t\t\tif err != nil {\n\t\t\t\t\terr = fmt.Errorf(\"could not open Docker Desktop Logs view: %w\", err)","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/docker/compose/blob/ddc4b044b62e9f715212ea4143fa830fac76382f/cmd/formatter/shortcut.go#L216-L252","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["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).","Update Docker Desktop to the latest release so the deep-link routes exist.","Re-run the compose menu after restarting Docker Desktop so the URL scheme handler is re-registered.","Ignore it if you do not need the GUI: 'o' is optional and compose continues normally.","Maintainers: preserve the cause with fmt.Errorf(\"could not open Docker Desktop Compose UI: %w\", err)."],"exampleFix":"// before\nerr := open.Run(link)\nif err != nil {\n    err = fmt.Errorf(\"could not open Docker Desktop Compose UI\")\n    lk.keyboardError(\"View Config\", err)\n}\n\n// after\nerr := open.Run(link)\nif err != nil {\n    err = fmt.Errorf(\"could not open Docker Desktop Compose UI: %w\", err)\n    lk.keyboardError(\"View Config\", err)\n}","handlingStrategy":"fallback","validationCode":"// cheap capability probe at menu start\nif _, err := desktopClient.Ping(ctx); err != nil {\n    lk.IsDockerDesktopActive = false // disables 'o' and friends\n}","typeGuard":null,"tryCatchPattern":"err := open.Run(link)\nif err != nil {\n    lk.keyboardError(\"View Config\", fmt.Errorf(\"could not open Docker Desktop Compose UI: %w\", err))\n    return nil // swallow; UI-only action\n}","preventionTips":["Keep Docker Desktop updated so deep-link routes exist.","Gate shortcuts on a live capability check, not a startup snapshot.","Wrap the underlying error for diagnosability."],"tags":["docker-desktop","keyboard-menu","gui","url-scheme","tui"],"backgroundTag":null,"analyzedSha":"ddc4b044b62e9f715212ea4143fa830fac76382f","analyzedAt":"2026-08-15T13:31:42.319Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}