{"record":{"id":"4040abab9dbb995f","repo":"multica-ai/multica","slug":"cannot-resolve-the-state-directory-for-profile-q","errorCode":null,"errorMessage":"cannot resolve the state directory for profile %q","messagePattern":"cannot resolve the state directory for profile %q","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_daemon.go","lineNumber":1533,"sourceCode":"\t\treturn \"default\"\n\t}\n\treturn profile\n}\n\n// daemonLogSourcePath resolves the daemon.log path for a profile —\n// ~/.multica/daemon.log for the default profile,\n// ~/.multica/profiles/<name>/daemon.log for a named one — and guarantees it is\n// absolute, because this path is shown to the user to paste into an editor or\n// another shell.\n//\n// A relative result means daemonDirForProfile could not resolve the home\n// directory and swallowed the error, leaving a bare \"daemon.log\". That is\n// reported instead of returned: it would resolve against the caller's cwd and\n// name a file with nothing to do with the daemon.\nfunc daemonLogSourcePath(profile string) (string, error) {\n\tlogPath := daemonLogPathForProfile(profile)\n\tif !filepath.IsAbs(logPath) {\n\t\treturn \"\", fmt.Errorf(\"cannot resolve the state directory for profile %q\", profileLabel(profile))\n\t}\n\treturn logPath, nil\n}\n\nfunc runDaemonLogs(cmd *cobra.Command, _ []string) error {\n\tif err := requireHumanLocalCommand(\"daemon logs\"); err != nil {\n\t\treturn err\n\t}\n\tprofile := resolveProfile(cmd)\n\tif err := requireKnownProfile(profile); err != nil {\n\t\treturn err\n\t}\n\tlogPath, err := daemonLogSourcePath(profile)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif _, err := os.Stat(logPath); os.IsNotExist(err) {\n\t\treturn fmt.Errorf(\"no log file found at %s\\nThe daemon may not have been started in background mode\", logPath)","sourceCodeStart":1515,"sourceCodeEnd":1551,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_daemon.go#L1515-L1551","documentation":"Error \"cannot resolve the state directory for profile %q\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/cmd/multica/cmd_daemon.go:1533 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the profile name and daemon state directory configuration."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}