Skip to content

App fails to launch on Intel Mac: better-sqlite3 architecture mismatch #6

Description

@Lee-maxpro

Describe the bug

When attempting to launch the rebuilt Codex app on an Intel Mac, the application fails to start and displays a critical database access error popup.

Error Message

The popup displays the following:

Codex cannot access its local database.
The app cannot finish launching until its SQLite database is accessible.
Database path: /Users/lee/.codex/sqlite/codex-dev.db
...
Error: better-sqlite3 is only bundled with the Electron app

Steps to reproduce

  1. Run the rebuilt Codex.app on an Intel-based Mac.
  2. The UI initializes, but immediately throws the database error popup blocking further usage.

Environment

  • Device: 16-inch MacBook Pro (2019) - Intel (x86_64)
  • OS: macOS

Objective Analysis / Possible Root Cause

Based on the error better-sqlite3 is only bundled with the Electron app, it appears that the rebuild_codex.js script successfully modifies the main application but fails to recompile or swap out the native Node modules (specifically the better-sqlite3 binary) for the x86_64 architecture. The app seems to be trying to load an incompatible database driver.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions