Skip to content

PGLite WASM crash on macOS 26.3 with Bun 1.3.11 #223

@AndreLYL

Description

@AndreLYL

Bug Description

PGLite-based commands crash immediately with Aborted(). Build with -sASSERTIONS for more info. on macOS 26.3 (Darwin kernel 25.3.0) with Bun 1.3.11 and PGLite 0.4.4.

Steps to Reproduce

  1. Upgrade macOS to 26.3 (Darwin kernel 25.3.0, arm64)
  2. Run any gbrain CLI command that needs PGLite:
    • gbrain serve
    • gbrain export
    • gbrain health
    • gbrain query

All crash with the same error:

RuntimeError: Aborted().
  at abort (node_modules/@electric-sql/pglite/dist/index.js:1:77811)
  at invoke_viiiiii
  at async create

Environment

  • macOS 26.3 (Darwin 25.3.0, arm64)
  • Bun 1.3.11
  • gbrain 0.10.1
  • PGLite 0.4.4

Key Observation

Running gbrain serve processes started before the macOS upgrade continue to work. The issue only affects new PGLite instances created after the upgrade.

Analysis

This suggests a WASM compatibility issue with macOS 26.3. The crash happens during PGlite initialization (PGlite.create() with extensions: {vector, pg_trgm}), before any database operations. The postmaster.pid file confirms Postgres fails to start inside WASM.

Possible Fixes

  1. Pin to an older PGLite version known to work on macOS 25.x
  2. Add explicit WASM SIMD/compatibility flags
  3. Investigate macOS 26.3 changes affecting WASM syscalls

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