Repository navigation
[Bug]: could not load local database #176
Description
Description
Could not open the local snapshots database. Version history will be disabled for this session.
dlopen(/Applications/Open CoDesign.app/Contents/Resources/app.asar.unpacked/node_modules/better-sqlite3/build/Release/better_sqlite3.node-electron.node, 0x0001): tried: '/Applications/Open CoDesign.app/Contents/Resources/app.asar.unpacked/node_modules/better-sqlite3/build/Release/better_sqlite3.node-electron.node' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Open CoDesign.app/Contents/Resources/app.asar.unpacked/node_modules/better-sqlite3/build/Release/better_sqlite3.node-electron.node' (no such file), '/Applications/Open CoDesign.app/Contents/Resources/app.asar.unpacked/node_modules/better-sqlite3/build/Release/better_sqlite3.node-electron.node' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
Steps to reproduce
when start the app, it report an issue:
Could not open the local snapshots database. Version history will be disabled for this session.
dlopen(/Applications/Open CoDesign.app/Contents/Resources/app.asar.unpacked/node_modules/better-sqlite3/build/Release/better_sqlite3.node-electron.node, 0x0001): tried: '/Applications/Open CoDesign.app/Contents/Resources/app.asar.unpacked/node_modules/better-sqlite3/build/Release/better_sqlite3.node-electron.node' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Open CoDesign.app/Contents/Resources/app.asar.unpacked/node_modules/better-sqlite3/build/Release/better_sqlite3.node-electron.node' (no such file), '/Applications/Open CoDesign.app/Contents/Resources/app.asar.unpacked/node_modules/better-sqlite3/build/Release/better_sqlite3.node-electron.node' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
Expected behavior
It should be opened normally.
Actual behavior
can not load the local database or create design
open-codesign version
0.1.3
Platform
macOS
OS version
No response
Model provider (if relevant)
None
Error code
No response
Diagnostics bundle
No response
Activity
github-actions commentedon Apr 23, 2026
Thanks for the detailed report and the full
dlopenerror.This error is a native-architecture mismatch in the
better-sqlite3binding (have 'arm64', need 'x86_64'). In the current code path, when snapshots DB init fails, the app intentionally falls back and disables snapshots/history-related IPC for that session (which can block normal design creation flows).For a quick check, please make sure the installed macOS artifact matches the runtime architecture (
arm64vsx64) listed in our install docs.Relevant code:
apps/desktop/src/main/index.ts:1069— app initializesdesigns.dbviasafeInitSnapshotsDb(...)at startupapps/desktop/src/main/index.ts:1094— shows the exact “Could not open the local snapshots database…” error dialogapps/desktop/src/main/snapshots-db.ts:54— resolves architecture-specific native binding (better_sqlite3.node-electron-${arch}.node) with fallback behaviorapps/desktop/scripts/install-sqlite-bindings.cjs:11— installer stages separate Node/Electron and per-arch binariesapps/desktop/src/main/snapshots-ipc.ts:377— when DB init fails, snapshots channels returnSNAPSHOTS_UNAVAILABLEREADME.md:123— macOS Apple Silicon installer is*-arm64.dmgREADME.md:124— macOS Intel installer is*-x64.dmgNeed more info:
Also, this project is still pre-alpha, so some roadmap features are still in progress while we stabilize core desktop/runtime behavior.
open-codesign Bot
fix(release): ship both macOS arm64 and x64 DMGs with correct native …