stablyai/orca · error · Error
Missing built relay artifacts for ${platform}; run pnpm run
Error message
Missing built relay artifacts for ${platform}; run pnpm run build:relay first What it means
Thrown by the relay watcher fault harness when the platform-specific relay build artifacts (out/relay/<platform-arch>/relay.js and relay-watcher.js) are missing. The harness spawns these built JS entries to inject watcher faults, so they must exist before launch.
Source
Thrown at config/scripts/relay-watcher-fault-harness.mjs:241
return pid
},
previousPid ? 'replacement watcher child pid' : 'initial watcher child pid',
stderr
)
}
function includesWatchPath(params, targetPath) {
return Array.isArray(params.events)
? params.events.some((event) => event.absolutePath === targetPath)
: false
}
async function main() {
const platform = `${process.platform}-${process.arch}`
const relayEntry = resolve('out', 'relay', platform, 'relay.js')
const watcherEntry = resolve('out', 'relay', platform, 'relay-watcher.js')
if (!existsSync(relayEntry) || !existsSync(watcherEntry)) {
throw new Error(`Missing built relay artifacts for ${platform}; run pnpm run build:relay first`)
}
let tempRoot
let daemon
let daemonStreams
let relay
try {
tempRoot = await mkdtemp(join(tmpdir(), 'orca-relay-watcher-fault-'))
const watchRoot = await realpath(tempRoot)
const pidFile = join(tempRoot, 'watcher.pid')
const credentialFile = join(tempRoot, 'endpoint.credential')
const protocol = await loadProtocol(tempRoot)
const socketPath =
process.platform === 'win32'
? `\\\\.\\pipe\\orca-relay-watcher-fault-${process.pid}-${Date.now()}`
: join(tempRoot, 'relay.sock')
await writeEndpointCredential(credentialFile)
View on GitHub (pinned to 1136503c6a)
Solutions
- Run `pnpm run build:relay` to produce the artifacts under out/relay/<platform-arch>/.
- Verify the expected path matches your current platform: out/relay/<process.platform>-<process.arch>/relay.js.
Example fix
// before node config/scripts/relay-watcher-fault-harness.mjs // after pnpm run build:relay && node config/scripts/relay-watcher-fault-harness.mjs
Defensive patterns
Strategy: validation
Validate before calling
import { existsSync } from 'node:fs'
import { resolve } from 'node:path'
const platform = `${process.platform}-${process.arch}`
const relayEntry = resolve('out', 'relay', platform, 'relay.js')
const watcherEntry = resolve('out', 'relay', platform, 'relay-watcher.js')
if (!existsSync(relayEntry) || !existsSync(watcherEntry)) {
throw new Error(`Build the relay first: pnpm run build:relay (missing ${platform} artifacts)`)
} Type guard
function relayArtifactsExist(platform) {
return existsSync(resolve('out', 'relay', platform, 'relay.js')) &&
existsSync(resolve('out', 'relay', platform, 'relay-watcher.js'))
} Prevention
- Chain the build and the harness in CI: `pnpm run build:relay && node .../relay-watcher-fault-harness.mjs`.
- Add a preflight existsSync check in a shared harness bootstrap to give a clearer error before spawning.
When it happens
Trigger: Running the fault harness before building the relay, or on a fresh checkout / after `git clean` without rebuilding. The platform string is computed as `${process.platform}-${process.arch}`.
Common situations: A CI step runs the harness out of order, or a developer clones the repo and runs the harness directly. Cross-compiling for a different arch also produces the mismatch since the path is host-derived.
Related errors
- Refusing to patch node-pty ${packageJson.version}; expected
- node-pty ConPTY console-list fallback is not installed
- Refusing to patch unexpected node-pty console-list agent sou
- Unsupported macOS build architecture: ${architecture}
- Fresh production sidecar/helper build did not produce the ex
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/f99c2658e033d9f8.
Report an issue: GitHub.