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

VS Code was lost on shutdown with pending update #52855

Open
Tracked by #189320
manglobe opened this issue Jun 26, 2018 · 228 comments
Open
Tracked by #189320

VS Code was lost on shutdown with pending update #52855

manglobe opened this issue Jun 26, 2018 · 228 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug install-update VS Code installation and upgrade system issues windows VS Code on Windows issues
Milestone

Comments

@manglobe
Copy link

It was the second time ,it happend.
I download VScode's update patch when I was coding , and then shut down the computer and forgot to update it.
Next day I turn the computer on and can't find VScode anywhere , all the file was empty.

  • OS Version : Windows 10 Home
@vscodebot vscodebot bot added the install-update VS Code installation and upgrade system issues label Jun 26, 2018
@joaomoreno
Copy link
Member

@manglobe What are your machine specs? Is your system managed by a company/administrator?

@joaomoreno joaomoreno added the info-needed Issue requires more information from poster label Jun 26, 2018
@manglobe
Copy link
Author

@joaomoreno

操作系统名称	Microsoft Windows 10 家庭中文版
版本	10.0.16299 版本 16299
其他操作系统描述 	没有资料
操作系统制造商	Microsoft Corporation
系统名称	DESKTOP-O5EPRK9
系统制造商	Dell Inc.
系统型号	OptiPlex 5050
系统类型	基于 x64 的电脑
系统 SKU	07A2
处理器	Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz,3408 Mhz,4 个内核,4 个逻辑处理器
BIOS 版本/日期	Dell Inc. 1.6.5, 2017/9/9
SMBIOS 版本	3.0
嵌入式控制器版本	255.255
BIOS 模式	UEFI
BaseBoard 制造商	Dell Inc.
BaseBoard 型号	没有资料
BaseBoard 名称	基板
平台角色	台式机
安全启动状态	启用
PCR7 配置	需要提升才能查看
Windows 目录	C:\Windows
系统目录	C:\Windows\system32
启动设备	\Device\HarddiskVolume1
区域设置	中国
硬件抽象层	版本 = "10.0.16299.371"
用户名	DESKTOP-O5EPRK9\work
时区	中国标准时间
已安装的物理内存(RAM)	8.00 GB
总的物理内存	7.87 GB
可用物理内存	3.73 GB
总的虚拟内存	12.5 GB
可用虚拟内存	5.33 GB
页面文件空间	4.63 GB

My system managed by myself

@joaomoreno joaomoreno added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Jun 26, 2018
@joaomoreno joaomoreno added this to the July 2018 milestone Jun 26, 2018
@joaomoreno joaomoreno added the windows VS Code on Windows issues label Jun 26, 2018
@joaomoreno
Copy link
Member

Let's try to detect if the system is about to be shutdown, we don't do anything.

@gmariani
Copy link

Sounds like you told it to install the patch "Later". So after the reboot it messed up patching. I've had this happen to me about 2-3 times now. Except I tell it to update immediately, it gets halfway and then fails.
Attached log as requested by the error message

vscode-inno-updater.log


VS Code

Failed to install VS Code update. Please download and reinstall VS Code.

Please attach the following log file to a new issue on GitHub:

C:\Users\USERNAME\AppData\Local\Temp\vscode-inno-updater.log

OK


Setup

Unable to execute file:

C:\Program Files\Microsoft VS Code\Code.exe

CreateProcess failed; code 2.

The system cannot find the file specified.

OK

@joaomoreno
Copy link
Member

@gmariani You seem to have #47841.

Please read this comment if you can provide more detail: #47841 (comment)

Please read this one to disable background updates: #47841 (comment)

Also read this one to provide feedback on our new user setup: #47841 (comment)

@manglobe
Copy link
Author

@joaomoreno
vscode-inno-updater.log
That's the updater log.
There was no Error, only Delete.

@joaomoreno joaomoreno modified the milestones: July 2018, August 2018, Backlog Aug 2, 2018
@michelkaporin
Copy link
Contributor

Hey @joaomoreno, I've also faced the problem when VS Code decided to update on Windows shutdown, which resulted in the next boot having no VS Code installed on the system. Had to download and install it again 😢

@joaomoreno joaomoreno changed the title VScode was lost ,after upgrade VS Code was lost on shutdown with pending update Feb 18, 2019
@EvanCrane
Copy link

EvanCrane commented Jun 6, 2019

I just had this issue also. Visual Studio wanted to update on Windows shutting down. Now there is no VS Code installed on the computer.
Here's my system specs.

