stablyai/orca · error · Error

Unsupported --gpu=${value}. Use on, off, auto, or a comma-li

Error message

Unsupported --gpu=${value}. Use on, off, auto, or a comma-list.

What it means

Thrown by the apphang repro harness when --gpu is given an invalid mode or is empty. The flag accepts a comma-separated list of 'on', 'off', 'auto' modes, each run as a separate terminal GPU acceleration scenario.

Source

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

    }
    if (name === '--distro') {
      args.distro = value?.trim() || null
      continue
    }
    if (name === '--expect') {
      if (!['none', 'repro', 'pass'].includes(value)) {
        throw new Error(`Unsupported --expect=${value}. Use none, repro, or pass.`)
      }
      args.expect = value
      continue
    }
    if (name === '--gpu') {
      const modes = (value ?? '')
        .split(',')
        .map((entry) => entry.trim())
        .filter(Boolean)
      if (modes.length === 0 || modes.some((mode) => !['on', 'off', 'auto'].includes(mode))) {
        throw new Error(`Unsupported --gpu=${value}. Use on, off, auto, or a comma-list.`)
      }
      args.gpuModes = modes
      continue
    }
    if (name === '--output-lines') {
      args.outputLines = parsePositiveInt(name, value)
      continue
    }
    if (name === '--report') {
      args.reportPath = value?.trim() || null
      if (!args.reportPath) {
        throw new Error('--report requires a file path.')
      }
      continue
    }
    throw new Error(`Unknown argument: ${arg}`)
  }

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Use a single mode or comma-list from the set {on, off, auto}, e.g. --gpu=on,off.
  2. Run with --help to confirm accepted modes.

Example fix

// before
node config/scripts/repro-windows-apphang-terminal-activation.mjs --gpu=high
// after
node config/scripts/repro-windows-apphang-terminal-activation.mjs --gpu=on,off,auto
Defensive patterns

Strategy: validation

Validate before calling

const GPU_MODES = ['on', 'off', 'auto']
const modes = (value ?? '').split(',').map(s => s.trim()).filter(Boolean)
if (modes.length === 0 || modes.some(m => !GPU_MODES.includes(m))) {
  throw new Error(`Unsupported --gpu=${value}. Use ${GPU_MODES.join(', ')}, or a comma-list.`)
}

Type guard

function isValidGpuList(value) {
  const modes = String(value ?? '').split(',').map(s => s.trim()).filter(Boolean)
  return modes.length > 0 && modes.every(m => ['on','off','auto'].includes(m))
}

Prevention

When it happens

Trigger: Passing --gpu=high, --gpu=on,off,wrong, or --gpu= (empty after trimming). The parser splits on comma, trims, filters empties, and rejects if any token is not in ['on','off','auto'].

Common situations: A developer passes a GPU mode name that does not match Electron's allowed values, or forgets the value entirely.

Related errors


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