Repository navigation
fix(desktop): install Mac updates over 1 GiB with Electron 44.10.1 - #2387
Conversation
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.
|
@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. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
What
electron,electron-builderandelectron-updaterexactly insurfsense_local/electron/package.json.docs/architecture/updates.md(new section and two Known gaps).surfsense_local/RELEASE.md: check for an Electron 44 patch before each release, never go below 44.7, and carry theelectron-updaterpatch over on a bump.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_BREAKPOINTand noerrorevent (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:
These runs used a throwaway self-signed certificate, not the Developer ID, and no notarization.
Before release:
cd surfsense_local/electron && pnpm install && pnpm typecheck && pnpm testHigh-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, andelectron-updaterexactly, 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
docs/architecture/updates.mdsurfsense_local/RELEASE.mdwww/content/docs/v2/updates.mdxsurfsense_local/electron/package.jsonsurfsense_local/electron/pnpm-lock.yamlSummary by CodeRabbit