-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Sparkle does not restart app after update completes (sandboxed app with SUEnableInstallerLauncherService=true) #2725
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
Comments
I suspect the fix here is to set _relaunch (and maybe other state?) in |
Looking in Updater, I see we get sent sendTerminationSignal, but _targetRunningApplication is nil:
So something seems wrong with -runningApplicationsWithBundle:
|
I think there's an OS bug at play here, which is tickled by how our app is bundled (we have two executables in Contents/MacOS, one which needs to possibly do some work before then exec()ing the other...) Can we add in a special case to handle ths as well... perhaps ignoring the last three of n-2,n-1 are Contents/MacOS? |
… bundle path of a running application contains Contents/MacOS/Executable Fixed: sparkle-project#2725 Signed-off-by: Jeremy Huddleston Sequoia <[email protected]>
I think working around this sounds good in general, left a couple small comments on the PR. (Great job on debugging, it's a bit of a maze but not debugged to this extent often.) |
… bundle path of a running application contains Contents/MacOS/Executable Fixed: sparkle-project#2725 Signed-off-by: Jeremy Huddleston Sequoia <[email protected]>
… bundle path of a running application contains Contents/MacOS/Executable Fixed: sparkle-project#2725 Signed-off-by: Jeremy Huddleston Sequoia <[email protected]>
Description of the problem
Sparkle does not restart app after update completes.
Do you use Sandboxing in your app?
My app is sandboxed. It has SUEnableInstallerLauncherService=true set in Info.plist and sanbox exceptions to connect to the following ports:
The update works fine. But users need to manually quit and relaunch the app.
Version of
Sparkle.framework
in the latest version of your app2.6.4
Version of
Sparkle.framework
in the old version of app that your users have (or N/A)2.6.4
Sparkle's output from Console.app
Note the SparkleUpdater logs there are from our
SPUUpdaterDelegate
(which was only emitting logging to help track things down here...)Steps to reproduce the behavior
I check for updates and am presented with the update release notes.
I click Install Update in the release notes window.
Expected (based on behavior I see in other apps):
I should get a dialog with a "Install and Relaunch" button.
Tapping on "Install and Relaunch" should prompt for authentication if required, install, and relaunch the app.
Observed:
I am immediately prompted to auth for the install
I see an Extracting Update dialog and the soon after an 'Update Installed' dialog. The app does not relaunch, and the user is not told to relaunch it.
--
I debugged this a bit in lldb and what I observed is that we're getting a
SPUInstallationFinishedStage3
message while_relaunch
is set to NO.It looks like
_relaunch
is only set toYES
in-installWithToolAndRelaunch:displayingUserInterface:
, but that isn't getting called.That in turn is because finishInstallationWithResponse:displayingUserInterface: isn't being called...
That looks to be usually called in -basicDriverDidFindUpdateWithAppcastItem:secondaryAppcastItem: when state is SPUUserUpdateStageInstalling , but the only time I ever see that called is for SPUUserUpdateStageNotDownloaded.
It looks like this is just a gap in how SUEnableInstallerLauncherService=true support was implemented. That seems to completely bypass these function calls, which results in _relaunch never getting set to YES, so we end up passing relaunch=no when receiving SPUInstallationFinishedStage3...
The text was updated successfully, but these errors were encountered: