stablyai/orca · error · Error
Electron trial failed (${result.error?.message ?? result.sig
Error message
Electron trial failed (${result.error?.message ?? result.signal ?? result.status}):\n${result.stderr || result.stdout} What it means
Thrown by runTrial when the spawned Electron process exits with a non-zero status. The message includes the error message, signal, or status code and dumps stderr/stdout for diagnosis. This indicates Electron crashed, failed to launch, or the in-Electron runInternal path threw (e.g. the watchdog build verification or a measurement step).
Source
Thrown at config/scripts/hang-watchdog-memory-benchmark.mjs:344
path.join(launcherDir, 'main.cjs'),
`import(${JSON.stringify(pathToFileURL(scriptPath).href)}).catch((error) => {
console.error(error)
process.exitCode = 1
})\n`
)
let result
try {
result = spawnSync(executable, ['--js-flags=--expose-gc', launcherDir], {
cwd: repoRoot,
env,
encoding: 'utf8',
timeout: 90_000
})
} 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')View on GitHub (pinned to 1136503c6a)
Solutions
- Read the embedded stderr/stdout in the error message — it contains the underlying Electron-side exception.
- Rebuild the entry: `pnpm exec electron-vite build`, then re-run.
- Confirm the Electron binary resolves (electronPath() succeeds) and macOS tooling (`/usr/bin/footprint`, `ps`) is accessible.
- If the error names a watchdog verification failure, investigate the watchdog implementation, not the harness.
Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-flight: confirm Electron resolves and the entry is built
import { existsSync } from 'node:fs'
if (!existsSync(entryPath)) throw new Error(`build missing: ${entryPath}`)
const executable = electronPath() // throws early if Electron is unresolvable Try / catch
try {
await runTrial(executable, boundary)
} catch (error) {
const msg = error instanceof Error ? error.message : String(error)
// Surface the embedded Electron stderr for diagnosis, then decide retry vs fail
if (msg.includes('did not report a result') || msg.includes('trial failed')) {
console.error('Electron trial failed; inspect stderr above. Rebuild with: pnpm exec electron-vite build')
}
throw error
} Prevention
- Rebuild the entry before every benchmark run to avoid stale-artifact crashes.
- Read the embedded stderr/stdout in the error message — the root cause is there.
- Confirm macOS tooling (/usr/bin/footprint, ps) is accessible on the runner.
When it happens
Trigger: Electron fails to start (missing binary, display/GPU issues), the built watchdog entry throws at runtime, the macOS footprint tool is unavailable, or an assertion inside runInternal/measureChild/measureWorker fails. The launcher main.cjs imports the script and sets process.exitCode=1 on any import error.
Common situations: Broken Electron install, missing or stale built entry (out/main/main-thread-hang-watchdog-entry.js), macOS permission issues blocking /usr/bin/footprint, or a real regression in the watchdog code under test.
Related errors
- Electron trial did not report a result (status ${result.stat
- Electron trial exhausted launcher attempts
- Electron did not expose GC; keep --js-flags=--expose-gc in t
- The production watchdog is macOS-only; run this benchmark on
- Unsupported boundary: ${boundary}
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/25d0e3b66572a3b7.
Report an issue: GitHub.