Skip to content

Code won't update on macOS #7426

Closed
Closed

Description

  • VSCode Version: Version 1.3.0-insider (1.3.0-insider) 6bc81df
  • OS Version: OS X 10.11.5

Steps to Reproduce:

  1. A message pops up saying there's a new version and Insiders will be updated after it restarts.
  2. Click 'Update Now'. Code closes but doesn't reopen even after waiting a very long time.
  3. After manually reopening it it's still on the previous version

This has been happening for the last few weeks so it isn't a recent development, but with the daily builds now it's a little more annoying. Downloading the most recent version from the website and replacing it works fine. The stable build of Code I have installed does the automatic update fine. I have both builds installed in my Applications folder.

Activity

  1. added
    info-needed
    on Jun 9, 2016
  2. joaomoreno commented on Jun 9, 2016

    @joaomoreno
    Contributor

    Does it always happen? In other words, was an Insider update never successful for you?

  3. scottste commented on Jun 9, 2016

    @scottste
    Author

    João Moreno (@joaomoreno) As far as I can remember it's always happened with the insiders build and has never been successful.

  4. joaomoreno commented on Jun 9, 2016

    @joaomoreno
    Contributor

    Have you ever opened Code with sudo?

  5. scottste commented on Jun 9, 2016

    @scottste
    Author

    Not that I remember. Is there a way I can check to see if I did and fix it?

  6. joaomoreno commented on Jun 10, 2016

    @joaomoreno
    Contributor

    Basically, you can check the permissions of ~/.vscode-insiders and ~/Library/Application Support/Code - Insiders.

  7. scottste commented on Jun 10, 2016

    @scottste
    Author

    ~/.vscode-insiders - drwxr-xr-x 7 myusername
    ~/Library/Application Support/Code - Insiders - drwx------ 10 myusername

    I tried removing both of those folders and reinstalling an insiders build from a couple of days ago and it still won't update.

  8. added
    bug
    and removed
    info-needed
    on Jun 10, 2016
  9. 138 remaining items

  10. perlun commented on May 2, 2017

    @perlun

    João Moreno (@joaomoreno) before trying to apply the update, here are my Code processes:

    $ ps -fe | grep Code
        0   461     1   0 Tue02PM ??         0:01.64 /System/Library/Frameworks/Security.framework/Versions/A/XPCServices/com.apple.CodeSigningHelper.xpc/Contents/MacOS/com.apple.CodeSigningHelper
      501 41234     1   0  9:17AM ??         3:25.84 /Applications/Visual Studio Code.app/Contents/MacOS/Electron
      501 41235 41234   0  9:17AM ??         0:00.75 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper --type=gpu-process --channel=41234.0.1121821213 --mojo-application-channel-token=A0E7712AA25C3FD859EEC5667A36CA23 --no-sandbox --supports-dual-gpus=true --gpu-driver-bug-workarounds=18,20,40,51,52,56,58,66,67,71,73,75 --gpu-vendor-id=0x1002 --gpu-device-id=0x6821 --gpu-driver-vendor --gpu-driver-version --gpu-driver-date --gpu-secondary-vendor-ids=0x8086 --gpu-secondary-device-ids=0x0d26 --gpu-active-vendor-id=0x1002 --gpu-active-device-id=0x6821
      501 41236 41234   0  9:17AM ??         0:00.83 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap --type=SharedProcess
      501 41239 41234   0  9:17AM ??         0:08.03 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper --type=renderer --no-sandbox --primordial-pipe-token=425C308A4380EB11330BD7956BB948DE --lang=en-GB --node-integration=true --background-color=#171717 --enable-pinch --num-raster-threads=4 --enable-zero-copy --disable-partial-raster --enable-gpu-memory-buffer-compositor-resources --content-image-texture-target=3553,3553,3553,3553,3553,34037,3553,3553,3553,3553,3553,34037,3553,34037,34037 --video-image-texture-target=3553,3553,3553,3553,3553,34037,3553,3553,3553,3553,3553,34037,3553,34037,34037 --mojo-channel-token=98DCE7B7DFDA1C33F82F5BFB05E5762C --mojo-application-channel-token=425C308A4380EB11330BD7956BB948DE --channel=41234.1.1318110059
      501 41789     1   0  9:17AM ??         0:00.01 /Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Resources/crashpad_handler --database=/var/folders/2p/f5tb9h_j15ngqjdpdkmwrd_00000gn/T/VSCode Crashes --url=https://ticinocrashreporter.azurewebsites.net/crash --handshake-fd=59
      501 41790 41239   0  9:17AM ??         0:02.37 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap --type=extensionHost
      501 41791 41239   0  9:17AM ??         0:20.11 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap --type=watcherService
      501 41794 41239   0  9:17AM ??         0:00.43 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap /usr/local/bin/git /Volumes/extra/git/ecraft/ecraft-fieldops utf8 /Applications/Visual Studio Code.app/Contents/MacOS/Electron 2.10.0
      501 41824 41790   0  9:17AM ??         0:00.41 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json/node_modules/vscode-languageclient/lib/utils/electronForkStart /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json/server/out/jsonServerMain.js --node-ipc
      501 41826 41790   0  9:17AM ??         0:02.34 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper /Users/plundberg/.vscode/extensions/streetsidesoftware.code-spell-checker-1.0.2/node_modules/vscode-languageclient/lib/utils/electronForkStart /Users/plundberg/.vscode/extensions/streetsidesoftware.code-spell-checker-1.0.2/server/src/server.js --node-ipc

    The fix does unfortunately not help. I have rebooted, I have run:

    $ sudo chown $USER ~/Library/Caches/com.microsoft.VSCode.ShipIt/*
    $ sudo xattr -dr com.apple.quarantine /Applications/Visual\ Studio\ Code.app

    Unfortunately, no can do - still get the errors in system.log saying the update failed:

    May  2 09:27:47 ecvaawplun5 com.apple.xpc.launchd[1] (com.microsoft.VSCode.ShipIt): Service only ran for 0 seconds. Pushing respawn out by 2 seconds.
    May  2 09:27:49 ecvaawplun5 ShipIt[43736]: Resuming installation attempt 3
    May  2 09:27:49 ecvaawplun5 ShipIt[43736]: Installation error: Error Domain=SQRLInstallerErrorDomain Code=-1 "Failed to copy bundle file:///var/root/Library/Caches/com.microsoft.VSCode.ShipIt/update.0sNg83X/Visual%20Studio%20Code.app/ to directory file:///var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/com.microsoft.VSCode.ShipIt.qdjtdoLO/Visual%20Studio%20Code.app" UserInfo={NSFilePath=/var/root/Library/Caches/com.microsoft.VSCode.ShipIt/update.0sNg83X/Visual Studio Code.app, NSLocalizedDescription=Failed to copy bundle file:///var/root/Library/Caches/com.microsoft.VSCode.ShipIt/update.0sNg83X/Visual%20Studio%20Code.app/ to directory file:///var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/com.microsoft.VSCode.ShipIt.qdjtdoLO/Visual%20Studio%20Code.app, NSUnderlyingError=0x7ff83ad29110 {Error Domain=NSCocoaErrorDomain Code=260 "The file “Visual Studio Code.app” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/var/root/Library/Caches/com.microsoft.VSCode.ShipIt/update.0sNg83X/Visual Studio Code.app, NSUnderlyingError=0x7ff83ad21770 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}}}
    May  2 09:27:49 ecvaawplun5 com.apple.xpc.launchd[1] (com.microsoft.VSCode.ShipIt[43736]): Service exited with abnormal code: 1
    May  2 09:27:49 ecvaawplun5 com.apple.xpc.launchd[1] (com.microsoft.VSCode.ShipIt): Service only ran for 0 seconds. Pushing respawn out by 2 seconds.
    May  2 09:27:51 ecvaawplun5 ShipIt[43739]: Too many attempts to install, aborting update
    May  2 09:27:51 ecvaawplun5 ShipIt[43739]: Application launched at file:///Applications/Visual%20Studio%20Code.app
    

    I did a manual uninstall now, but I wouldn't be sure that it will work the next time an update is rolled out.

    (Sorry if I sound negative. I love VSCode and the work you're doing, and I also promote it to colleagues etc. It's just a bit annoying when this happens and the suggested workaround still doesn't help.)

  11. UncleVic commented on May 5, 2017

    @UncleVic

    I've again got message
    "Could not create temporary directory: Permission denied."

    I did chow and xattr before. But it was showed again.

    Version 1.11.2
    masOS Sierra


    I downloaded version 1.12 and replace it old version. Error message hasen't displayed.

  12. Roscoechen commented on May 7, 2017

    @Roscoechen

    It works for me, too!

  13. jagloro commented on May 11, 2017

    @jagloro

    $ sudo chown $USER ~/Library/Caches/com.microsoft.VSCode.ShipIt/*

    Tried various things in this Issue. This is the one that worked for me.

    (I've never had this much difficulty updating software. I hope this is fixed in the future)

  14. rikkert commented on May 12, 2017

    @rikkert

    Thanks Julian A (@jagloro) it is definitely related to that dir, also for vscode insiders.
    After:
    sudo chown $USER ~/Library/Caches/com.microsoft.VSCodeInsiders.ShipIt/*
    vscode update complained that my copy was corrupted and advised to reinstall.
    Instead I did a:
    rm -rf ~/Library/Caches/com.microsoft.VSCodeInsiders.ShipIt
    And that did the trick for me.

  15. perlun commented on May 12, 2017

    @perlun

    This is the fix suggested by João Moreno (@joaomoreno) which has been working for most of us, most of the time.

    Joao - please lock the discussion now, so we don't bury it further. Other similar installation/update problems can be reported in other issues, to keep the threads more separate.

  16. locked and limited conversation to collaborators on May 15, 2017
  17. joaomoreno commented on Sep 27, 2018

    @joaomoreno
    Contributor

    This is due to a well known Squirrel issue: Squirrel/Squirrel.Mac#182

    Workaround: Move Code out of Downloads and into the Applications folder.

    Workaround 2: If updates still don't work after moving Code to the Applications folder, you can fix it with xattr:

    sudo chown $USER ~/Library/Caches/com.microsoft.VSCode.ShipIt/*
    xattr -dr com.apple.quarantine /Applications/Visual\ Studio\ Code.app
    

    Closing this issue since the fix for #57664 allows us to inform users of this situation, instead of failing silently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

buginstall-updatemacosupstream

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions