You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PGLite failed to initialize its WASM runtime.
This is most commonly the macOS 26.3 WASM bug: https://github.com/garrytan/gbrain/issues/223
Run \`gbrain doctor\` for a full diagnosis.
Original error: ENOENT: no such file or directory, open '/$$bunfs/root/pglite.data'.
Unlike issue #223 (which is macOS 26.3 specific), this occurs on macOS 12.7.6 (Darwin 21H1320).
Steps to Reproduce
`gbrain sync --skip-failed`
`gbrain sources list`
`gbrain apply-migrations --yes`
Any command that triggers `engine.connect()`
All crash with the same PGLite WASM initialization error.
Commands that work: `gbrain doctor --fast` (skips DB connection check).
Environment
macOS: 12.7.6 (Darwin 21H1320, macOS Monterey)
Bun: 1.3.14
Node: v24.14.1
gbrain: 0.40.8.0 (source build) and 0.40.2.0 (official binary)
PGLite: 0.4.3
Architecture: arm64 (Apple Silicon)
Analysis
The error path `/$$bunfs/root/pglite.data` is a Bun virtual filesystem mount point. On this macOS version, `/$$bunfs/root` is a read-only directory:
$ ls / | grep bunfs
# → nothing (directory does not exist or is empty/mounted as read-only)
$ mkdir -p /$$bunfs/root
# → mkdir: /$$bunfs: Read-only file system
This means PGLite cannot write its `pglite.data` file during `PGlite.create()`, causing immediate Abort.
`gbrain doctor` works because the `--fast` flag skips the DB connection phase entirely.
Expected Behavior
PGLite should initialize successfully, or gbrain should detect this path issue and fall back gracefully.
Bug Description
PGLite-based gbrain commands crash immediately with:
Unlike issue #223 (which is macOS 26.3 specific), this occurs on macOS 12.7.6 (Darwin 21H1320).
Steps to Reproduce
All crash with the same PGLite WASM initialization error.
Commands that work: `gbrain doctor --fast` (skips DB connection check).
Environment
Analysis
The error path `/$$bunfs/root/pglite.data` is a Bun virtual filesystem mount point. On this macOS version, `/$$bunfs/root` is a read-only directory:
This means PGLite cannot write its `pglite.data` file during `PGlite.create()`, causing immediate Abort.
`gbrain doctor` works because the `--fast` flag skips the DB connection phase entirely.
Expected Behavior
PGLite should initialize successfully, or gbrain should detect this path issue and fall back gracefully.
Additional Context