OS Name	Microsoft Windows 10 Pro
Version	10.0.17134 Build 17134
System Manufacturer	Dell Inc.
System Model	Inspiron 15-7579
Processor	Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz, 2701 Mhz, 2 Core(s), 4 Logical Processor(s)
BIOS Version/Date	Dell Inc. 1.27.0, 1/18/2019
SMBIOS Version	3.0
Embedded Controller Version	255.255
BIOS Mode	UEFI
BaseBoard Manufacturer	Dell Inc.
BaseBoard Model	Not Available
BaseBoard Name	Base Board
Platform Role	Mobile
Secure Boot State	Off
Windows Directory	C:\WINDOWS
System Directory	C:\WINDOWS\system32
Boot Device	\Device\HarddiskVolume1
Locale	United States
Hardware Abstraction Layer	Version = "10.0.17134.765"
Time Zone	Eastern Daylight Time
Installed Physical Memory (RAM)	8.00 GB
Total Physical Memory	7.87 GB
Available Physical Memory	2.86 GB
Total Virtual Memory	16.9 GB
Available Virtual Memory	7.79 GB
Page File Space	8.99 GB

Edit: After reinstalling VS Code to same directory all my extensions are working and code I was working on last loaded right where I left off thankfully... 😅

@Lukortech
Copy link

Happened to me today.
Logging in after 'Shutdown anyway' and there's no code editor.

@dudewad
Copy link

dudewad commented Aug 15, 2019

Happened to me as well. My issue was that I needed to restart VS because I was (I think) having Typescript issues. I closed it, and restarted it (apparently too fast because the old process was still running) and boom, it was gone (no machine restart).

@NOMADE55
Copy link

Happened to me today.
Logging in after 'Shutdown anyway' and there's no code editor.

Same thing happend to me.

@anders-lundgren
Copy link

Same here,

I received a warning on exit that it was unable to update due to some locked file. Tried the "try again" button twice and then pressed "Cancel". After that, no VS Code on my computer anymore.

@fredheidrich
Copy link

fredheidrich commented Aug 21, 2019

Similar issue yesterday. Vscode wanted to update an automatic update, computer slowed down to a halt for a second, update failed and rebooted explorer.exe. Now vscode is no longer on my system.

vscode-inno-updater-1566340881.log

Aug 21 08:41:21.270 INFO Starting: C:\Users\Fred\AppData\Local\Programs\Microsoft VS Code\Code.exe, true
Aug 21 08:41:21.274 INFO Checking for running Code.exe processes... (attempt 1)
Aug 21 08:41:21.275 INFO Code.exe is running, wait a bit
Aug 21 08:41:21.776 INFO Checking for running Code.exe processes... (attempt 2)
Aug 21 08:41:21.779 INFO Code.exe is running, wait a bit
Aug 21 08:41:22.280 INFO Checking for running Code.exe processes... (attempt 3)
Aug 21 08:41:22.283 INFO Code.exe is running, wait a bit
Aug 21 08:41:22.784 INFO Checking for running Code.exe processes... (attempt 4)
Aug 21 08:41:22.787 INFO Code.exe is not running
Aug 21 08:41:22.787 INFO Checking for possible conflicting running processes... (attempt 1)
Aug 21 08:41:22.790 INFO Inno Updater v0.8.0
Aug 21 08:41:22.790 INFO Starting update, silent = true
Aug 21 08:41:22.815 INFO do_update: "C:\\Users\\Fred\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe", _
Aug 21 08:41:22.815 INFO move_update: "C:\\Users\\Fred\\AppData\\Local\\Programs\\Microsoft VS Code\\unins000.dat", _
Aug 21 08:41:22.815 INFO Reading directory: "C:\\Users\\Fred\\AppData\\Local\\Programs\\Microsoft VS Code"

...

Aug 21 08:41:23.379 INFO Get file handle: "C:\\Users\\Fred\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\extensions\\ms-vscode.node-debug2\\node_modules\\vscode-chrome-debug-core\\i18n\\rus\\out\\src\\transformers\\remotePathTransformer.i18n.json" (attempt 1)
Aug 21 08:41:23.379 INFO Collected all directories and file handles
Aug 21 08:41:23.390 INFO All file handles marked for deletion
Aug 21 08:41:23.533 INFO All files deleted
Aug 21 08:41:23.533 INFO Delete directory recursively: "C:\\Users\\Fred\\AppData\\Local\\Programs\\Microsoft VS Code\\bin" (attempt 1)

Then it ends there

@GeethProductions
Copy link

This also happened to me today

@pasq-cat
Copy link

pasq-cat commented Nov 1, 2024

happened to me as well

@Zasbe
Copy link

Zasbe commented Nov 2, 2024

+1

2 similar comments
@gautam-shetty
Copy link

gautam-shetty commented Nov 8, 2024

+1

@wpedrak
Copy link

wpedrak commented Nov 12, 2024

+1

@dbernatt
Copy link

+1 Win 11 gone after restarting my laptop

