Skip to content

fix(desktop): install Mac updates over 1 GiB with Electron 44.10.1 - #2387

Merged
AnishSarkar22 merged 1 commit into
MODSetter:devfrom
AnishSarkar22:fix/mac-updater-over-1gib
Nov 3, 2026
Merged

AnishSarkar22 merged 1 commit into
MODSetter:devfrom
AnishSarkar22:fix/mac-updater-over-1gib

Conversation

@AnishSarkar22

@AnishSarkar22 AnishSarkar22 commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

What

  • Upgrades Electron from 44.2.0 to 44.10.1 and pins electron, electron-builder and electron-updater exactly in surfsense_local/electron/package.json.
  • Documents the 1 GiB limit in docs/architecture/updates.md (new section and two Known gaps).
  • Adds a step to surfsense_local/RELEASE.md: check for an Electron 44 patch before each release, never go below 44.7, and carry the electron-updater patch over on a bump.
  • Adds a section to the user docs (www/content/docs/v2/updates.mdx) telling Mac users on 2.3.0 or earlier to reinstall once.

Why

Mac updates have never installed since 2.1.0. electron-updater hands the whole update zip to Squirrel.Mac, which before Electron 44.7 reads it into one memory buffer. Past 1 GiB that buffer asks for 2 GiB, Electron's allocator refuses it, and the app crashes with EXC_BREAKPOINT and no error event (electron/electron#55089). Every Mac zip from 2.1.0 to 2.3.0 is 1.13–1.34 GB. With a finished download waiting, the app crashed shortly after launch.

Electron 44.7.0 streams the zip to disk instead (release notes).

The fix ships in the app doing the installing, so Mac users on 2.3.0 or earlier still crash on the next update and must install it once by hand (DMG or brew upgrade); their data folder carries over. There is no compatibility layer: no smaller bridge release, no update feed rule, no renamed manifest. The release notes, downloads page and user docs tell those users to reinstall. Windows and Linux are unaffected.

Fixes #

How to test

Measured locally on Apple Silicon:

Electron Update size Result
44.2.0 1023 MiB Downloads
44.2.0 1025 MiB and larger Crashes, same stack as user crash reports
44.10.1 1222 MiB, signed by the same certificate Downloads, installs, relaunches as the new version; about 150 MB peak memory in the main process
44.10.1 1222 MiB, signed by another certificate Refused, installed app unchanged

These runs used a throwaway self-signed certificate, not the Developer ID, and no notarization.

Before release:

  1. cd surfsense_local/electron && pnpm install && pnpm typecheck && pnpm test
  2. Install a signed, notarized build of this branch by hand on a Mac, then let it update to a later test build over 1 GiB. It should install and relaunch without crashing.
  3. Add "Mac users on 2.3.0 or earlier: download the new version once" to the release notes' Known issues, and to the downloads page.

High-level PR Summary

This PR fixes a critical bug preventing Mac updates from installing on versions 2.1.0–2.3.0 by upgrading Electron from 44.2.0 to 44.10.1, which streams update zips to disk instead of loading them into a single memory buffer that crashes above 1 GiB. The PR also pins electron, electron-builder, and electron-updater exactly, documents the 1 GiB limit and testing steps in architecture docs, adds release checklist reminders about Electron version requirements, and notifies Mac users on affected versions to manually reinstall once.

⏱️ Estimated Review Time: 5-15 minutes

💡 Review Order Suggestion
Order File Path
1 docs/architecture/updates.md
2 surfsense_local/RELEASE.md
3 www/content/docs/v2/updates.mdx
4 surfsense_local/electron/package.json
5 surfsense_local/electron/pnpm-lock.yaml

Need help? Join our Discord

Summary by CodeRabbit

  • Documentation
    • Added guidance for Mac users on version 2.3.0 or earlier, including how to install a newer version manually and what to expect from future updates.
    • Documented the 1 GiB update limit affecting older Mac versions and the status of testing updates larger than 1 GiB.
    • Clarified release guidance for updating the app’s underlying components.

Electron before 44.7 hands the update zip to Squirrel.Mac, which reads it
into one buffer and crashes the app past 1 GiB. Every Mac zip since 2.1.0
is over that, so Mac updates never installed. Electron 44.7 streams it to
disk instead.

Pins electron, electron-builder and electron-updater exactly. Mac users on
2.3.0 or earlier reinstall once by hand; the user docs say how.
@vercel

vercel Bot commented Nov 3, 2026

Copy link
Copy Markdown

@AnishSarkar22 is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

The Electron package now uses exact dependency versions. Release instructions specify Electron version requirements. Architecture and user documentation describe the macOS update limit and manual upgrade steps for SurfSense 2.3.0 or earlier.

Changes: macOS updates

Layer / File(s) Summary
Pin Electron versions
surfsense_local/electron/package.json, surfsense_local/RELEASE.md
Electron, electron-builder, and electron-updater now use exact versions. Release instructions cover Electron patch updates, the minimum Electron version, and carrying the updater patch forward.
Document macOS update behavior
docs/architecture/updates.md, www/content/docs/v2/updates.mdx
The documentation describes the pre-44.7 in-memory ZIP limit, the manual upgrade steps for affected versions, and the missing end-to-end test for an update over 1 GiB.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Possibly related PRs

Suggested reviewers: credo23

Merge Risk: Minimal · up to 70d3e

No actionable merge-blocking issue was identified. The dependency pins and upgrade guidance are consistent; complete the documented signed and notarized macOS update test before release.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: fixing Mac updates over 1 GiB by upgrading to Electron 44.10.1.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (4 skipped: 4 unsupported.)

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

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

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between ad04234 and 70d3edc.

Files ignored due to path filters: 1
  • surfsense_local/electron/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 4
  • docs/architecture/updates.md
  • surfsense_local/RELEASE.md
  • surfsense_local/electron/package.json
  • www/content/docs/v2/updates.mdx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@AnishSarkar22
AnishSarkar22 merged commit ac51ddb into MODSetter:dev Nov 3, 2026
31 of 32 checks passed
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