stablyai/orca · error · Error

Electron trial exhausted launcher attempts

Error message

Electron trial exhausted launcher attempts

What it means

Terminal throw at the end of runTrial's retry loop, reached only if all MAX_LAUNCH_ATTEMPTS (3) attempts returned status 0 with no RESULT_PREFIX line AND no stderr AND no stdout. The loop's inner conditions would normally throw [69] on the final attempt or whenever noise is present; this line is a defensive guard for the silent-failure case where every attempt produces a clean but empty output.

Source

Thrown at config/scripts/hang-watchdog-memory-benchmark.mjs:357

      })
    } finally {
      rmSync(launcherDir, { recursive: true, force: true })
    }
    if (result.status !== 0) {
      throw new Error(
        `Electron trial failed (${result.error?.message ?? result.signal ?? result.status}):\n` +
          `${result.stderr || result.stdout}`
      )
    }
    const line = result.stdout.split('\n').find((candidate) => candidate.startsWith(RESULT_PREFIX))
    if (line) {
      return { ...JSON.parse(line.slice(RESULT_PREFIX.length)), launchAttempts: attempt }
    }
    if (attempt === MAX_LAUNCH_ATTEMPTS || result.stderr || result.stdout) {
      throw new Error(`Electron trial did not report a result (status ${result.status})`)
    }
  }
  throw new Error('Electron trial exhausted launcher attempts')
}

function runBenchmark() {
  if (process.platform !== 'darwin') {
    throw new Error('The production watchdog is macOS-only; run this benchmark on macOS')
  }
  if (!existsSync(entryPath)) {
    throw new Error(`Missing ${entryPath}; run pnpm exec electron-vite build first`)
  }
  const options = parseArgs(process.argv.slice(2))
  const builtEntry = readFileSync(entryPath, 'utf8')
  const hasChildContract = builtEntry.includes('ORCA_HANG_WATCHDOG_PARENT_PID')
  const hasWorkerContract = builtEntry.includes('workerData') && builtEntry.includes('parentPort')
  if (
    (options.boundary === 'child' && !hasChildContract) ||
    (options.boundary === 'worker' && !hasWorkerContract)
  ) {
    throw new Error(

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Run the launcher manually to see whether runInternal is reached at all.
  2. Confirm the script file is the real benchmark and not a stub/empty file.
  3. Check that stdout is not redirected or consumed by a wrapper in CI.
  4. Rebuild the entry and verify electronPath() resolves a working binary.
Defensive patterns

Strategy: retry

Validate before calling

// Pre-flight: run the launcher once manually to confirm runInternal produces output
const probe = spawnSync(executable, ['--js-flags=--expose-gc', launcherDir], { encoding: 'utf8', timeout: 90_000 })
if (probe.status === 0 && !probe.stdout.includes(RESULT_PREFIX)) {
  throw new Error('launcher produces no RESULT line; script may be stubbed or stdout redirected')
}

Prevention

When it happens

Trigger: Electron launches and exits 0 but prints absolutely nothing on all three attempts — e.g. the launcher main.cjs import resolved to a no-op, the script was stubbed, or stdout is fully swallowed by the environment (buffering/pipe closure).

Common situations: Misconfigured test harness that replaces the script with a stub, CI runners that close/redirect stdout, or an Electron build that exits cleanly before reaching runInternal.

Related errors


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