iOfficeAI/AionUi · critical · StartupArchitectureMismatchError

StartupArchitectureMismatchError

Error message

StartupArchitectureMismatchError

What it means

StartupArchitectureMismatchError is thrown by assertStartupArchitectureCompatible when detectStartupArchitectureMismatch finds the running app binary's architecture does not match the host CPU architecture (e.g. x64 build running on arm64 Windows/macOS, or vice versa, typically via Rosetta or x86 emulation).

Source

Thrown at packages/desktop/src/process/startup/architectureCompatibility.ts:79

  if (!isRosettaTranslated && !deviceSupportsArm64) {
    return null;
  }

  return {
    deviceArch: 'arm64',
    expectedDownloadArch: 'arm64',
    isPackaged: true,
    isRosettaTranslated,
    packageArch,
    platform: 'darwin',
    stage: 'startup_architecture_check',
  };
}

export function assertStartupArchitectureCompatible(env: StartupArchitectureCompatibilityEnv = {}): void {
  const mismatch = detectStartupArchitectureMismatch(env);
  if (!mismatch) return;
  throw new StartupArchitectureMismatchError(mismatch);
}

View on GitHub (pinned to 711aa0550e)

Solutions

  1. Download the build matching the host CPU architecture (arm64 installer on Apple Silicon / Windows ARM; x64 on Intel)
  2. On Apple Silicon, check 'Kind' in Activity Monitor to confirm whether the app runs under Rosetta, then switch builds
  3. If intentional emulation is required, bypass/suppress the assertion via its env-based escape hatch in StartupArchitectureCompatibilityEnv
  4. Publish architecture-correct installers and make download pages auto-detect the customer's architecture
Defensive patterns

Strategy: type-guard

Validate before calling

import arch from 'node:process';
// or preflight: if (detectStartupArchitectureMismatch(env)) { show guidance dialog, skip boot }

Type guard

function isArchMismatch(e: unknown): e is Error & { name: 'StartupArchitectureMismatchError' } {
  return e instanceof Error && e.name === 'StartupArchitectureMismatchError';
}

Try / catch

catch (err) {
  if (isArchMismatch(err)) {
    showArchGuidanceDialog(err.message); // point user to correct build
    app.exit(1);
  }
  throw err;
}

Prevention

When it happens

Trigger: App is launched under CPU translation: arm64 machine running an x64 build (Rosetta on macOS, emulation on Windows ARM), or an x64 machine somehow running an arm64 binary — detectStartupArchitectureMismatch compares process/arch flags from the StartupArchitectureCompatibilityEnv and returns a mismatch object which this assert throws on.

Common situations: User downloaded the wrong .dmg/.exe/.AppImage architecture variant; Windows-on-ARM or Apple Silicon Mac running an Intel build; CI images with emulated architectures.

Related errors


AI-assisted analysis of iOfficeAI/AionUi@711aa0550e (2026-08-28). Data as JSON: /api/errors/e6d3df55b10bc7d1. Report an issue: GitHub.