@force-code
Copy link

+1

@rmnkk
Copy link

rmnkk commented Dec 19, 2024

Have the same issue Image

@rmnkk
Copy link

rmnkk commented Dec 19, 2024

Have the same issue Image

I reinstalled it, and it appeared again with settings and extensions preserved

@Toine14
Copy link

Toine14 commented Dec 20, 2024

+1 win11

@DevMensIT
Copy link

+1 win11 .
Is there any solution for that ?

@asingh2207
Copy link

+1 December 2024 VS Code Self Destruct

@DJC-77
Copy link

DJC-77 commented Dec 23, 2024

This is the second time I've started my Windows 11 laptop and VS Code has disappeared. Any chance of getting this fixed?

@SebastianBetz
Copy link

Happened to me as well. What the heck...I'm seriously questioning if my computers want to convince me to finally quit programming. 🌪️

@DJC-77
Copy link

DJC-77 commented Dec 23, 2024

Happened to me as well. What the heck...I'm seriously questioning if my computers want to convince me to finally quit programming. 🌪️

I've only just started. Just finished SQL, but this is not helpful for the Python learning process. "oh just reinstall it every time you need to practice!"

@emboyy
Copy link

emboyy commented Jan 15, 2025

+1 win 11

@wwangsa
Copy link

wwangsa commented Jan 15, 2025

+1 on win 11. +1 WSL Ubuntu 24.04. When I run Code . in the WSL, it downloads the Code Server and reopens the VSCode. I can see my VSCode login and recent history are still intact. I see Microsoft Visual Studio Code (User) on the Apps > Installed Apps. I remember when I rebooted my Surface Pro, it prompted the typical Windows update questions on startup and asked how I use my laptop. I chose "Development". Not sure if this is the issue. Now I have "Dev Home" app that says "Dev Home needs an update. We are getting the update ready for you..."

@mirhamza708
Copy link

+1 on windows 10. what do we do? do we simply download again?

@wardlouckx
Copy link

+1 Windows 11/ WSL Ubuntu 24.04

@AmitKKhanchandani
Copy link

+1 from my work laptop, VS Code has disappeared. [i re-downloaded it and installed] and on personal computer, its trying to uninstall itself.

Image

@777555777
Copy link

777555777 commented Jan 16, 2025

+1 Windows 11 and WSL Ubuntu 22.04

fixed it as described here: #52855 (comment)

@joaomoreno joaomoreno marked this as a duplicate of #212443 Jan 30, 2025
@borjamunozf
Copy link

Happened again for other dev.

Is anyone working on this? It has been almost 7 years and this is happening more frequently, or that it's what it seems.
It's not a proper solution #52855 (comment) to tell a user to do this each time.

@Omashozie
Copy link

My VScode disappeared from my Laptop after a shut down today.
What's could be the cause and what is the best possible way to fix it. This has never happened to me before

@jgregg113
Copy link

This happened to me for the first time 2 hours ago.

@mrankine
Copy link

Happened to me for the first time just now.

@iansteyn
Copy link

iansteyn commented Feb 14, 2025

@mrankine @jgregg113 Just happened to me today for the first time too. This Stack Overflow question helped me find out that the program is still on my computer, but moved to a new location for some reason. Mine was in C:\Users\<username>\AppData\Local\Programs\Microsoft VS Code\_.

I don't know whether to move it somewhere else, re-install, or what.


Edit: My Solution

Opened VS Code from this folder, made sure my settings were synced to the cloud, then uninstalled/deleted all the files and reinstalled VS Code.

Also possibly related somehow: I had to re-add Python to my PATH user environment variables.

@cloudoftg0
Copy link

cloudoftg0 commented Feb 15, 2025

happened to me just now. i turned on my pc and it is gone.

Solutions:

  1. Just install vscode again, don't worry it won't reset your preferences/extensions etc.
  2. Move files from
    C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\ _ to
    C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\ and it will work just fine.

Future Fix.

  1. Go to settings inside vscode
  2. Search for update.enableWindowsBackgroundUpdates and toggle it OFF, hopefully it won't happen again.

cc StackOverFlow

@MarthCode
Copy link

MarthCode commented Feb 15, 2025

Hey! I just had this issue today. I think I found the issue?

I had the _ subfolder. I followed cloudoftg0's solution and it worked. I opened up VSCode, and saw there was an update. I updated it while keeping the File Explorer window open to see if the _ folder returns. And it did! For a brief second.

I think it's a sort of staging area for the files while the updates apply themselves before deleting itself? I think the updated got stuck half way, copied everything over but didn't trigger the second state of returning the files and deleting itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug install-update VS Code installation and upgrade system issues windows VS Code on Windows issues
Projects
None yet
Development

No branches or pull requests