Skip to content

Upgrade to Node 24 and Electron 42.4.1 (sqlcipher migration, macOS JIT crash fix) - #170

Open
Alexsanchez06 wants to merge 2 commits into
devfrom
upgrade-node18-to-node24
Open

Upgrade to Node 24 and Electron 42.4.1 (sqlcipher migration, macOS JIT crash fix)#170
Alexsanchez06 wants to merge 2 commits into
devfrom
upgrade-node18-to-node24

Conversation

@Alexsanchez06

Copy link
Copy Markdown
Collaborator

Summary

Upgrades the app's runtime from Node 18 to Node 24 and Electron 25.3.0
to 42.4.1, replacing the SQLite driver and fixing a resulting macOS
crash.

  • Migrate @signalapp/better-sqlite3 -> @signalapp/sqlcipher. The old
    driver is NAN-based and does not build against Node 24's V8 ABI;
    sqlcipher ships prebuilt N-API binaries for all target platforms
    instead.
  • Bump electron 25.3.0 -> 42.4.1, electron-builder 23.0.8 -> 26.15.3,
    electron-updater ^4.2.2 -> ^6.8.9. Fix engines.node to
    ">=24.15.0 <25" (was pinned to a stale 22.x value).
  • Add com.apple.security.cs.allow-jit to entitlements.mac.plist. Its
    absence was causing a V8/TurboFan JIT EXC_BREAKPOINT crash on
    startup on macOS 26 (Apple Silicon) — found by diffing against the
    working beldex-electron-gui-wallet build/entitlements config on the
    same machine.
  • Fix electron-builder config schema errors that were blocking
    yarn build-release: nest linux.desktop keys under "entry", drop
    the unsupported win.publisherName field, and broaden the sqlcipher
    prebuilds asarUnpack/files globs to */ so binaries for every
    platform/arch actually ship in the package.
  • Centralize undefined -> null sanitization for bound SQL params in
    sql.ts (sqlcipher throws on undefined where better-sqlite3 silently
    treated it as NULL), plus related type fixes for sqlcipher's
    stricter typings.
  • Guard against a null updateInfo/result in the electron-updater
    checkForUpdates flow, and adapt to its new update-downloaded event
    signature (single event object instead of positional args).
  • Pin ignoreDeprecations to "5.0" in tsconfig.json to silence the
    moduleResolution=node10 deprecation notice under TypeScript 5.9.3
    (a real migration to node16/nodenext/bundler is still open).
  • CI workflows and .nvmrc updated to Node 24.18.0.

Test plan

  • yarn build-all compiles with zero TypeScript errors
  • yarn build-release produces a signed macOS build without
    electron-builder config errors
  • App launches on macOS 26 without the V8/JIT EXC_BREAKPOINT crash
  • Existing conversation/message data loads correctly under
    @signalapp/sqlcipher (no data loss from the driver swap)
  • Auto-update check/download flow still works end to end

- Migrate from @signalapp/better-sqlite3 to @signalapp/sqlcipher, which
  ships prebuilt N-API binaries compatible with Node 24 (better-sqlite3's
  NAN-based build does not compile against Node 24's V8 ABI)
- Add com.apple.security.cs.allow-jit to entitlements.mac.plist; its
  absence caused a V8/TurboFan JIT EXC_BREAKPOINT crash on macOS 26,
  found by diffing against the working beldex-electron-gui-wallet build
- Bump electron 25.3.0 -> 42.4.1, electron-builder 23.0.8 -> 26.15.3,
  electron-updater ^4.2.2 -> ^6.8.9; fix engines.node to ">=24.15.0 <25"
- Fix electron-builder config schema errors: nest linux.desktop keys
  under "entry", drop the unsupported win.publisherName field, and
  broaden the sqlcipher prebuilds asarUnpack/files globs to **/* so
  binaries for every platform/arch ship in the package
- Sanitize undefined -> null in bound SQL params centrally (sqlcipher
  throws on undefined where better-sqlite3 silently treated it as NULL),
  and fix related type errors from sqlcipher's stricter typings
- Guard against a null updateInfo/result in the electron-updater
  checkForUpdates flow, and adapt to its new update-downloaded event
  signature (single event object rather positional args)
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 5ce04a1c-8d1a-421d-9527-1b901703fbbd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant