{"record":{"id":"274467a9fbc25e3a","repo":"multica-ai/multica","slug":"server-url-not-configured","errorCode":null,"errorMessage":"server URL not configured","messagePattern":"server URL not configured","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_login.go","lineNumber":100,"sourceCode":"\tfmt.Fprintf(os.Stderr, \"\\n→ Run 'multica daemon start' to start your local agent runtime.\\n\")\n\treturn nil\n}\n\nfunc autoWatchWorkspaces(cmd *cobra.Command) error {\n\t// runLogin has already passed the human/local command guard and saved the\n\t// newly authenticated profile. Read that exact profile here rather than the\n\t// general task-safe resolvers, which intentionally fail closed on a lone\n\t// MULTICA_DAEMON_PORT signal.\n\tprofile := resolveProfile(cmd)\n\tcfg, err := cli.LoadCLIConfigForProfile(profile)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif cfg.Token == \"\" {\n\t\treturn fmt.Errorf(\"not authenticated\")\n\t}\n\tif cfg.ServerURL == \"\" {\n\t\treturn fmt.Errorf(\"server URL not configured\")\n\t}\n\n\tclient := cli.NewAPIClient(normalizeAPIBaseURL(cfg.ServerURL), \"\", cfg.Token)\n\tctx, cancel := cli.APIContext(context.Background())\n\tdefer cancel()\n\n\tvar workspaces []struct {\n\t\tID   string `json:\"id\"`\n\t\tName string `json:\"name\"`\n\t}\n\tif err := client.GetJSON(ctx, \"/api/workspaces\", &workspaces); err != nil {\n\t\treturn fmt.Errorf(\"list workspaces: %w\", err)\n\t}\n\n\tif len(workspaces) == 0 {\n\t\tvar err error\n\t\tworkspaces, err = waitForWorkspaceCreation(cmd, client)\n\t\tif err != nil {","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_login.go#L82-L118","documentation":"Thrown by autoWatchWorkspaces when the saved profile has a token but an empty ServerURL, so the CLI cannot construct an API client base URL. It is the second fail-closed guard (after the token check) in the post-login workspace watch flow.","triggerScenarios":"Profile config written with a token but no server URL — e.g. a login against an implicit/default server whose URL was not persisted; manual editing of the config file that dropped the field; a config schema change losing the key.","commonSituations":"Hand-edited or migrated config files; older CLI versions writing a different field name; provisioning scripts that create partial profiles.","solutions":["Set the server URL in the profile config (or via the CLI's server configuration flag/env) and re-run login","Re-run `multica login` fully so both token and server URL are persisted together","Check for config field rename if upgrading from an older CLI version"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# bash: confirm both token and server URL before relying on the profile\nmultica config show --output json 2>/dev/null \\\n  | jq -e '.server_url | length > 0' >/dev/null \\\n  || { echo \"server URL missing in profile — set it and re-login\" >&2; exit 2; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never hand-edit profiles to drop server URLs","After upgrades, check for renamed config fields","Complete the full login flow so token and URL persist together"],"tags":["cli","config","auth"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}