wavetermdev/waveterm · error
DefaultDistro not implemented on this system
Error message
DefaultDistro not implemented on this system
What it means
Stub error: the WSL DefaultDistro accessor has no implementation on non-Windows (Unix) systems. The wsl-unix build provides the WSL API surface but these operations only exist on Windows, so calling DefaultDistro returns this not-implemented error.
Source
Thrown at pkg/wsl/wsl-unix.go:25
import (
"context"
"fmt"
"io"
"os"
"os/exec"
)
type WslName struct {
Distro string `json:"distro"`
}
func RegisteredDistros(ctx context.Context) (distros []Distro, err error) {
return nil, fmt.Errorf("RegisteredDistros not implemented on this system")
}
func DefaultDistro(ctx context.Context) (d Distro, ok bool, err error) {
return d, false, fmt.Errorf("DefaultDistro not implemented on this system")
}
type Distro struct{}
func (d *Distro) Name() string {
return ""
}
func (d *Distro) WslCommand(ctx context.Context, cmd string) *WslCmd {
return nil
}
// just use the regular cmd since it's
// similar enough to not cause issues
// type WslCmd = exec.Cmd
type WslCmd struct {
exec.Cmd
}View on GitHub (pinned to a4447c1563)
Solutions
- Gate calls behind runtime.GOOS == "windows"
- On Windows, ensure WSL is installed if you also hit the Windows variant of this failure
- Skip WSL-dependent tests/features on non-Windows hosts
Example fix
// before
d, ok, err := wsl.DefaultDistro(ctx)
// after
if runtime.GOOS != "windows" {
return errors.New("WSL default distro requires Windows")
}
d, ok, err := wsl.DefaultDistro(ctx) Defensive patterns
Strategy: fallback
Validate before calling
if runtime.GOOS != "windows" {
return errors.New("no default WSL distro on non-Windows hosts")
} Try / catch
d, ok, err := wsl.DefaultDistro(ctx)
if err != nil || !ok {
// non-Windows (or WSL absent): use local/SSH connection instead
} Prevention
- Check the platform before resolving a WSL default distro
- On Windows also verify WSL is installed before relying on a default
When it happens
Trigger: Calling wsl.DefaultDistro (or the WslDefaultDistroCommand RPC) on a Linux or macOS build.
Common situations: Code or UI trying to resolve the default WSL distro to open a connection without checking the platform; automated tests run on Linux CI.
Related errors
- RegisteredDistros not implemented on this system
- GetDistroCmd not implemented on this system
- GetDistro not implemented on this system
- No tab view found for the given webContents id
- User redirected to docsite to learn more about ARM64 transla
AI-assisted analysis of wavetermdev/waveterm@a4447c1563 (2026-09-01).
Data as JSON: /api/errors/8023c0f8e9e43e5e.
Report an issue: GitHub.