stablyai/orca · error · Error

Failed to configure IBus Hangul ${key}: ${result.stderr.trim

Error message

Failed to configure IBus Hangul ${key}: ${result.stderr.trim()}

What it means

configureHangulEngine() runs `gsettings set org.freedesktop.ibus.engine.hangul <key> <value>` for initial_input_mode=hangul and hangul-keyboard=2. If gsettings exits non-zero, the harness aborts because the IME cannot be driven into a known Hangul state for the E2E test. stderr is surfaced so the operator sees the gsettings error (schema missing, dconf daemon down, permission denied).

Source

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

}

function commandOutput(command, args) {
  const result = spawnSync(command, args, { encoding: 'utf8' })
  return result.status === 0 ? result.stdout.trim() : result.stderr.trim()
}

function configureHangulEngine() {
  for (const [key, value] of [
    ['initial-input-mode', 'hangul'],
    ['hangul-keyboard', '2']
  ]) {
    const result = spawnSync(
      'gsettings',
      ['set', 'org.freedesktop.ibus.engine.hangul', key, value],
      { encoding: 'utf8' }
    )
    if (result.status !== 0) {
      throw new Error(`Failed to configure IBus Hangul ${key}: ${result.stderr.trim()}`)
    }
  }
}

async function waitForHangulEngine(ibusProcess) {
  const deadline = Date.now() + 15_000
  while (Date.now() < deadline) {
    if (ibusProcess.exitCode !== null) {
      throw new Error(`ibus-daemon exited early with code ${ibusProcess.exitCode}`)
    }
    const result = spawnSync('ibus', ['engine', 'hangul'], { stdio: 'pipe' })
    if (result.status === 0) {
      return
    }
    await delay(100)
  }
  throw new Error('Timed out while selecting the IBus Hangul engine')
}

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Install the Hangul engine: sudo apt-get install ibus ibus-hangul (or the distro equivalent).
  2. Ensure a DBus session and XDG_RUNTIME_DIR exist (the harness sets them inside the X11 session; if calling configureHangulEngine standalone, export them first).
  3. Run `gsettings set org.freedesktop.ibus.engine.hangul initial_input-mode hangul` manually to reproduce and read the exact gsettings error.

Example fix

// before
// ibus-hangul not installed -> gsettings exits 1
// after
sudo apt-get install -y ibus ibus-hangul
pnpm run test:e2e:terminal-ibus-hangul-native
Defensive patterns

Strategy: try-catch

Validate before calling

// preflight: schema + binary present
const { spawnSync } = require('node:child_process')
const schema = spawnSync('gsettings', ['get','org.freedesktop.ibus.engine.hangul','initial-input-mode'], { encoding: 'utf8' })
if (schema.status !== 0) {
  console.error('ibus-hangul schema missing; install ibus-hangul')
  process.exit(1)
}

Try / catch

try {
  configureHangulEngine()
} catch (err) {
  if (/Failed to configure IBus Hangul/.test(String(err))) {
    console.error('IME config failed — install ibus-hangul and verify DBus session')
  }
  throw err
}

Prevention

When it happens

Trigger: Running the native IBus Hangul E2E runner on a host where ibus-hangul is not installed (so the org.freedesktop.ibus.engine.hangul schema is absent), or where the dconf/gsettings backend is unreachable (no DBus session, XDG_RUNTIME_DIR unset).

Common situations: Minimal CI image missing ibus-hangul; running under a bare xvfb session without DBus; a container where dconf service was not started; permissions on the dconf database.

Related errors


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