santifer/career-ops · error

opening URLs is not supported on

Error message

opening URLs is not supported on %s

What it means

Compile-time-selected stub in the dashboard Go binary: open_unsupported.go carries the build tag `!windows && !darwin && !linux`, so any other GOOS (freebsd, netbsd, openbsd, plan9, js/wasm, ...) compiles openWithDefaultApp() to an unconditional error naming runtime.GOOS. The project ships real openers only for windows (shell open), darwin (open), and linux (xdg-open).

Solutions

  1. Build/run the dashboard on windows, darwin, or linux — the supported opener set
  2. Add your own build-tagged implementation (e.g. open_bsd.go with xdg-open, which exists on most BSDs) mirroring the linux file
  3. If you control the call site, catch this error and surface the raw URL so the user can open it manually

Example fix

// before: only open_linux.go / open_darwin.go / open_windows.go exist
// after: add dashboard/open_bsd.go
//go:build freebsd || netbsd || openbsd

package main

import "os/exec"

func openWithDefaultApp(target string) error {
	return exec.Command("xdg-open", target).Start()
}
Defensive patterns

Strategy: fallback

Validate before calling

switch runtime.GOOS {
case "windows", "darwin", "linux":
    // openWithDefaultApp is safe to call
default:
    fmt.Printf("open manually: %s\n", target) // fallback instead of erroring
}

Type guard

func canOpenURLs() bool {
	switch runtime.GOOS {
	case "windows", "darwin", "linux":
		return true
	default:
		return false
	}
}

Try / catch

if err := openWithDefaultApp(u); err != nil {
    if strings.Contains(err.Error(), "opening URLs is not supported") {
        fmt.Printf("Open in your browser: %s\n", u) // degrade gracefully
    } else {
        return err
    }
}

Prevention

When it happens

Trigger: `GOOS=freebsd go build ./dashboard` (or running a cross-compiled binary) and then clicking/opening a URL that routes to openWithDefaultApp(target). Everything else in the dashboard builds; only browser-opening is stubbed out.

Common situations: Packaging the dashboard for a BSD or niche OS; GOOS=js/wasm experiments; CI cross-compilation matrices that build for all platforms without running them.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


AI-assisted analysis of santifer/career-ops@60398d6549 (2026-08-20). Data as JSON: /api/errors/6c9c829cde40c633. Report an issue: GitHub.

Appendix: source

Thrown at dashboard/open_unsupported.go:11

//go:build !windows && !darwin && !linux

package main

import (
	"fmt"
	"runtime"
)

func openWithDefaultApp(target string) error {
	return fmt.Errorf("opening URLs is not supported on %s", runtime.GOOS)
}

View on GitHub (pinned to 60398d6549)