Reputation: 4289
From certain point I started getting this error from time to time(I suppose it fires when editor tries to check for updates), and manual/auto update doesn't work. The only way I can update the editor is re-download the app and replace it manually.
Does someone face same issue and successfully resolved?
Upvotes: 41
Views: 14750
Reputation: 8673
I had a similar problem with update VSCode
after supplemental update and bug fixes for my macOS Catalina 10.15.6
on 12.08.2020. I solved the problem with the manual update VSCode
:
mv ~/Downloads/Visual\ Studio\ Code.app/ ~/Applications/
or move/copy Visual Studio Code.app
into Applications
folderVisual Studio Code.app
and enjoy the latest version.After that, the application should
auto update
the new version without any problems !
Upvotes: 0
Reputation: 884
Try to type the following commands in a terminal:
cd ~/Library/Caches
sudo chown -R $(whoami):staff *
Upvotes: 76
Reputation: 6926
In my case, ~/Library/Caches/com.microsoft.VSCode.ShipIt
was owned by root:staff
all of a sudden. I fixed it by running the following command:
sudo chown -R $USER:'staff' ~/Library/Caches/com.microsoft.VSCode.ShipIt
(added single quotes around the group name because ZSH didn't like it)
Upvotes: 10
Reputation: 2201
I use the following script to manually download/install the new version (e.g. under /opt/
). The old dir is backed-up. Also in case of network failure I can rerun the script to resume.
vscode-update
#!/bin/bash
set -e
cd /opt/
datetime=$(date +"%Y-%m-%d_%H%m%S")
dateonly=$(date +"%Y-%m-%d")
downloadedfile="vscode_download_$dateonly.tar.gz"
backupfile="VSCode-linux-x64_backup_$datetime"
url=https://update.code.visualstudio.com/latest/linux-x64/stable
echo "Downloading $url --> $(pwd)/$downloadedfile"
wget --continue -O "$downloadedfile" $url
echo "backing up old vscode under: $backupfile"
mv VSCode-linux-x64/ "$backupfile"
echo "extracting: $downloadedfile"
tar xvzf "$downloadedfile"
echo "UPDATE DONE!"
Upvotes: 0
Reputation: 866
The above solution works, but it is like using a sledge hammer to kill a house fly.
cd ~/Library/Caches
.ls -la
drwxr--r-- 2 root staff 64 Nov 15 09:37 com.microsoft.VSCode.ShipIt
sudo chown <username>:staff com.microsoft.VSCode.ShipIt
This allows you to only update that folder owner and won't touch the other folders. You can break over item unexpectedly.
Upvotes: 80