fix: Squirrel.Mac crash when zip extraction fails#47271
Merged
Conversation
bfbe132 to
9ae9762
Compare
9ae9762 to
f06dbd9
Compare
3 tasks
MarshallOfSound
approved these changes
May 29, 2025
|
Release Notes Persisted
|
This was referenced May 29, 2025
Contributor
|
I have automatically backported this PR to "35-x-y", please check out #47299 |
Contributor
|
I have automatically backported this PR to "36-x-y", please check out #47300 |
Contributor
|
I have automatically backported this PR to "34-x-y", please check out #47301 |
Contributor
|
I have automatically backported this PR to "37-x-y", please check out #47302 |
Member
Author
|
I found the root cause for this crash: #47515 The app ran into the per-process open file handle limit due to that bug. |
kigh-ota
pushed a commit
to kigh-ota/electron
that referenced
this pull request
Sep 30, 2025
* fix: Squirrel.Mac crash when zip extraction process fails to launch * chore: add end-to-end test
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
Fixes #47270
Squirrel.Mac launches
/usr/bin/dittoto extract the update zip file. When that process fails to launch, the (deprecated)launchfunction will raise anNSInvalidArgumentException. This exception wasn't caught. Thus, the app crashed.This PR migrates the code to the (non-deprecated)
launchAndReturnErrorfunction and adds proper error handling.I've also included a test to prevent this from regressing.
This is the first Objective-C code I've ever written, so please be extra careful during your review.
I've tested the change as follows:
All autoUpdater tests pass (incl. the newly added test).
The newly added test crashes with SIGTRAP on main.
CC @MarshallOfSound
Checklist
npm testpassesRelease Notes
Notes: Fixed crash in
autoUpdateron macOS when zip extraction failed.