multica-ai/multica · warning

unsupported platform

Error message

unsupported platform: %s

What it means

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.

Solutions

  1. Copy the printed login URL and open it manually in any browser — the callback server still receives the token
  2. Use token-based login instead: `multica login --token <PAT>`
  3. On unsupported platforms, run the login flow on a supported machine and copy the saved profile/config over

Example fix

# instead of browser flow on an unsupported OS
multica login --token mul_ABCdef123...
Defensive patterns

Strategy: fallback

Validate before calling

uname=$(uname -s 2>/dev/null || echo unknown)
case "$uname" in Darwin|Linux) browser_ok=1;; *) browser_ok=0;; esac
[ "$browser_ok" = 1 ] || MULTICA_LOGIN_MODE=token   # your own dispatch convention

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15). Data as JSON: /api/errors/9576200b4091925d. Report an issue: GitHub.

Appendix: source

Thrown at server/cmd/multica/cmd_auth.go:119

	os.Exit(1)
	return "" // unreachable
}

func openBrowser(url string) error {
	var cmd string
	var args []string
	switch runtime.GOOS {
	case "darwin":
		cmd = "open"
		args = []string{url}
	case "linux":
		cmd = "xdg-open"
		args = []string{url}
	case "windows":
		cmd = "rundll32"
		args = []string{"url.dll,FileProtocolHandler", url}
	default:
		return fmt.Errorf("unsupported platform: %s", runtime.GOOS)
	}
	return exec.Command(cmd, args...).Start()
}

func runAuthLogin(cmd *cobra.Command, args []string) error {
	if err := requireHumanLocalCommand("login"); err != nil {
		return err
	}
	if cmd.Flags().Changed("token") {
		tokenFlag, _ := cmd.Flags().GetString("token")
		// `--token mul_xxx` (space form) is what users actually type — that's
		// the form from the docs and from #1994. NoOptDefVal prevents pflag
		// from consuming the next arg as the flag value, so it lands here as
		// a positional. Promote it to the token value.
		if tokenFlag == tokenPromptSentinel && len(args) == 1 {
			tokenFlag = args[0]
		}
		return runAuthLoginToken(cmd, tokenFlag)

View on GitHub (pinned to 2c0912b6ec)