-
Notifications
You must be signed in to change notification settings - Fork 30.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to Update VS Code #147408
Comments
...aaaand now my install is corrupt, great: Error text if it helps:
|
I got the same error message after trying to upgrade via winget |
Ditto here, but here the reported file is unins000.exe instead of chrome_100_percent.pak. |
Here, the reported file is |
same issue here. started happening since yesterday. |
Same issue, if i skip file it just keeps going through every single file. |
Seems the permissions were borked on my install. I was able to fix it by changing the permissions. If you have administrator access with your user then you should be able to fix it with these steps: Step 1) Open CMD.EXE as administrator (with your user) Step 2) Run: Step 3) Run: If you don't have administrator then the easiest way to fix would be to have someone with administrator change the owner of folder, subfolder and files in %LOCALAPPDATA%\Programs\Microsoft VS Code, using Windows Explorer's Properties > Security > Advanced. |
Thanks, Erijoda. This also fixed it for me. :-) Step 3 for people with non-English Windows: icacls "%LOCALAPPDATA%\Programs\Microsoft VS Code" /inheritance:r /remove "NT SERVICE\TrustedInstaller" /grant:r "%USERDOMAIN%%USERNAME%":(F) /grant:r "*S-1-3-0":(OI)(CI)(IO)(F) /grant:r "*S-1-5-32-545":(OI)(CI)(RX) /grant:r "*S-1-5-11":(OI)(CI)(RX) /grant:r "*S-1-5-32-544":(OI)(CI)(F) /grant:r "*S-1-5-18":(OI)(CI)(F) |
Thank you @Erijoda it fixed it for me too. 🎉 I was able to run the installer after your steps and my VSCode boots up like normal again. 😅 |
@Erijoda What is the actual permissions difference between what VS Code set and what you set in that command? This is what VS Code is using today: Lines 1494 to 1501 in c20b68a
|
I just ran into this myself.
❯ icacls "C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\bootstrap-amd.js"
C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\bootstrap-amd.js BUILTIN\Administrators:(I)(F)
BUILTIN\Users:(I)(RX)
NT AUTHORITY\Authenticated Users:(I)(RX)
NT AUTHORITY\SYSTEM:(I)(F)
Successfully processed 1 files; Failed processing 0 files
❯ icacls "C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code"
C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code NTDEV\raines:(F)
CREATOR OWNER:(OI)(CI)(IO)(F)
BUILTIN\Users:(OI)(CI)(RX)
NT AUTHORITY\Authenticated Users:(OI)(CI)(RX)
BUILTIN\Administrators:(OI)(CI)(F)
NT AUTHORITY\SYSTEM:(OI)(CI)(F)
Successfully processed 1 files; Failed processing 0 files
❯ icacls "C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\resources"
C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\resources NTDEV\raines:(I)(F)
CREATOR OWNER:(I)(OI)(CI)(IO)(F)
BUILTIN\Users:(I)(OI)(CI)(RX)
NT AUTHORITY\Authenticated Users:(I)(OI)(CI)(RX)
BUILTIN\Administrators:(I)(OI)(CI)(F)
NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)
Successfully processed 1 files; Failed processing 0 files
❯ icacls "C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\resources\app"
C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\resources\app NTDEV\raines:(I)(F)
CREATOR OWNER:(I)(OI)(CI)(IO)(F)
BUILTIN\Users:(I)(OI)(CI)(RX)
NT AUTHORITY\Authenticated Users:(I)(OI)(CI)(RX)
BUILTIN\Administrators:(I)(OI)(CI)(F)
NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)
Successfully processed 1 files; Failed processing 0 files
❯ icacls "C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\resources\app\out"
C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\resources\app\out BUILTIN\Administrators:(I)(F)
CREATOR OWNER:(I)(OI)(CI)(IO)(F)
BUILTIN\Users:(I)(OI)(CI)(RX)
NT AUTHORITY\Authenticated Users:(I)(OI)(CI)(RX)
BUILTIN\Administrators:(I)(OI)(CI)(IO)(F)
NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)
Successfully processed 1 files; Failed processing 0 files
❯ icacls "C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\*"
C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\bootstrap-amd.js BUILTIN\Administrators:(I)(F)
BUILTIN\Users:(I)(RX)
NT AUTHORITY\Authenticated Users:(I)(RX)
NT AUTHORITY\SYSTEM:(I)(F)
C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\bootstrap-fork.js BUILTIN\Administrators:(I)(F)
BUILTIN\Users:(I)(RX)
NT AUTHORITY\Authenticated Users:(I)(RX)
NT AUTHORITY\SYSTEM:(I)(F)
C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\bootstrap-node.js BUILTIN\Administrators:(I)(F)
BUILTIN\Users:(I)(RX)
NT AUTHORITY\Authenticated Users:(I)(RX)
NT AUTHORITY\SYSTEM:(I)(F)
C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\bootstrap-window.js BUILTIN\Administrators:(I)(F)
BUILTIN\Users:(I)(RX)
NT AUTHORITY\Authenticated Users:(I)(RX)
NT AUTHORITY\SYSTEM:(I)(F)
C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\bootstrap.js BUILTIN\Administrators:(I)(F)
BUILTIN\Users:(I)(RX)
NT AUTHORITY\Authenticated Users:(I)(RX)
NT AUTHORITY\SYSTEM:(I)(F)
C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\cli.js BUILTIN\Administrators:(I)(F)
BUILTIN\Users:(I)(RX)
NT AUTHORITY\Authenticated Users:(I)(RX)
NT AUTHORITY\SYSTEM:(I)(F)
C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\main.js BUILTIN\Administrators:(I)(F)
BUILTIN\Users:(I)(RX)
NT AUTHORITY\Authenticated Users:(I)(RX)
NT AUTHORITY\SYSTEM:(I)(F)
C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\nls.metadata.json BUILTIN\Administrators:(I)(F)
BUILTIN\Users:(I)(RX)
NT AUTHORITY\Authenticated Users:(I)(RX)
NT AUTHORITY\SYSTEM:(I)(F)
C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\vs BUILTIN\Administrators:(I)(F)
CREATOR OWNER:(I)(OI)(CI)(IO)(F)
BUILTIN\Users:(I)(OI)(CI)(RX)
NT AUTHORITY\Authenticated Users:(I)(OI)(CI)(RX)
BUILTIN\Administrators:(I)(OI)(CI)(IO)(F)
NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)
C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\vscode-dts BUILTIN\Administrators:(I)(F)
CREATOR OWNER:(I)(OI)(CI)(IO)(F)
BUILTIN\Users:(I)(OI)(CI)(RX)
NT AUTHORITY\Authenticated Users:(I)(OI)(CI)(RX)
BUILTIN\Administrators:(I)(OI)(CI)(IO)(F)
NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)
Successfully processed 10 files; Failed processing 0 files I applied Full control to my user ( ❯ icacls "C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\*" /grant NTDEV\raines:F
processed file: C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\bootstrap-amd.js
processed file: C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\bootstrap-fork.js
processed file: C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\bootstrap-node.js
processed file: C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\bootstrap-window.js
processed file: C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\bootstrap.js
processed file: C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\cli.js
processed file: C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\main.js
processed file: C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\nls.metadata.json
processed file: C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\vs
processed file: C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\vscode-dts
Successfully processed 10 files; Failed processing 0 files and got to the new error
A ❯ icacls "C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\extensions\\bat\\language-configuration.json" /reset
processed file: C:\\Users\\raines\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\extensions\\bat\\language-configuration.json
Successfully processed 1 files; Failed processing 0 files So I did |
Thanks @Erijoda! This fixed it for me as well 😃 |
will try this next time I face the issue |
confirmed that running this from an admin cmd prompt fixed the issue |
This worked for me! Thank you @Erijoda ! |
So is there a workaround? MSFTee here and blocked by the same issue. |
Running |
Something like that worked once for me, but with the next update the problem occurred again. It's a workaround. Something is changing the ACLs, and seems to be happening only for VSCode. Other user-installed programs haven't exhibited this problem. |
I just installed another successful update (1.69.0) without any workarounds (not even running it as admin). I think the issue may have been fixed in one of the most recent versions of VS Code. |
Normally i manage everything through winget running as admin. I hit similar perms issues today moving from 1.68.1 to 1.69.0 with the error coming up as Access denied failed to write file to Eventually i ended up:
Note: Something really weird. Even after i had uninstalled it and removed all the folders. For some reason VScode was still running active processes. I had to go into task manager and manually end them, before it would let me reinstall. |
This worked for me, but:
|
It doesn't work.
That one doesn't work as well. It should be Are there ANY palns to make VS Code updates work again? Is this the intended workflow? Download default installer, choose Program Files, it installs the app, it fails to update, go to github, copy some commands, repeat every time you need to update. Is VS Code still in alpha, by any chance? |
Hi all, sorry for the delay here. I got something for you. The problem, as some people pointed out, is related to the permissions left behind once the Setup finishes installing VS Code. Namely, the Broken: By setting the correct permissions for the current user, we should be able to create a good model upfront. I've created a build with that fix and ran extensive testing including with usernames with spaces and/or non-ASCII characters. Fixed: If you currently hit this issue, I'd appreciate it if you could download the following Insiders build, install it and show me your Advanced Security Settings dialog, so I can confirm things work fine in your setup? |
@joaomoreno I presume the fix modifies existing installations on the next update, and doesn't only apply to fresh / new installations? |
@sba923 Correct, though it's possible that it might not be able to fix permissions on existing broken installations, given that's a chicken/egg problem. If you're hitting this issue, I'd suggest simply reinstalling on top of your installation (no need to uninstall first). |
For you Microsofties that wanna debug this, or idk, have a soccer match between VS and Windows teams in the studios or something... Here's a list of the files that say "nope!" to permission updates if you're not in command line. inno_updater.exe Failed to enumerate objects in container. Access is denied. EDIT: While I am unable to change permissions and am in correct directory, I had to modify the path variable used for another drive to successfully process the right directory. for the command(s) above due to installing on D: drive All of them say "access is denied" and error applying permissions. These are just quick notes I jotted during the four errors. Surprised they weren't mentioned above. They were skipped by the admin cmd line (I'm admin but not the super/sys admin you have to unlock on every device). I'm guessing if I login with the windows admin account itself, it will work... but.... who wants to have to go through that process every time. Not many normal users are aware that user admins aren't real admins. I'm not connected to any domains |
Well, after all said and done... I ended up deleting the folder \AppData\Local\Programs\Microsoft VS Code\ and then i downloaded the latest version on vs code and install it... Everything works fine and i still get to keep my previous settings and extensions... |
Issue Type: Bug
When checking for updates, receive prompt saying the following:
"C:\Users\myusername\AppData\Local\Programs\Microsoft VS Code_\chrome_100_percent.pak
An error occurred while trying to create a file in the destination directory: Access is denied"
Available options are:
First two options immediately bring prompt the error again, cancel installation suppresses it until auto-update re-attempts the installation.
Error occurs when running as administrator as well.
VS Code version: Code 1.66.1 (8dfae7a, 2022-04-06T14:50:12.141Z)
OS version: Windows_NT x64 10.0.19043
Restricted Mode: No
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Extensions (1)
A/B Experiments
The text was updated successfully, but these errors were encountered: