Updating an application that runs with admin privileges

Asked by Pierre-Luc Brunet

We have an in-house application that runs using admin privileges on certain occasion. Depending on who is running it, the application will request system.privilege.admin rights on start up.

Unfortunately, for those running the application under those admin rights, Spakles is unable to update the application. It sees the update, downloads it, extract it but when it's time for "Install and relaunch", then errors out with "Sparkle Error: An error occurred while installing the update. Please try again later."

The downloaded file is owned by root:wheel but the extracted result is owned by the user original username. I'm assuming this has something to do with it.

What can we do to solve this problem?

Thanks! :)

Question information

Language:
English Edit question
Status:
Answered
For:
Sparkle Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Andy Matuschak (andymatuschak) said :
#1

Hm. Is there a more useful error in the console output?

Revision history for this message
Pierre-Luc Brunet (fuitad) said :
#2

Mar 25 01:13:50 Pierre-Luc-Brunets-Mac-Pro Edgar[84389]: [Update] didFindValidUpdate: http://intranet/download/edgar-1.4.zip
Mar 25 01:14:01 Pierre-Luc-Brunets-Mac-Pro Edgar[84389]: [Update] willInstallUpdate: http://intranet/download/edgar-1.4.zip
Mar 25 01:14:04 Pierre-Luc-Brunets-Mac-Pro Edgar[84389]: Sparkle Error: An error occurred while installing the update. Please try again later.

That's it :(

Revision history for this message
Andy Matuschak (andymatuschak) said :
#3

Are you using Sparkle 1.5b6? If so, would you mind trying a more recent version built from http://github.com/andymatuschak/Sparkle/archives/master?

Revision history for this message
Pierre-Luc Brunet (fuitad) said :
#4

That's the version I'm running:

Pierre-Luc-Brunets-Mac-Pro:Sparkle fuitad$ git log
commit 3f502b61517abd3a652b672168af5244e2bdc23e
Author: Andy Matuschak <email address hidden>
Date: Thu Feb 25 00:46:57 2010 -0800

    Fixing bug #527318, some minor Spanish layout issues.

Looks like the latest git version.

Revision history for this message
Andy Matuschak (andymatuschak) said :
#5

Ah, then I'm afraid the stock solutions I try when I have no idea have failed. :)

So, the fact that it fails in the old version of the app (rather than during the relaunch) tells me that it's the copy or deleting operation of the .app that's failing, not the launching.

Since you've got your own build of Sparkle, you could break on SUBasicUpdateDriver.m's abortUpdate and look up the stack to see what's caused the failure.

Alternately, you could email me a binary, but given that this is an internal tool, I can understand that not being a good option.

Revision history for this message
Pierre-Luc Brunet (fuitad) said :
#6

"Since you've got your own build of Sparkle, you could break on SUBasicUpdateDriver.m's abortUpdate and look up the stack to see what's caused the failure."

If I'm including a framework in my application, how do I break one of it's source file? I'm a little lost here :).

Revision history for this message
Pierre-Luc Brunet (fuitad) said :
#7

After adding some additional error logging, I ended up getting this

Mar 28 23:48:23 Pierre-Luc-Brunets-Mac-Pro Pocket Gnome[18395]: Sparkle Error: Sparkle Updater: Possible attack in progress! Attempting to "upgrade" from 1.4.4.205.3 to (null). Aborting update.
Mar 28 23:48:23 Pierre-Luc-Brunets-Mac-Pro Pocket Gnome[18395]: Sparkle Error (continued): (null)

Not sure how relevant this is.

Revision history for this message
Andy Matuschak (andymatuschak) said :
#8

Ah! That's very relevant. That means Sparkle thinks the CFBundleVersion key in your update's Info.plist is empty. Is that the case?

Revision history for this message
Tanaris (tanaris4) said :
#9

Did this ever get solved? I printed the same info and I get: 695 to (null)

And unfortunately I'm running into an issue now where I can't relaunch the app, I'm wondering if it's related (https://answers.launchpad.net/sparkle/+question/153985)

Revision history for this message
Andy Matuschak (andymatuschak) said :
#10

Getting "(null)" suggests that the update was extracted, and the archive was searched, and something that looks like an update was found, but that its Info.plist doesn't have a CFBundleVersion key.

Can you help with this problem?

Provide an answer of your own, or ask Pierre-Luc Brunet for more information if necessary.

To post a message you must log in.