Skip to content
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

Update failing #60071

Closed
OverLordGoldDragon opened this issue Oct 6, 2018 · 13 comments
Closed

Update failing #60071

OverLordGoldDragon opened this issue Oct 6, 2018 · 13 comments
Assignees
Labels
info-needed Issue requires more information from poster install-update VS Code installation and upgrade system issues

Comments

@OverLordGoldDragon
Copy link

OverLordGoldDragon commented Oct 6, 2018

When opening a file, VS Code attempts to update, displays the following error: https://puu.sh/BGGZl/282f97f70d.png OS info: https://puu.sh/BGH3L/3e22323f78.png

The issue's persisted for ~2 weeks now. Folder filepath added to antivirus exceptions, no avail. The program otherwise works fine, with no detected problems. Error log attached.

vscode-inno-updater-1538847353.log

@vscodebot vscodebot bot added the install-update VS Code installation and upgrade system issues label Oct 6, 2018
@totkeks
Copy link

totkeks commented Oct 8, 2018

I got the exact same issue. Same error messages, same log file, except the user name in the profile folder.

Task manager shows no running code.exe tasks, but when uninstalling / trying to delete the "AppData\Local\Programs\Microsoft VS Code" folder, even the explorer complains that it can't delete the folder, because code.exe and inno_updater.exe are still in use. Weird thing is, the task manager does not show it running. Neither for my user, nor for any other user or the system itself.
I even just checked with sysinternals' process explorer. No handle for code.exe or inno_updater.exe

@joaomoreno
Copy link
Member

@OverLordGoldDragon @totkeks Did you get a Retry/Cancel message box before getting that error?

@joaomoreno joaomoreno added the info-needed Issue requires more information from poster label Oct 9, 2018
@OverLordGoldDragon
Copy link
Author

OverLordGoldDragon commented Oct 10, 2018

@joaomoreno I didn't; it occurs after closing VSCode - where it attempts to update with the progress bar stuck empty at 0%, then closes in 1-2 mins and displays the error. When I attempt to manually update with VSCode open, I get a window with 'Retry', 'Abort', and 'Ignore' options. Furthermore, I also observe exactly what @totkets described.

@totkeks
Copy link

totkeks commented Oct 10, 2018

@joaomoreno Okay, I just started from scratch with a 1.27.2 UserSetup-x64. I completely removed the AppData\Local\Programs\Microsoft VS Code folder, which was still containing code.exe and inno_updater.exe after uninstalling.

Next I start code, my last project loads and the cog in the bottom left shows the clock icon. I wait until it switches to a "1". Next I click "Restart to Update...".
The "Updating VS Code..." mini windows appears and code is closed.

After roughly a minute this window appears:
image
The text says roughly translated "process can't access the file, because it is used by another process"
"Wiederholen" is German for retry. And "Abbrechen" is German for cancel. I select retry.

After roughly another minute the same window appears again. I select retry again.

After roughly another minute the window appears again. I select cancel this time. Now this window appears:
image

I select ok, the window disappears as well as the little "Updating VS Code..." window.
Code is automatically started again, still running the old 1.27.2 version.

Additionally this window pops up after roughly another minute:
image
Rough translation: "Error occured when replacing an existing file: DeleteFile failed; Code 32.
The process can't access the file, because it is used by another file.
Press retry for another try, ignore to skip this file (not recommended) or cancel to abort the installation".
I select retry.

After a couple of seconds the windows pops up again. I select cancel.

No more windows / errors appear. Code also didn't check for the update again (no clock on the bottom left cog).

First I wanted to ask if I can help debug this somehow, because I got visual studio on my PC, but then I saw that the updater is written in Rust, which I never used yet. With C++ or C# it would be easier for me. But maybe I can still help.

@wazzamatazz
Copy link

I have seen this exact same behaviour (file is still in use) since switching to the user installer, whenever Code tries to update itself. If I download the standalone installer and run it after an automatic update fails, I see the same issue. I can update using the standalone installer after a reboot.

@totkeks
Copy link

totkeks commented Oct 12, 2018

I have seen this exact same behaviour (file is still in use) since switching to the user installer, whenever Code tries to update itself. If I download the standalone installer and run it after an automatic update fails, I see the same issue. I can update using the standalone installer after a reboot.

Yes, that's because something locks the code.exe file and never releases it. A reboot does this.

@wazzamatazz
Copy link

Sorry, missed your reply until now, but I saw the same behaviour again when updating to version 1.28.1. When I got the "The process cannot access the file..." message I went to the Code install folder and tried renaming Code.exe, just to see what would happen. I got a message saying that it was locked by System:

image

Searching for handles on Code.exe in Process Explorer returns zero results.

@theyo
Copy link

theyo commented Oct 23, 2018

Same error here as well. This has happened to me when updating twice in a row now.

My current version information:
Version: 1.28.1 (user setup)
Commit: 3368db6
Date: 2018-10-11T18:13:53.910Z
Electron: 2.0.9
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

With the updater is running, I did a search in Process Explorer for Code.exe and it shows that there is an open handle from the System process and I am unable to kill it (Access Denied).

image

Rebooting does not resolve the issue.

@arpadbarta
Copy link

Yoppe, same here, please guys look into it it has been months now... The only solution that I found is that change the install directory on fresh install, but I should not be doing a reinstall for every update....
image

@mlafleur
Copy link

Has there been any progress on this? I'm facing the same issue today.

@joaomoreno
Copy link
Member

There are two main issues surrounding this:

Both can be worked around by disabling background updates: update.enableWindowsBackgroundUpdates: false

@totkeks
Copy link

totkeks commented Jan 17, 2019

I might add that the workaround requires a restart of the PC if code.exe is still locked by the hidden process.

@joaomoreno I completely reinstalled my windows 10 (for some other reason) and all was fine for one or two updates. but now the error on update is back. Is there any way I could help debugging this?

@joaomoreno
Copy link
Member

@totkeks Any chance you remember what you have installed between the two phases (working vs. not working)?

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster install-update VS Code installation and upgrade system issues
Projects
None yet
Development

No branches or pull requests

7 participants