stablyai/orca · error

Usage: node config/scripts/verify-windows-inner-signature.mj

Error message

Usage: node config/scripts/verify-windows-inner-signature.mjs <Orca.exe>

What it means

Thrown by validateExecutablePath() when the executable path argument is missing, not a string, or whitespace-only. This is a usage error for the CLI invocation of verify-windows-inner-signature.mjs — the script requires exactly one argument: the path to Orca.exe.

Source

Thrown at config/scripts/verify-windows-inner-signature.mjs:120

  }

  return { ok: true, signature }
}

export function formatSignatureSummary(signature) {
  return [
    `Status: ${signature.status ?? '<missing>'}`,
    `Subject: ${normalizeSignerSubject(signature.signerSubject) || '<missing>'}`,
    `Issuer: ${signature.signerIssuer ?? '<missing>'}`,
    `Thumbprint: ${normalizeThumbprint(signature.signerThumbprint) || '<missing>'}`,
    `NotBefore: ${signature.notBefore ?? '<missing>'}`,
    `NotAfter: ${signature.notAfter ?? '<missing>'}`
  ].join('\n')
}

export function validateExecutablePath(executablePath) {
  if (typeof executablePath !== 'string' || executablePath.trim() === '') {
    throw new Error('Usage: node config/scripts/verify-windows-inner-signature.mjs <Orca.exe>')
  }

  if (!existsSync(executablePath)) {
    throw new Error(`Windows inner executable does not exist: ${executablePath}`)
  }

  if (!statSync(executablePath).isFile()) {
    throw new Error(`Windows inner executable path is not a file: ${executablePath}`)
  }
}

export function getPowerShellSignatureJson(executablePath, spawnSyncImpl = spawnSync) {
  // Why: pwsh -Command does not reliably expose trailing process args to string commands.
  const result = spawnSyncImpl(
    'pwsh',
    [
      '-NoLogo',
      '-NoProfile',

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Provide the Orca.exe path as the first argument: node config/scripts/verify-windows-inner-signature.mjs /path/to/Orca.exe.
  2. If invoked programmatically, ensure executablePath is a non-empty string before calling verifyWindowsInnerSignature.
  3. In CI, check that the variable holding the exe path is set and non-empty before the invocation.

Example fix

// before: CI invokes without argument
node config/scripts/verify-windows-inner-signature.mjs

// after: pass the resolved exe path
node config/scripts/verify-windows-inner-signature.mjs "$ORCA_BUILD_DIR/Orca.exe"
Defensive patterns

Strategy: validation

Validate before calling

function validateArgs(argv) {
  if (!Array.isArray(argv) || argv.length === 0 ||
      typeof argv[0] !== 'string' || argv[0].trim() === '') {
    throw new Error('Usage: node config/scripts/verify-windows-inner-signature.mjs <Orca.exe>')
  }
  return argv[0]
}

Type guard

function isNonEmptyStringPath(value) {
  return typeof value === 'string' && value.trim().length > 0
}

Prevention

When it happens

Trigger: verifyWindowsInnerSignature({ executablePath }) or main(argv) is called with executablePath being undefined, null, '', or only whitespace. In CLI mode (main), this means process.argv.slice(2)[0] is missing — the user ran the script without an argument.

Common situations: Running `node config/scripts/verify-windows-inner-signature.mjs` without the <Orca.exe> argument; a CI script or Makefile invoking the verifier with an unset variable (e.g. $ORCA_EXE when the env var is empty); a wrapper script passing undefined due to a typo.

Related errors


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