stablyai/orca · error · Error

ibus-daemon did not return a PID

Error message

ibus-daemon did not return a PID

What it means

Symmetric to the xfwm4 check: after spawning ibus-daemon the harness verifies child.pid is set. A missing pid means spawn() could not fork ibus-daemon (missing binary, bad PATH, fork failure) and the subsequent waitForHangulEngine() would poll forever against nothing.

Source

Thrown at config/scripts/run-terminal-ibus-hangul-e2e.mjs:156

      stdio: ['ignore', windowManagerLogFd, windowManagerLogFd]
    })
    if (!windowManagerProcess.pid) {
      throw new Error('xfwm4 did not return a PID')
    }
    evidence.windowManagerPid = windowManagerProcess.pid
    console.error(`[terminal-ime] started xfwm4 PID ${windowManagerProcess.pid}`)

    ibusProcess = spawn(
      'ibus-daemon',
      ['--xim', '--verbose', '--panel=disable', '--emoji-extension=disable'],
      {
        detached: true,
        env: process.env,
        stdio: ['ignore', ibusLogFd, ibusLogFd]
      }
    )
    if (!ibusProcess.pid) {
      throw new Error('ibus-daemon did not return a PID')
    }
    evidence.ibusDaemonPid = ibusProcess.pid
    console.error(`[terminal-ime] started ibus-daemon PID ${ibusProcess.pid}`)
    await waitForHangulEngine(ibusProcess)
    console.error(`[terminal-ime] IBus version: ${commandOutput('ibus', ['version'])}`)
    console.error(`[terminal-ime] IBus engine: ${commandOutput('ibus', ['engine'])}`)
    console.error(
      `[terminal-ime] Hangul initial mode: ${commandOutput('gsettings', [
        'get',
        'org.freedesktop.ibus.engine.hangul',
        'initial-input-mode'
      ])}`
    )
    console.error(
      `[terminal-ime] Hangul keyboard: ${commandOutput('gsettings', [
        'get',
        'org.freedesktop.ibus.engine.hangul',
        'hangul-keyboard'

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Install ibus: sudo apt-get install ibus.
  2. Verify `which ibus-daemon` inside the same env block the harness passes to spawn (note PATH is inherited from process.env, not re-listed).
  3. Check dmesg/journal for fork-failure causes (RLIMIT_NPROC, cgroup pids limit).

Example fix

// before
// ibus-daemon missing -> child.pid undefined
// after
sudo apt-get install -y ibus
Defensive patterns

Strategy: validation

Validate before calling

const { spawnSync } = require('node:child_process')
if (spawnSync('which', ['ibus-daemon']).status !== 0) {
  console.error('ibus-daemon not installed; apt-get install ibus'); process.exit(1)
}

Type guard

function hasPid(child: { pid?: number }): child is { pid: number } {
  return typeof child.pid === 'number'
}

Try / catch

const ibus = spawn('ibus-daemon', args, { detached: true, stdio: ['ignore', fd, fd] })
ibus.once('error', (e) => { console.error('ibus-daemon spawn failed:', e.message) })
if (!ibus.pid) throw new Error('ibus-daemon did not return a PID')

Prevention

When it happens

Trigger: ibus-daemon binary not on PATH, not executable, or fork failed (resource limits, bad env). The detached spawn inherits process.env, so a stripped PATH inside the X11 session causes this.

Common situations: ibus package not installed; container image trimmed ibus out; PATH overridden in the session env block (lines ~275-287) dropping /usr/bin; running on a host where ibus-daemon has a different name.

Related errors


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