New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: abort ShipIt installation attempt at the final mile if the app is running #36130
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
patches/squirrel.mac/fix_abort_installation_attempt_at_the_final_mile_if_the_app_is.patch
Show resolved
Hide resolved
patches/squirrel.mac/fix_abort_installation_attempt_at_the_final_mile_if_the_app_is.patch
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Newly added test fails
…al_mile_if_the_app_is.patch Co-authored-by: Jeremy Rose <jeremya@chromium.org>
7cacbd0
to
9278cda
Compare
Release Notes Persisted
|
I was unable to backport this PR to "20-x-y" cleanly; |
I was unable to backport this PR to "22-x-y" cleanly; |
I was unable to backport this PR to "21-x-y" cleanly; |
…s running (#36130) * fix: abort ShipIt installation attempt at the final mile if the app is running * chore: remove only * Update patches/squirrel.mac/fix_abort_installation_attempt_at_the_final_mile_if_the_app_is.patch Co-authored-by: Jeremy Rose <jeremya@chromium.org> * chore: update patches * spec: make the ShipIt process lister helper more resilient Co-authored-by: Jeremy Rose <jeremya@chromium.org> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
@MarshallOfSound has manually backported this PR to "22-x-y", please check out #36362 |
…s running (#36362) fix: abort ShipIt installation attempt at the final mile if the app is running (#36130) * fix: abort ShipIt installation attempt at the final mile if the app is running * chore: remove only * Update patches/squirrel.mac/fix_abort_installation_attempt_at_the_final_mile_if_the_app_is.patch Co-authored-by: Jeremy Rose <jeremya@chromium.org> * chore: update patches * spec: make the ShipIt process lister helper more resilient Co-authored-by: Jeremy Rose <jeremya@chromium.org> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: Jeremy Rose <jeremya@chromium.org> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
…s running (electron#36130) * fix: abort ShipIt installation attempt at the final mile if the app is running * chore: remove only * Update patches/squirrel.mac/fix_abort_installation_attempt_at_the_final_mile_if_the_app_is.patch Co-authored-by: Jeremy Rose <jeremya@chromium.org> * chore: update patches * spec: make the ShipIt process lister helper more resilient Co-authored-by: Jeremy Rose <jeremya@chromium.org> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
…s running (#36130) * fix: abort ShipIt installation attempt at the final mile if the app is running * chore: remove only * Update patches/squirrel.mac/fix_abort_installation_attempt_at_the_final_mile_if_the_app_is.patch Co-authored-by: Jeremy Rose <jeremya@chromium.org> * chore: update patches * spec: make the ShipIt process lister helper more resilient Co-authored-by: Jeremy Rose <jeremya@chromium.org> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
@VerteDinde has manually backported this PR to "21-x-y", please check out #37794 |
…s running (#37794) * fix: abort ShipIt installation attempt at the final mile if the app is running (#36130) * fix: abort ShipIt installation attempt at the final mile if the app is running * chore: remove only * Update patches/squirrel.mac/fix_abort_installation_attempt_at_the_final_mile_if_the_app_is.patch Co-authored-by: Jeremy Rose <jeremya@chromium.org> * chore: update patches * spec: make the ShipIt process lister helper more resilient Co-authored-by: Jeremy Rose <jeremya@chromium.org> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> * test: update spec & spec-main/yarn.lock --------- Co-authored-by: Jeremy Rose <jeremya@chromium.org> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
As in title, basically there is a race condition in Squirrel.Mac. The current flow looks like this
If somehow the app manages to launch (the user clicks it, programatic relaunch, etc.) during step 4 then step 5 succeeds, step 6 bails as the app is running and everything appears to be fine. But it is not.... The running app no longer exists on disk and will therefore fail all uncached TCC / Security.h checks including microphone/camera permission checks and keychain access checks. (Amongst other awful things).
This fixes this race condition by adding a step 4.5 that checks if any app is running from the bundle path we're about to install an update to. We don't do step (3) again because waiting for the app to quit is unrealistic if the user manually launched it. The best thing to do is to get back into a known good state and bail the update flow with an error but without triggering an automatic launchd retry (hence the "Happy error" exit logic).
Notes: Fixed race condition during update on macOS that could result in TCC and Keychain errors