Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
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

Closed

Description

@pbhogan

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

Activity

  1. izuzak commented on Jul 8, 2014

    @izuzak
    Contributor

    @pbhogan Sorry for the trouble! Can you clarify which version of Atom you're on currently?

    cc @probablycorey

  2. pbhogan commented on Jul 8, 2014

    @pbhogan
    Author

    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.

  3. probablycorey commented on Jul 8, 2014

    @probablycorey

    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?

  4. keithduncan commented on Jul 11, 2014

    @keithduncan

    Which version of Squirrel.Mac are we bundling in Atom currently?

  5. probablycorey commented on Jul 11, 2014

    @probablycorey

    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.

  6. keithduncan commented on Jul 22, 2014

    @keithduncan

    Do we have the sha that was built for the Apr 28 release?

  7. probablycorey commented on Jul 22, 2014

    @probablycorey

    @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.

  8. keithduncan commented on Aug 6, 2014

    @keithduncan

    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.

  9. ioquatix commented on Oct 17, 2014

    @ioquatix

    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.

  10. keithduncan commented on Oct 17, 2014

    @keithduncan

    I think it occasionally trashes launchd because my computer won't boot up and I have to trash /var/db/launch.db

    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?

    my computer won't boot up

    What errors are you seeing when booting?

  11. ioquatix commented on Oct 17, 2014

    @ioquatix

    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 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.

  12. keithduncan commented on Oct 17, 2014

    @keithduncan

    @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

  13. ioquatix commented on Oct 22, 2014

    @ioquatix

    With the latest update, the same thing appears to have happened again. I haven't rebooted my computer yet. Here is the log file.

    23/10/14 12:14:23.384 pm Atom[32565]: Download completed to: file:///Users/samuel/Library/Application%20Support/com.github.atom.ShipIt/update.Xk6PQBQ/download
    23/10/14 12:14:27.226 pm com.apple.xpc.launchd[1]: (com.github.atom.ShipIt) The Debug key is no longer respected. Please remove it.
    23/10/14 12:21:10.693 pm ShipIt[55944]: Beginning installation
    23/10/14 12:21:10.706 pm ShipIt[55944]: 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" }
    23/10/14 12:21:17.226 pm ShipIt[55944]: Application launched at file:///Applications/User/Atom.app
    23/10/14 12:21:17.227 pm ShipIt[55944]: Installation error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied" UserInfo=0x7fa1850c5350 {NSLocalizedDescription=Permission denied}
    23/10/14 12:21:17.227 pm ShipIt[55944]: ShipIt quitting
    23/10/14 12:21:17.230 pm com.apple.xpc.launchd[1]: (com.github.atom.ShipIt[55944]) Service exited with abnormal code: 1
    

    I'm going to reboot and see what happens..

  14. ioquatix commented on Oct 22, 2014

    @ioquatix

    Okay, so didn't have any problems this time (running 10.10 now which is different). But, also Atom hasn't updated either.

  15. 114 remaining items

  16. sww1235 commented on Apr 7, 2018

    @sww1235

    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

  17. njordhov commented on Apr 11, 2018

    @njordhov

    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.

  18. davidcelis commented on Apr 16, 2018

    @davidcelis

    It took clicking "Download and Reinstall Update" four or five times to finally go from 1.25.0 to 1.25.1 for me

  19. Apollon77 commented on Apr 16, 2018

    @Apollon77

    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

  20. bhutchinson commented on Apr 19, 2018

    @bhutchinson

    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.

  21. CodingItWrong commented on Apr 20, 2018

    @CodingItWrong

    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.

  22. davidcelis commented on Apr 20, 2018

    @davidcelis

    My Atom still thinks 1.25.1 is the latest version 🤷‍♂️

  23. bbgdzxng1 commented on May 21, 2018

    @bbgdzxng1

    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:

    1. Backup your computer.

    2. If you previously installed using the awesome Homebrew, remove:

    $ brew cask uninstall atom
    $ brew cask zap atom
    $ rm -r /usr/local/Caskroom/atom
    $ brew cask cleanup
    $ brew cleanup
    
    1. Uninstall Atom via AppCleaner

    2. Clean up any Atom and ShipIt folders if they still exist, which may have funky permissions...

    $ rm -r ~/Library/Caches/com.github.atom.ShipIt
    $ rm -r ~/Library/Caches/com.github.atom
    $ rm -r ~/Applications/Atom.app
    $ rm -r /Applications/Atom.app
    
    1. Empty Trash.

    2. Download Atom 1.25.1, although anything greater than 1.25.0 should work.

    3. Let auto-update do it's thing.

    I believe that the issue is now resolved (for me, at least). Thanks for the resolution.

  24. davidcelis commented on Jun 8, 2018

    @davidcelis

    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!

  25. Apollon77 commented on Jun 8, 2018

    @Apollon77

    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 :-)

  26. stale commented on Jun 27, 2019

    @stale

    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:

    1. Verify that you can still reproduce the issue in the latest version of Atom
    2. 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.

  27. lock commented on Jan 7, 2020

    @lock

    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!

  28. locked as resolved and limited conversation to collaborators on Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    atomauto-updaterbugelectronmacstale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions