Bug Report
Summary
gbrain init --pglite crashes on macOS 26.x (Tahoe) on Apple Silicon (arm64) due to a WASM runtime bug in the embedded PGLite engine. The crash occurs at engine initialization time, before any user data is processed.
Environment
- macOS: 26.5 (Build 25F71) — Apple Silicon (arm64)
- Bun: 1.3.14
- gbrain: 0.41.29.0
- Chip: Apple M-series (arm64)
Steps to Reproduce
- Install gbrain on macOS 26.x (Tahoe) with Apple Silicon
- Run
gbrain init --pglite
- Observe WASM crash during PGLite engine initialization
Expected Behavior
PGLite should initialize successfully and create the local database.
Actual Behavior
The process crashes with a WASM-related error during PGLite engine startup. The crash is in the WASM runtime layer, not in gbrain code itself. This appears to be a known issue with WASM execution on macOS 26.x.
Workaround: Use Native PostgreSQL
A complete workaround is to bypass PGLite and use a native Homebrew PostgreSQL installation instead. Full step-by-step setup:
# Install PostgreSQL + pgvector
brew install postgresql@17
brew services start postgresql@17
createdb gbrain
# Build pgvector from source
cd /tmp && git clone --branch v0.8.0 https://github.com/pgvector/pgvector.git
cd pgvector && make && make install
psql gbrain -c "CREATE EXTENSION IF NOT EXISTS vector;"
# Configure gbrain to use native Postgres
cat > ~/.gbrain/config.json << 'EOF'
{
"engine": "postgres",
"database_url": "postgresql://localhost:5432/gbrain",
"schema_pack": "gbrain-base-v2"
}
EOF
# Initialize and verify
gbrain apply-migrations --yes
gbrain doctor
All 102 migrations pass. gbrain doctor reports clean status. Full brain functionality verified: put, search, link, files upload-raw, etc.
Impact
This affects all macOS 26.x (Tahoe) users on Apple Silicon using the default --pglite install path. The README recommends PGLite as the primary method ("2 seconds; no server"), so new users on the latest macOS hit this immediately.
Suggested Fix
- Short-term: Add docs about the macOS 26.x WASM incompatibility and the native Postgres workaround (PR incoming)
- Medium-term: Have
gbrain init detect macOS 26.x + arm64 and auto-suggest the Postgres engine path
- Long-term: Track the upstream WASM fix (likely in Bun or the underlying WASM engine)
Reporter
Saurav Roy — gbrain v0.41.29.0 user, verified on macOS 26.5 arm64.
Bug Report
Summary
gbrain init --pglitecrashes on macOS 26.x (Tahoe) on Apple Silicon (arm64) due to a WASM runtime bug in the embedded PGLite engine. The crash occurs at engine initialization time, before any user data is processed.Environment
Steps to Reproduce
gbrain init --pgliteExpected Behavior
PGLite should initialize successfully and create the local database.
Actual Behavior
The process crashes with a WASM-related error during PGLite engine startup. The crash is in the WASM runtime layer, not in gbrain code itself. This appears to be a known issue with WASM execution on macOS 26.x.
Workaround: Use Native PostgreSQL
A complete workaround is to bypass PGLite and use a native Homebrew PostgreSQL installation instead. Full step-by-step setup:
All 102 migrations pass.
gbrain doctorreports clean status. Full brain functionality verified:put,search,link,files upload-raw, etc.Impact
This affects all macOS 26.x (Tahoe) users on Apple Silicon using the default
--pgliteinstall path. The README recommends PGLite as the primary method ("2 seconds; no server"), so new users on the latest macOS hit this immediately.Suggested Fix
gbrain initdetect macOS 26.x + arm64 and auto-suggest the Postgres engine pathReporter
Saurav Roy — gbrain v0.41.29.0 user, verified on macOS 26.5 arm64.