stablyai/orca · warning

creating review files is disabled

Error message

creating review files is disabled

What it means

Thrown by the `diagnostics:collectBundle` IPC handler when `getDiagnosticsStatus().bundleEnabled` is false. The main process is the consent enforcement boundary: the renderer-side button hiding is only UX, so a compromised or malicious renderer cannot assemble a diagnostic bundle once the user has disabled 'Create diagnostic bundles' in Settings -> Privacy. It is an intentional, user-triggered refusal, not a crash.

Source

Thrown at src/main/ipc/diagnostics.ts:221

  })
  return result.response === 0
}

export function registerDiagnosticsHandlers(): void {
  ipcMain.handle('diagnostics:getStatus', (): DiagnosticsStatus => {
    return getDiagnosticsStatus()
  })

  ipcMain.handle(
    'diagnostics:collectBundle',
    (_event, lookbackMinutesIn: unknown): DiagnosticsBundlePreview => {
      // Consent gate: main is the consent enforcement boundary; the
      // renderer-side button-hide is UX, not security. A compromised or
      // malicious renderer must not be able to assemble a bundle when the
      // user has disabled diagnostic-bundle collection in Settings → Privacy.
      const status = getDiagnosticsStatus()
      if (!status.bundleEnabled) {
        throw new Error('creating review files is disabled')
      }
      // Renderer-controlled input → narrow at the boundary. The default
      // (DEFAULT_LOOKBACK_MINUTES in bundle.ts) is fine for the common
      // "last 30 minutes" case the Privacy pane button triggers.
      const lookbackMinutes =
        typeof lookbackMinutesIn === 'number' && Number.isFinite(lookbackMinutesIn)
          ? Math.max(1, Math.min(30 * 24 * 60, Math.floor(lookbackMinutesIn)))
          : undefined
      const bundle = collectDiagnosticBundle({
        appVersion: app.getVersion(),
        platform: osPlatform(),
        arch: osArch(),
        osRelease: osRelease(),
        orcaChannel: resolveDiagnosticOrcaChannel(),
        ...(lookbackMinutes !== undefined ? { lookbackMinutes } : {})
      })
      rememberBundle(bundle)
      return toBundlePreview(bundle)

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Invoke `diagnostics:getStatus` first and only call `diagnostics:collectBundle` when `status.bundleEnabled === true`.
  2. Re-enable diagnostic-bundle collection in Settings -> Privacy.
  3. Subscribe the renderer to status changes so the collect button is disabled/hidden in lockstep with the setting.

Example fix

// before
await ipcRenderer.invoke('diagnostics:collectBundle', 30)

// after
const status = await ipcRenderer.invoke('diagnostics:getStatus')
if (!status.bundleEnabled) {
  // surface 'Enable diagnostic bundles in Settings -> Privacy' to the user
  return
}
await ipcRenderer.invoke('diagnostics:collectBundle', 30)
Defensive patterns

Strategy: validation

Validate before calling

// Before invoking collectBundle, confirm consent is currently enabled.
const status = await ipcRenderer.invoke('diagnostics:getStatus')
if (!status.bundleEnabled) {
  // do not call collectBundle; prompt user to enable in Settings -> Privacy
  return
}
await ipcRenderer.invoke('diagnostics:collectBundle', lookbackMinutes)

Type guard

function isBundleEnabledStatus(s: unknown): s is { bundleEnabled: true } {
  return typeof s === 'object' && s !== null && (s as any).bundleEnabled === true
}

Try / catch

try {
  await ipcRenderer.invoke('diagnostics:collectBundle', mins)
} catch (e) {
  if (e instanceof Error && e.message === 'creating review files is disabled') {
    showEnableDiagnosticsNotice()
    return
  }
  throw e
}

Prevention

When it happens

Trigger: Calling `ipcRenderer.invoke('diagnostics:collectBundle', lookbackMinutes)` while Settings -> Privacy -> diagnostic-bundle collection is disabled, so `getDiagnosticsStatus()` returns `{ bundleEnabled: false }`.

Common situations: User toggled the Privacy setting off; stale renderer UI that did not react to the setting change and left the collect button enabled; a script or test driving IPC directly without consulting status first.

Related errors


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