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 }}
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Auto-update on Mac doesn't work as a non-Admin user #2860
I've never been able to get the autoupdate to work. It detects a new version, happily downloads, but when I click restart and update, it quits the app, presumably fails to update, and then relaunches, and starts redownloading the update. Usually then I have to get into a hit-quit-a-bunch-war to get it to stop relaunching on quit.
I've pasted the error output from OS X console below:
7/8/14 8:04:09.265 AM Atom[39769]: App load time: 201ms
7/8/14 8:04:35.014 AM Atom[39769]: Download completed to: file:///Volumes/Secondary/Users/pbhogan/Library/Application%20Support/com.github.atom.ShipIt/update.ja3pAYF/download
7/8/14 8:04:42.995 AM com.apple.launchd.peruser.569031419[209]: (com.github.atom.ShipIt[39791]) assertion failed: 13E28: launchd + 105865 [364E35A7-9FA7-3950-8494-40B49A2E7250]: 0xd
7/8/14 8:04:44.875 AM ShipIt[39791]: Beginning installation
7/8/14 8:04:44.893 AM ShipIt[39791]: Couldn't abort install and restore owned bundle to previous location file:///Applications/Atom.app, error NSError { domain: NSPOSIXErrorDomain, code: 2, description: "No such file or directory" }
7/8/14 8:04:56.125 AM ShipIt[39791]: Application launched at file:///Applications/Atom.app
7/8/14 8:04:56.125 AM ShipIt[39791]: Installation error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied" UserInfo=0x7fefdc41a260 {NSLocalizedDescription=Permission denied}
7/8/14 8:04:56.125 AM ShipIt[39791]: ShipIt quitting
7/8/14 8:04:56.131 AM com.apple.launchd.peruser.569031419[209]: (com.github.atom.ShipIt[39791]) Exited with code: 1
7/8/14 8:04:56.132 AM com.apple.launchd.peruser.569031419[209]: (com.github.atom.ShipIt[39794]) assertion failed: 13E28: launchd + 105865 [364E35A7-9FA7-3950-8494-40B49A2E7250]: 0xd
7/8/14 8:04:56.435 AM Atom[39792]: App load time: 190ms
Reacted by austinbutler, Ricardo Graça, Jason Axelson, Kevin Mickey, Jonathan Bull, Eric Hayes, Yukai Huang and Ilmari Oranen
I did some experimenting and found that it works if placed in ~/Applications instead of the usual /Applications, but this is not really a desirable place to put the app bundle.
It's fairly common (particularly in organizations) on OS X to have a super user account and be logged in with a regular user account. Standard app behavior in this case is to request elevated admin privileges when self-updating. My guess is Atom is not doing so and therefore fails to copy the updated bundle in to /Applications.
It looks like squirrel (the updater we use) fixed this. @keithduncan, do we need to do anything special to get the permissions prompt working with squirrel?
@keithduncan, I'm not sure of the exact sha, but it is most likely Squirrel/Squirrel.Mac@b407f94. That is the commit my local copy of Squirrel.Mac is on, and I'm pretty sure I built the latest version of Squirrel that is being used.
Sorry I took so long to get to this, I’ve confirmed there is an issue when updating an app when running as a user that doesn’t have BSD permissions to write to the directory. We’re working on a fix now.
I'm also having this problem and I think it occasionally trashes launchd because my computer won't boot up and I have to trash /var/db/launch.db and then once I run Atom again and I see the ShipIt error, it fails again to boot.
Basically, what happens is I try to reboot and my system just gets stuck. If I boot using single user mode, I can get to a root prompt, but if I exit it just hangs (no output, nothing happening). I found that if I do launchctl load -D system it will get to the login screen, but things are pretty flakey from that point onward - e.g. I found that some parts of the system won't work (some apps hang, stuff just generally locking up/hanging where it usually doesn't).
To completely fix the issue, what I've found works is the following:
1/ Boot to single user root prompt.
2/ launchctl load -D system get to login window. Log in as a basic user with admin privileges.
3/ Trash /var/folders/* and /var/db/launch.db/*
4/ Reboot.
Usually this seems to fix the problem. I tried just rebooting after step 2 but it still hangs. So, something in launch.db is going wrong. I just trash /var/folders/* for good measure but I haven't tried not doing this.
I've noticed a correlation with this problem, and when Atom appears to try and download updates. I've never had the Atom updater work correctly, I've always had to download updates manually. I have Atom installed in /Applications/User/Atom.app.
If the problem manifests again, I will provide a copy of the two directories I trash along with the LaunchDaemon plists, etc.
Here is some log data regarding some of the ShipIt issues I've been having:
Oct 17 11:10:20 Fukurou.local Atom[5162]: Download completed to: file:///Users/samuel/Library/Application%20Support/com.github.atom.ShipIt/update.iEv1ix8/download
Oct 17 11:10:24 Fukurou.local Atom[5162]: FAILURE: Job com.github.atom.ShipIt is not loaded in launchd.
Oct 17 11:10:24 Fukurou com.apple.launchd.peruser.501[169] (com.github.atom.ShipIt[5183]): assertion failed: 13F34: launchd + 105865 [364E35A7-9FA7-3950-8494-40B49A2E7250]: 0xd
Oct 17 11:22:11 Fukurou.local ShipIt[5183]: Beginning installation
Oct 17 11:22:11 Fukurou.local ShipIt[5183]: Couldn't abort install and restore owned bundle to previous location file:///Applications/User/Atom.app, error NSError { domain: NSPOSIXErrorDomain, code: 2, description: "No such file or directory" }
Oct 17 11:22:21 Fukurou.local ShipIt[5183]: Installation error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied" UserInfo=0x7fbb662164e0 {NSLocalizedDescription=Permission denied}
Oct 17 11:22:21 Fukurou.local ShipIt[5183]: ShipIt quitting
Oct 17 11:22:21 Fukurou com.apple.launchd.peruser.501[169] (com.github.atom.ShipIt[5183]): Exited with code: 1
Oct 17 11:22:21 Fukurou com.apple.launchd.peruser.501[169] (com.github.atom.ShipIt[5250]): assertion failed: 13F34: launchd + 105865 [364E35A7-9FA7-3950-8494-40B49A2E7250]: 0xd
Oct 17 11:22:21 Fukurou.local ShipIt[5250]: Resuming installation attempt 2
Oct 17 11:22:21 Fukurou.local ShipIt[5250]: Couldn't abort install and restore owned bundle to previous location file:///Applications/User/Atom.app, error NSError { domain: NSPOSIXErrorDomain, code: 2, description: "No such file or directory" }
Oct 17 11:22:28 Fukurou.local ShipIt[5250]: Installation error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied" UserInfo=0x7fd2e2553ef0 {NSLocalizedDescription=Permission denied}
Oct 17 11:22:28 Fukurou.local ShipIt[5250]: ShipIt quitting
Oct 17 11:22:28 Fukurou com.apple.launchd.peruser.501[169] (com.github.atom.ShipIt[5250]): Exited with code: 1
Oct 17 11:22:28 Fukurou com.apple.launchd.peruser.501[169] (com.github.atom.ShipIt[5253]): assertion failed: 13F34: launchd + 105865 [364E35A7-9FA7-3950-8494-40B49A2E7250]: 0xd
Oct 17 11:22:28 Fukurou.local ShipIt[5253]: Resuming installation attempt 3
Oct 17 11:22:28 Fukurou.local ShipIt[5253]: Couldn't abort install and restore owned bundle to previous location file:///Applications/User/Atom.app, error NSError { domain: NSPOSIXErrorDomain, code: 2, description: "No such file or directory" }
Oct 17 11:22:34 Fukurou.local ShipIt[5253]: Installation error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied" UserInfo=0x7fcc3b3449f0 {NSLocalizedDescription=Permission denied}
Oct 17 11:22:34 Fukurou.local ShipIt[5253]: ShipIt quitting
Oct 17 11:22:34 Fukurou com.apple.launchd.peruser.501[169] (com.github.atom.ShipIt[5253]): Exited with code: 1
Oct 17 11:22:34 Fukurou com.apple.launchd.peruser.501[169] (com.github.atom.ShipIt[5254]): assertion failed: 13F34: launchd + 105865 [364E35A7-9FA7-3950-8494-40B49A2E7250]: 0xd
Oct 17 11:22:34 Fukurou.local ShipIt[5254]: Too many attempts to install, aborting update
Oct 17 11:22:34 Fukurou.local ShipIt[5254]: Error aborting installation: Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory" UserInfo=0x7fc983e2da20 {NSLocalizedDescription=No such file or directory}
Oct 17 11:22:34 Fukurou.local ShipIt[5254]: ShipIt quitting
Oct 17 11:30:30 Fukurou.local Atom[239]: Download completed to: file:///Users/samuel/Library/Application%20Support/com.github.atom.ShipIt/update.sZ6OPQu/download
Oct 17 11:30:34 Fukurou.local Atom[239]: FAILURE: Job com.github.atom.ShipIt is not loaded in launchd.
Oct 17 11:30:34 Fukurou com.apple.launchd.peruser.501[174] (com.github.atom.ShipIt[720]): assertion failed: 13F34: launchd + 105865 [364E35A7-9FA7-3950-8494-40B49A2E7250]: 0xd
Oct 17 12:59:37 Fukurou.local ShipIt[720]: Beginning installation
Oct 17 12:59:37 Fukurou.local ShipIt[720]: Couldn't abort install and restore owned bundle to previous location file:///Applications/User/Atom.app, error NSError { domain: NSPOSIXErrorDomain, code: 2, description: "No such file or directory" }
Oct 17 12:59:45 Fukurou.local ShipIt[720]: Installation error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied" UserInfo=0x7f8632ea98d0 {NSLocalizedDescription=Permission denied}
Oct 17 12:59:45 Fukurou.local ShipIt[720]: ShipIt quitting
Oct 17 12:59:45 Fukurou com.apple.launchd.peruser.501[174] (com.github.atom.ShipIt[720]): Exited with code: 1
Oct 17 12:59:45 Fukurou com.apple.launchd.peruser.501[174] (com.github.atom.ShipIt[1511]): assertion failed: 13F34: launchd + 105865 [364E35A7-9FA7-3950-8494-40B49A2E7250]: 0xd
Oct 17 12:59:45 Fukurou.local ShipIt[1511]: Resuming installation attempt 2
Oct 17 12:59:45 Fukurou.local ShipIt[1511]: Couldn't abort install and restore owned bundle to previous location file:///Applications/User/Atom.app, error NSError { domain: NSPOSIXErrorDomain, code: 2, description: "No such file or directory" }
Oct 17 12:59:53 Fukurou.local ShipIt[1511]: Installation error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied" UserInfo=0x7f8ba3691080 {NSLocalizedDescription=Permission denied}
Oct 17 12:59:53 Fukurou.local ShipIt[1511]: ShipIt quitting
Oct 17 12:59:53 Fukurou com.apple.launchd.peruser.501[174] (com.github.atom.ShipIt[1511]): Exited with code: 1
Oct 17 12:59:53 Fukurou com.apple.launchd.peruser.501[174] (com.github.atom.ShipIt[1512]): assertion failed: 13F34: launchd + 105865 [364E35A7-9FA7-3950-8494-40B49A2E7250]: 0xd
Oct 17 12:59:53 Fukurou.local ShipIt[1512]: Resuming installation attempt 3
Oct 17 12:59:53 Fukurou.local ShipIt[1512]: Couldn't abort install and restore owned bundle to previous location file:///Applications/User/Atom.app, error NSError { domain: NSPOSIXErrorDomain, code: 2, description: "No such file or directory" }
Oct 17 13:00:00 Fukurou.local ShipIt[1512]: Installation error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied" UserInfo=0x7feb4364f9c0 {NSLocalizedDescription=Permission denied}
Oct 17 13:00:00 Fukurou.local ShipIt[1512]: ShipIt quitting
Oct 17 13:00:00 Fukurou com.apple.launchd.peruser.501[174] (com.github.atom.ShipIt[1512]): Exited with code: 1
Oct 17 13:00:00 Fukurou com.apple.launchd.peruser.501[174] (com.github.atom.ShipIt[1516]): assertion failed: 13F34: launchd + 105865 [364E35A7-9FA7-3950-8494-40B49A2E7250]: 0xd
Oct 17 13:00:00 Fukurou.local ShipIt[1516]: Too many attempts to install, aborting update
Oct 17 13:00:00 Fukurou.local ShipIt[1516]: Error aborting installation: Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory" UserInfo=0x7fcc5ad1e680 {NSLocalizedDescription=No such file or directory}
Oct 17 13:00:00 Fukurou.local ShipIt[1516]: ShipIt quitting
Oct 17 13:00:25 Fukurou.local sudo[1591]: samuel : TTY=ttys000 ; PWD=/Library ; USER=root ; COMMAND=/usr/bin/find ./ -name *ShipIt*
My gut feeling is something gets really screwed in launchd somehow, but I'm not 100% sure what is going on.
@ioquatix thanks for the detailed write up, I’m particularly interested in the contents of the /var/db/launch.db/com.apple.launchd.peruser.501/ directory after Squirrel has run and potentially broken something.
As a note, I was successfully able to update to 1.25.0 as well as 1.25.1 using the built in update script. It seemed to take a reboot in order to get the updater to recognize that there was an update but the actual update process went smoothly.
I never had to provide credentials in order to update.
Auto upgrade from from 1.25.0 to 1.25.1 did not work for me. It downloaded the update and asked to provide credentials, but did not install the new version. I still had to manually upgrade using the steps in my comment above.
It took a couple tries to get Atom to quit and then restart (perhaps I was impatient) but then it did successfully update from 1.25.1 to 1.26.0 for me.
I left the 1.26.0 update running overnight, and it didn't work. Manually killing the running Atom processes didn't help either. I think I'm just going to disable automatic updating and download updates myself instead.
In order to test from scratch, I uninstalled Atom and reinstalled 1.25.1, still as a non-admin user. On launch of Atom 1.25.1, the app automatically downloaded 1.27.0, prompted for an administrative account, restarted 1.27.0. In other words, it worked as expected for me.
Many users affected by this issue may have adjusted the permissions of Atom and ShipIt folders. Here is a clean install:
Backup your computer.
If you previously installed using the awesome Homebrew, remove:
After updating from Atom 1.25.1 to 1.27.2 just now, I've noticed that choosing Restart and install update from the macOS menu bar almost always works, but pressing the Restart and install update button found on the "About Atom" screen (found either via the menu bar or clicking the squirrel in the status bar when there's an update) almost never works for me. Hope that additional info helps!
I have comparable observations.
When I use "Restart and install update" then for me always the Window disappears, but the Atom process is still running (seen inprocesses and also in dock). When I end the process via dock (soft) or process (hard) then I mostly get no install and at next starts he downloads the update again.
BUT I have good success with:
Restart and install, WIndow disappears but process still runs.
klick on dock icon again and an Atom window is opened again
klick on "restart and install" again
then it shuts down and installs on next start
I now experienced that 2 times ad will have a deep focus with next update :-)
This issue has been automatically marked as stale because it has not had recent activity. Because the Atom team treats their issues as their backlog, stale issues are closed. If you would like this issue to remain open:
Verify that you can still reproduce the issue in the latest version of Atom
Comment that the issue is still reproducible and include:
What version of Atom you reproduced the issue on
What OS and version you reproduced the issue on
What steps you followed to reproduce the issue
Issues that are labeled as triaged will not be automatically marked as stale.
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!
Activity
izuzak commentedon Jul 8, 2014
@pbhogan Sorry for the trouble! Can you clarify which version of Atom you're on currently?
cc @probablycorey
pbhogan commentedon Jul 8, 2014
I'm on 0.110.0
I did some experimenting and found that it works if placed in ~/Applications instead of the usual /Applications, but this is not really a desirable place to put the app bundle.
It's fairly common (particularly in organizations) on OS X to have a super user account and be logged in with a regular user account. Standard app behavior in this case is to request elevated admin privileges when self-updating. My guess is Atom is not doing so and therefore fails to copy the updated bundle in to /Applications.
probablycorey commentedon Jul 8, 2014
It looks like squirrel (the updater we use) fixed this. @keithduncan, do we need to do anything special to get the permissions prompt working with squirrel?
keithduncan commentedon Jul 11, 2014
Which version of Squirrel.Mac are we bundling in Atom currently?
probablycorey commentedon Jul 11, 2014
We build and store the external frameworks on https://github.com/atom/atom-shell-frameworks/releases, so it looks like we build it around Apr 28. But I'm not sure where to look in the Squirrel.framework to get the exact version number.
keithduncan commentedon Jul 22, 2014
Do we have the sha that was built for the Apr 28 release?
probablycorey commentedon Jul 22, 2014
@keithduncan, I'm not sure of the exact sha, but it is most likely Squirrel/Squirrel.Mac@b407f94. That is the commit my local copy of Squirrel.Mac is on, and I'm pretty sure I built the latest version of Squirrel that is being used.
keithduncan commentedon Aug 6, 2014
Sorry I took so long to get to this, I’ve confirmed there is an issue when updating an app when running as a user that doesn’t have BSD permissions to write to the directory. We’re working on a fix now.
ioquatix commentedon Oct 17, 2014
I'm also having this problem and I think it occasionally trashes launchd because my computer won't boot up and I have to trash
/var/db/launch.dband then once I run Atom again and I see the ShipIt error, it fails again to boot.keithduncan commentedon Oct 17, 2014
Squirrel doesn’t touch this directory directly. Though from looking at it, the subdirectories store per-user launchd job override state.
Could you zip up this directory while in a broken state and send a link to the archive for us to inspect?
What errors are you seeing when booting?
ioquatix commentedon Oct 17, 2014
Okay, well it's pretty odd.
Basically, what happens is I try to reboot and my system just gets stuck. If I boot using single user mode, I can get to a root prompt, but if I
exitit just hangs (no output, nothing happening). I found that if I dolaunchctl load -D systemit will get to the login screen, but things are pretty flakey from that point onward - e.g. I found that some parts of the system won't work (some apps hang, stuff just generally locking up/hanging where it usually doesn't).To completely fix the issue, what I've found works is the following:
1/ Boot to single user root prompt.
2/
launchctl load -D systemget to login window. Log in as a basic user with admin privileges.3/ Trash
/var/folders/*and/var/db/launch.db/*4/ Reboot.
Usually this seems to fix the problem. I tried just rebooting after step 2 but it still hangs. So, something in
launch.dbis going wrong. I just trash/var/folders/*for good measure but I haven't tried not doing this.I've noticed a correlation with this problem, and when Atom appears to try and download updates. I've never had the Atom updater work correctly, I've always had to download updates manually. I have Atom installed in
/Applications/User/Atom.app.If the problem manifests again, I will provide a copy of the two directories I trash along with the LaunchDaemon plists, etc.
Here is some log data regarding some of the
ShipItissues I've been having:My gut feeling is something gets really screwed in
launchdsomehow, but I'm not 100% sure what is going on.keithduncan commentedon Oct 17, 2014
@ioquatix thanks for the detailed write up, I’m particularly interested in the contents of the
/var/db/launch.db/com.apple.launchd.peruser.501/directory after Squirrel has run and potentially broken something./cc @jspahrsummers
ioquatix commentedon Oct 22, 2014
With the latest update, the same thing appears to have happened again. I haven't rebooted my computer yet. Here is the log file.
I'm going to reboot and see what happens..
ioquatix commentedon Oct 22, 2014
Okay, so didn't have any problems this time (running 10.10 now which is different). But, also Atom hasn't updated either.
114 remaining items
sww1235 commentedon Apr 7, 2018
As a note, I was successfully able to update to 1.25.0 as well as 1.25.1 using the built in update script. It seemed to take a reboot in order to get the updater to recognize that there was an update but the actual update process went smoothly.
I never had to provide credentials in order to update.
On mac 10.11.6
njordhov commentedon Apr 11, 2018
Auto upgrade from from 1.25.0 to 1.25.1 did not work for me. It downloaded the update and asked to provide credentials, but did not install the new version. I still had to manually upgrade using the steps in my comment above.
On legacy OSX 10.10.5 which could be the reason.
davidcelis commentedon Apr 16, 2018
It took clicking "Download and Reinstall Update" four or five times to finally go from 1.25.0 to 1.25.1 for me
Apollon77 commentedon Apr 16, 2018
I also needed to try some times. Partly a Atom process was running but without UI. I needed to exit that process and then it was updated
bhutchinson commentedon Apr 19, 2018
It took a couple tries to get Atom to quit and then restart (perhaps I was impatient) but then it did successfully update from 1.25.1 to 1.26.0 for me.
CodingItWrong commentedon Apr 20, 2018
I left the 1.26.0 update running overnight, and it didn't work. Manually killing the running Atom processes didn't help either. I think I'm just going to disable automatic updating and download updates myself instead.
davidcelis commentedon Apr 20, 2018
My Atom still thinks 1.25.1 is the latest version 🤷♂️
bbgdzxng1 commentedon May 21, 2018
In order to test from scratch, I uninstalled Atom and reinstalled 1.25.1, still as a non-admin user. On launch of Atom 1.25.1, the app automatically downloaded 1.27.0, prompted for an administrative account, restarted 1.27.0. In other words, it worked as expected for me.
Many users affected by this issue may have adjusted the permissions of Atom and ShipIt folders. Here is a clean install:
Backup your computer.
If you previously installed using the awesome Homebrew, remove:
Uninstall Atom via AppCleaner
Clean up any Atom and ShipIt folders if they still exist, which may have funky permissions...
Empty Trash.
Download Atom 1.25.1, although anything greater than 1.25.0 should work.
Let auto-update do it's thing.
I believe that the issue is now resolved (for me, at least). Thanks for the resolution.
davidcelis commentedon Jun 8, 2018
After updating from Atom 1.25.1 to 1.27.2 just now, I've noticed that choosing
Restart and install updatefrom the macOS menu bar almost always works, but pressing theRestart and install updatebutton found on the "About Atom" screen (found either via the menu bar or clicking the squirrel in the status bar when there's an update) almost never works for me. Hope that additional info helps!Apollon77 commentedon Jun 8, 2018
I have comparable observations.
When I use "Restart and install update" then for me always the Window disappears, but the Atom process is still running (seen inprocesses and also in dock). When I end the process via dock (soft) or process (hard) then I mostly get no install and at next starts he downloads the update again.
BUT I have good success with:
I now experienced that 2 times ad will have a deep focus with next update :-)
stale commentedon Jun 27, 2019
Thanks for your contribution!
This issue has been automatically marked as stale because it has not had recent activity. Because the Atom team treats their issues as their backlog, stale issues are closed. If you would like this issue to remain open:
Issues that are labeled as triaged will not be automatically marked as stale.
lock commentedon Jan 7, 2020
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!