stablyai/orca · error · Error

No user WSL distro found. Install/enable WSL or pass --distr

Error message

No user WSL distro found. Install/enable WSL or pass --distro=NAME.

What it means

Thrown by the apphang repro harness when listWslDistros() returns no usable distros (after filtering out docker-desktop). The harness needs at least one WSL distro to create a workspace fixture and drive terminal activation.

Source

Thrown at config/scripts/repro-windows-apphang-terminal-activation.mjs:124

}

function parsePositiveInt(name, value) {
  const parsed = Number.parseInt(value ?? '', 10)
  if (!Number.isInteger(parsed) || parsed <= 0 || String(parsed) !== value) {
    throw new Error(`${name} requires a positive integer.`)
  }
  return parsed
}

async function main() {
  if (process.platform !== 'win32') {
    throw new Error('This repro harness is intentionally Windows-only.')
  }
  const args = parseArgs()
  const distros = listWslDistros()
  const distro = args.distro ?? distros[0]
  if (!distro) {
    throw new Error('No user WSL distro found. Install/enable WSL or pass --distro=NAME.')
  }
  console.log(
    `[apphang-repro] issue=https://github.com/stablyai/orca/issues/6874 distro=${distro} gpuModes=${args.gpuModes.join(',')} cycles=${args.cycles}`
  )
  const fixture = createWslFixture(distro)
  console.log(
    `[apphang-repro] fixture repo=${fixture.repoUncPath} plain=${fixture.plainUncPath} base=${fixture.baseLinuxPath}`
  )

  const results = []
  try {
    for (const gpuMode of args.gpuModes) {
      results.push(await runGpuMode(gpuMode, args, fixture))
      if (args.expect === 'repro' && results.at(-1)?.reproduced) {
        break
      }
    }
  } finally {

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Install a WSL distro: `wsl --install -d Ubuntu` then rerun.
  2. Pass an explicit distro name if auto-detection picks the wrong one: --distro=Ubuntu.

Example fix

// before
node config/scripts/repro-windows-apphang-terminal-activation.mjs
// after (after installing)
node config/scripts/repro-windows-apphang-terminal-activation.mjs --distro=Ubuntu
Defensive patterns

Strategy: validation

Validate before calling

const distros = listWslDistros()
const distro = options.distro ?? distros[0]
if (!distro) {
  throw new Error('No user WSL distro found. Install/enable WSL or pass --distro=NAME.')
}

Type guard

function hasUserWslDistro(distros) {
  return Array.isArray(distros) && distros.length > 0
}

Prevention

When it happens

Trigger: Running on Windows where WSL is not installed, has no distros installed, or only has docker-desktop. Also fires if --distro names a distro that is not in the list (distros[0] is undefined and args.distro is null).

Common situations: A Windows machine with WSL enabled but no Linux distro installed, or only the docker-desktop integration distro present.

Related errors


AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12). Data as JSON: /api/errors/d37db1c4c4c430e4. Report an issue: GitHub.