You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Failure to install updates that require administrator privileges #131
+1 on this really needs to be fixed. this has been a problem with squirrel and auto-updates on Mac OS X since Mac OS X 10.9.4 & atom 0.110.0, and we're now on Mac OS X 10.11.1 El Capitan and Atom 1.2.3.
Temporary workaround for end-users: Install the app you are trying to use to `~/Applications' rather than '/Applications' and set the app to 'Keep-in-dock' so you can easily find it. It's not a great workaround since most other apps install to '/Applications', but it will at least enable a normal end-user to use the original app (such as Atom) and get access to auto-updates.
Everyone - thankyou so much for the hard work on Squirrel - it's been effortless to setup and I love the simplicity of it.
This issue is a big snag for us - we're shipping a cross platform electron app that mostly runs invisibly as a daemon, and unfortunately isn't a fit for the MAS. Given it's invisibility, autoupdates seemed like a no-brainer - but this is a hard stop for us.
I've scoured the existing threads and I can't seem to find a solution as of yet, the ~/Applications work around isn't quite ideal, at least from my initial testing, doesn't seem to rectify the issue.
For posterity, the issue is a crash during the "update" step of autoupdate from the logs:
I'm not an Obj C expert - but given no-one is championing this at the moment, I'd love to do what I can to help. If someone on Squirrel team could potentially point me in the right direction to fixing this, my team can take a stab at it!
Thanks again for all the hard work everyone...! ❤️
@hhff Thanks for the very nice comment! Unfortunately, neither @keithduncan nor I really actively work on this anymore (and we don't really have the time to do so).
@paulcbetts has suggested that this is because a root-privileged app will write a root owned ShipIt folder (where Squirrel saves its downloaded updates). It's unclear to me why privilege escalation of the installer process doesn't solve this, but maybe a potential fix could be to always write ShipIt folders with the permissions of the running user, not the app?
@hhff I'd try to track down the place that is writing Installation error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied" UserInfo={NSLocalizedDescription=Permission denied}
I'm also noticing that /update.123abc folder does actually receive the update during the update process - I can see it present during during the Beginning installation phase.
It appears the issue on my end is not "writing to ShipIt logs / cache directories" (the Update is downloaded and unzipped to the correct place no problem) but, (I suspect) the issue stems from actually "applying" the newly downloaded package to the existing app.
This may be a red herring, but as an experiment, I did chown root:wheel /Applications/My App.app (it was my user / admin originally), and relaunched.
Now the log is:
2017-01-11 12:20:10.554 ShipIt[65366:4874518] Installation error: Error Domain=SQRLShipItRequestErrorDomain Code=2 "Could not read update request" UserInfo={NSLocalizedDescription=Could not read update request, NSUnderlyingError=0x7faa1372c450 {Error Domain=NSCocoaErrorDomain Code=260 "The file “ShipItState.plist” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/var/root/Library/Caches/org.develar.ElectronReact.ShipIt/ShipItState.plist, NSUnderlyingError=0x7faa1372c2d0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}}}
2017-01-11 12:20:10.554 ShipIt[65366:4874518] ShipIt quitting
2017-01-11 12:20:12.575 ShipIt[65368:4874940] Installation error: Error Domain=SQRLShipItRequestErrorDomain Code=2 "Could not read update request" UserInfo={NSLocalizedDescription=Could not read update request, NSUnderlyingError=0x7fc7fa703190 {Error Domain=NSCocoaErrorDomain Code=260 "The file “ShipItState.plist” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/var/root/Library/Caches/org.develar.ElectronReact.ShipIt/ShipItState.plist, NSUnderlyingError=0x7fc7fa703010 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}}}
2017-01-11 12:20:12.575 ShipIt[65368:4874940] ShipIt quitting
2017-01-11 12:20:14.601 ShipIt[65370:4875295] Installation error: Error Domain=SQRLShipItRequestErrorDomain Code=2 "Could not read update request" UserInfo={NSLocalizedDescription=Could not read update request, NSUnderlyingError=0x7fee1a6262c0 {Error Domain=NSCocoaErrorDomain Code=260 "The file “ShipItState.plist” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/var/root/Library/Caches/org.develar.ElectronReact.ShipIt/ShipItState.plist, NSUnderlyingError=0x7fee1a626140 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}}}
2017-01-11 12:20:14.602 ShipIt[65370:4875295] ShipIt quitting
I've since closed My App.app, but we're still seeing those logs get written every 2 seconds or so.
Having the same issue. Would love to participate in fixing it but I have no idea how to compile and test this code base. Anyone can help me get started?
Activity
faddah commentedon Nov 23, 2015
+1 on this really needs to be fixed. this has been a problem with squirrel and auto-updates on Mac OS X since Mac OS X 10.9.4 & atom 0.110.0, and we're now on Mac OS X 10.11.1 El Capitan and Atom 1.2.3.
erikmellum commentedon Nov 26, 2015
+1 Needs to be fixed. Running into this in Zurbs new Yeti Launch app.
jspahrsummers commentedon Nov 26, 2015
Please do not +1 issues. If you would like to see this fixed sooner, consider submitting a pull request instead.
AnAtomUser commentedon Nov 29, 2015
Temporary workaround for end-users: Install the app you are trying to use to `~/Applications' rather than '/Applications' and set the app to 'Keep-in-dock' so you can easily find it. It's not a great workaround since most other apps install to '/Applications', but it will at least enable a normal end-user to use the original app (such as Atom) and get access to auto-updates.
hhff commentedon Jan 9, 2017
Everyone - thankyou so much for the hard work on Squirrel - it's been effortless to setup and I love the simplicity of it.
This issue is a big snag for us - we're shipping a cross platform electron app that mostly runs invisibly as a daemon, and unfortunately isn't a fit for the MAS. Given it's invisibility, autoupdates seemed like a no-brainer - but this is a hard stop for us.
I've scoured the existing threads and I can't seem to find a solution as of yet, the
~/Applicationswork around isn't quite ideal, at least from my initial testing, doesn't seem to rectify the issue.For posterity, the issue is a crash during the "update" step of autoupdate from the logs:
I'm not an Obj C expert - but given no-one is championing this at the moment, I'd love to do what I can to help. If someone on Squirrel team could potentially point me in the right direction to fixing this, my team can take a stab at it!
Thanks again for all the hard work everyone...! ❤️
jspahrsummers commentedon Jan 9, 2017
@hhff Thanks for the very nice comment! Unfortunately, neither @keithduncan nor I really actively work on this anymore (and we don't really have the time to do so).
@paulcbetts has suggested that this is because a root-privileged app will write a
rootownedShipItfolder (where Squirrel saves its downloaded updates). It's unclear to me why privilege escalation of the installer process doesn't solve this, but maybe a potential fix could be to always writeShipItfolders with the permissions of the running user, not the app?hhff commentedon Jan 9, 2017
Gotcha - thanks @jspahrsummers !
Where in the codebase would you recommend starting out?
anaisbetts commentedon Jan 10, 2017
@hhff I'd try to track down the place that is writing
Installation error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied" UserInfo={NSLocalizedDescription=Permission denied}hhff commentedon Jan 10, 2017
Thanks @paulcbetts - I'm operating in an Electron environment - any tips for tracking that down in Node world?
anaisbetts commentedon Jan 10, 2017
@hhff oof, good question. Do you have the entire log?
hhff commentedon Jan 10, 2017
@paulcbetts yup - for me it's in
Application Support/Caches/org.develar.ElectronReact.ShipIt/ShipIt_stderr.logThat folder:
That
/update.2nPCfRhfolder is empty, fwiw.hhff commentedon Jan 10, 2017
I'm also noticing that
/update.123abcfolder does actually receive the update during the update process - I can see it present during during theBeginning installationphase.It's deleted after the third attempt fails:
jspahrsummers commentedon Jan 10, 2017
Looks like these would be the places to adjust permissions for writing:
-[SQRLDirectoryManager storageURL]creates the temporary directory for the downloaded update-[SQRLZipArchiver unzipArchiveAtURL:intoDirectoryAtURL:]unpacks the zip archive into that directoryUnfortunately, I don't have time to dig much more than this. Hopefully this is helpful!
anaisbetts commentedon Jan 11, 2017
How would ShipIt receive permissions issues if it's explicitly running as root 🤔
hhff commentedon Jan 11, 2017
Thanks @jspahrsummers & @paulcbetts !
It appears the issue on my end is not "writing to ShipIt logs / cache directories" (the Update is downloaded and unzipped to the correct place no problem) but, (I suspect) the issue stems from actually "applying" the newly downloaded package to the existing app.
This may be a red herring, but as an experiment, I did
chown root:wheel /Applications/My App.app(it wasmy user / adminoriginally), and relaunched.Now the log is:
I've since closed
My App.app, but we're still seeing those logs get written every 2 seconds or so.Sunyang730 commentedon Jan 18, 2017
Having the same issue. Would love to participate in fixing it but I have no idea how to compile and test this code base. Anyone can help me get started?
fancyydk commentedon Mar 13, 2017
Thanks for all the work on Squirrel. I, too, am running into this issue and was wondering if there's a solution or workaround.
BTW, what @hhff is seeing after changing the owner of My App.app is being tracked here #151