{"record":{"id":"54683da848dec01a","repo":"docker/compose","slug":"could-not-open-docker-desktop-logs-view-w","errorCode":null,"errorMessage":"could not open Docker Desktop Logs view: %w","messagePattern":"could not open Docker Desktop Logs view: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cmd/formatter/shortcut.go","lineNumber":252,"sourceCode":"\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)\n\t\t\t\t\tlk.keyboardError(\"View Logs\", err)\n\t\t\t\t}\n\t\t\t\treturn err\n\t\t\t})()\n\t}()\n}\n\nfunc (lk *LogKeyboard) openDDWatchDocs(ctx context.Context, project *types.Project) {\n\tgo func() {\n\t\t_ = tracing.EventWrapFuncForErrGroup(ctx, \"menu/gui/watch\", tracing.SpanOptions{},\n\t\t\tfunc(ctx context.Context) error {\n\t\t\t\tlink := fmt.Sprintf(\"docker-desktop://dashboard/docker-compose/%s/watch\", 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(\"Watch Docs\", err)\n\t\t\t\t}\n\t\t\t\treturn err","sourceCodeStart":234,"sourceCodeEnd":270,"githubUrl":"https://github.com/docker/compose/blob/ddc4b044b62e9f715212ea4143fa830fac76382f/cmd/formatter/shortcut.go#L234-L270","documentation":"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\", ...).","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"if !lk.IsLogsViewEnabled || !desktopReachable() {\n    return // skip the 'l' action entirely\n}","typeGuard":null,"tryCatchPattern":"if err := open.Run(link); err != nil {\n    // message already wraps cause with %w; display and continue\n    lk.keyboardError(\"View Logs\", fmt.Errorf(\"could not open Docker Desktop Logs view: %w\", err))\n    return nil\n}","preventionTips":["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."],"tags":["docker-desktop","keyboard-menu","logs","url-scheme","tui"],"backgroundTag":null,"analyzedSha":"ddc4b044b62e9f715212ea4143fa830fac76382f","analyzedAt":"2026-08-15T13:31:42.319Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}