stablyai/orca · error

sending diagnostics is not configured for this build

Error message

sending diagnostics is not configured for this build

What it means

Thrown by `diagnostics:uploadBundle` when `resolveDiagnosticTokenEndpoint()` returns null. That resolver returns null when an official build (stable/rc) had its build-time `ORCA_DIAGNOSTICS_TOKEN_URL` constant left unsubstituted by CI, or when a dev build has neither the `ORCA_DIAGNOSTICS_TOKEN_URL` env var nor the build constant set. The upload endpoint URL never crosses IPC, so the renderer cannot supply it; main must resolve it from build/env configuration.

Source

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

      // Consent gate: main is the consent enforcement boundary; the
      // renderer-side button-hide is UX, not security. Re-check here in case
      // the user toggled the setting off between collect and upload.
      if (!getDiagnosticsStatus().bundleEnabled) {
        throw new Error('sending diagnostics is disabled')
      }
      const confirmed = await confirmBundleUpload(pendingForConfirmation.bundle)
      if (!confirmed) {
        return { canceled: true }
      }
      // Why: the preview can be discarded or diagnostics can be disabled
      // while the native confirmation dialog is open.
      const { bundle, payload } = getPendingBundleForUpload(bundleSubmissionId)
      if (!getDiagnosticsStatus().bundleEnabled) {
        throw new Error('sending diagnostics is disabled')
      }
      const tokenEndpoint = resolveDiagnosticTokenEndpoint()
      if (!tokenEndpoint) {
        throw new Error('sending diagnostics is not configured for this build')
      }
      const result = await uploadDiagnosticBundle({
        tokenEndpoint,
        payload,
        bundleSubmissionId: bundle.bundleSubmissionId
      })
      const uploadedPending = pendingBundles.get(bundle.bundleSubmissionId)
      if (uploadedPending) {
        deletePendingBundle(bundle.bundleSubmissionId)
      }
      return result
    }
  )

  ipcMain.handle('diagnostics:openBundlePreview', async (_event, bundleSubmissionId: unknown) => {
    const previewFilePath = getPendingPreviewFilePath(bundleSubmissionId)
    const errorMessage = await shell.openPath(previewFilePath)
    if (errorMessage) {

View on GitHub (pinned to 1136503c6a)

Solutions

  1. For dev builds: set `ORCA_DIAGNOSTICS_TOKEN_URL` in the environment before launching Orca.
  2. For official builds: ensure the release CI step substitutes `ORCA_DIAGNOSTICS_TOKEN_URL` (and `ORCA_BUILD_IDENTITY`) at build time.
  3. Hide/disable the upload affordance in the renderer when `diagnostics:getStatus` indicates no endpoint is configured.

Example fix

// before (dev run, no env)
orca --dev   # then click Upload Bundle -> throws

// after
ORCA_DIAGNOSTICS_TOKEN_URL=https://tokens.example.dev/v1/diagnostics orca --dev
Defensive patterns

Strategy: validation

Validate before calling

// Only offer upload when the build actually has a token endpoint.
// Expose endpoint-configured via diagnostics:getStatus (or a dedicated channel)
// and gate the upload button on it.
if (!buildHasDiagnosticEndpoint()) {
  showNotice('Diagnostic upload is not configured for this build.')
  return
}
await ipcRenderer.invoke('diagnostics:uploadBundle', submissionId)

Type guard

function endpointIsConfigured(): boolean {
  // for dev builds, check the env var presence in main; for official builds, trust the build flag
  return Boolean(process.env.ORCA_DIAGNOSTICS_TOKEN_URL)
}

Try / catch

try {
  await ipcRenderer.invoke('diagnostics:uploadBundle', submissionId)
} catch (e) {
  if (e instanceof Error && e.message === 'sending diagnostics is not configured for this build') {
    showBuildConfigNotice()
    return
  }
  throw e
}

Prevention

When it happens

Trigger: Invoking `diagnostics:uploadBundle` on a build where `resolveDiagnosticTokenEndpoint()` is null: a local dev build with `ORCA_DIAGNOSTICS_TOKEN_URL` unset, or an official build whose CI did not inject the token URL constant.

Common situations: Running an unpackaged dev build without the diagnostics env var; CI release pipeline that skipped the secret-substitution step for the token URL; a forked/unofficial build that never configured the endpoint.

Related errors


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