-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
May 6th 2022: Latest Visual Studio Code Update fails #148953
Comments
Failed on Windows 10, too. I also tried installing Visual Studio Insiders, with the same result. I ended up downloading the full installer and reinstalling to get around it. |
Same problem on windows11. |
+1 I'm afraid - Fixed by removing the entire "C:\Users\$USER\AppData\Local\Programs\Microsoft VS Code" folder and re-installing. Same file permissions were missing too. |
I've had this issue too. Affecting my fleet of VS Code users. Added some discussion here for a similar issue: https://stackoverflow.com/a/72180048/168457. Had to grant users permissions to their AppData directory. |
@joaomoreno Let me know if you need an internal repro |
May be a clue. I just tried running the installer as admin, and it says this: That installer has a date of today, so it's the one that was being used. But... when I click ok, I then get this: Indicating that VSCode is "system-installed". Note that the user installer is being offered by VSCode itself, just after launching it. So it might be some indication that it doesn't know how to system-update itself? Not sure. Clicking ok again (after making sure VSCode itself, or its installer, is not running - sigh!) proceeded with the installation just fine. I don't remember installing it any differently before (to get it system-installed vs. user-installed), but my memory is slowly fading, so it could be :-). |
Our users sometimes have to run VS Code as admin on occasion for system-focused development. Perhaps it ran a self-update during that time which caused permissions to be lost and instead assigned to Admin group only? |
I've also started hitting this the other day. Just rebooted and still hit it. The end of the log has:
|
I was able to run the uninstaller and it seemed to wipe that directory clean as well. Installing from the latest download on the website for 1.67.1 worked after that. Will see when it tries to update next what happens. |
@ShadowXVII , I have never used VSCode with admin permissions before, but I'm hitting exactly the same error. |
Ah, there goes that theory then. Haven't found any other possible pattern between. |
Those files that vscode installer was complaining about have ACL set to read-only for non admin users. Perhaps the installer is not running elevated when trying to replace them (they are in localappdata, so theoretically it doesn't need to be). I ended up just running the MSI installer directly; that allows me to install the latest VSCode, but the app is now living under Program Files instead of %localappdata%. |
I'd been having this problem for days as well. Then after reading these comments and finding no answer, I went back into VS Code with no folder or workspace opened and noticed that it wanted me to make it a trusted workspace. Once I did that, I was able to get the update. I had ignored that trusted workspace before, I think it showed up after Gitlens, which I think is ok to be trusted, so went ahead and trusted it-hopefully ok there. Anyways, maybe this will help others, but use at your own caution. |
I also tried downloading the MSI. When starting, my installer though again tried to write into AppData, and again failed with a permissions problem, screenshot below. I ended up deleting the whole VSCode folder from AppData, and doing a new install :-( |
Same issue for me. My VSCode version: Version: 1.66.2 (user setup) I'm running windows 11. |
#147408 is related (or maybe this is a duplicate). |
Thanks @rainersigwald, that command worked for me when run from cmd.exe with admin permissions. Once complete, I then hit retry in the updater, and the updater completed successfully. EDIT: slight caveat is that |
Also having this with the below version. Started happening today (though I do not use VS code all too often). Never used VS Code as admin, as far as I can recall. Version: 1.67.1 (user setup) |
It seems that once you have performed an "update on close" while VScode was running elevated / as admin, you can no longer perform updates when non-elevated. Rather annoying if you ask me. |
Duplicate of #147408 |
i got the update to work by;
and it worked for me |
Thanks for that advice. Launching VSCode elevated to do the update worked for me also. Does that mean all future updates will also need to be running as admin? |
Visual Studio Code
There was an error while Opening file handle: "...\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-amd.js":
Failed to create file handle: Access is denied.
Please verify there are no Visual Studio Code processes still executing.
Retry Cancel
Latest Vs Code updater fails for me on Windows11. I can't see any handle open for this file elsewhere.
The text was updated successfully, but these errors were encountered: