{"record":{"id":"9576200b4091925d","repo":"multica-ai/multica","slug":"unsupported-platform-s","errorCode":null,"errorMessage":"unsupported platform: %s","messagePattern":"unsupported platform: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"server/cmd/multica/cmd_auth.go","lineNumber":119,"sourceCode":"\tos.Exit(1)\n\treturn \"\" // unreachable\n}\n\nfunc openBrowser(url string) error {\n\tvar cmd string\n\tvar args []string\n\tswitch runtime.GOOS {\n\tcase \"darwin\":\n\t\tcmd = \"open\"\n\t\targs = []string{url}\n\tcase \"linux\":\n\t\tcmd = \"xdg-open\"\n\t\targs = []string{url}\n\tcase \"windows\":\n\t\tcmd = \"rundll32\"\n\t\targs = []string{\"url.dll,FileProtocolHandler\", url}\n\tdefault:\n\t\treturn fmt.Errorf(\"unsupported platform: %s\", runtime.GOOS)\n\t}\n\treturn exec.Command(cmd, args...).Start()\n}\n\nfunc runAuthLogin(cmd *cobra.Command, args []string) error {\n\tif err := requireHumanLocalCommand(\"login\"); err != nil {\n\t\treturn err\n\t}\n\tif cmd.Flags().Changed(\"token\") {\n\t\ttokenFlag, _ := cmd.Flags().GetString(\"token\")\n\t\t// `--token mul_xxx` (space form) is what users actually type — that's\n\t\t// the form from the docs and from #1994. NoOptDefVal prevents pflag\n\t\t// from consuming the next arg as the flag value, so it lands here as\n\t\t// a positional. Promote it to the token value.\n\t\tif tokenFlag == tokenPromptSentinel && len(args) == 1 {\n\t\t\ttokenFlag = args[0]\n\t\t}\n\t\treturn runAuthLoginToken(cmd, tokenFlag)","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_auth.go#L101-L137","documentation":"openBrowser maps runtime.GOOS to an opener command: open (darwin), xgk-open... specifically xdg-open (linux), rundll32 (windows). Any other GOOS (freebsd, openbsd, plan9, js/wasm...) has no mapping and returns this error. Note: in the browser-login flow the caller catches this and merely prints 'Could not open browser automatically', so it is not fatal there.","triggerScenarios":"Building/running the CLI on an OS outside darwin/linux/windows and triggering a flow that calls openBrowser (login). With BROWSER-less environments the error is downgraded to a message with a manual URL.","commonSituations":"Running the CLI on BSD variants; cross-compiling and running under an emulator reporting an unusual GOOS; login over SSH where the browser cannot open anyway.","solutions":["Copy the printed login URL and open it manually in any browser — the callback server still receives the token","Use token-based login instead: `multica login --token <PAT>`","On unsupported platforms, run the login flow on a supported machine and copy the saved profile/config over"],"exampleFix":"# instead of browser flow on an unsupported OS\nmultica login --token mul_ABCdef123...","handlingStrategy":"fallback","validationCode":"uname=$(uname -s 2>/dev/null || echo unknown)\ncase \"$uname\" in Darwin|Linux) browser_ok=1;; *) browser_ok=0;; esac\n[ \"$browser_ok\" = 1 ] || MULTICA_LOGIN_MODE=token   # your own dispatch convention","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prefer `multica login --token <PAT>` on unusual platforms and headless boxes","When browser open fails, always use the printed URL manually — the callback listener still works"],"tags":["cli","auth","platform","browser"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}