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 · 206 comments
Open
Tracked by #189320

VS Code was lost on shutdown with pending update #52855

manglobe opened this issue Jun 26, 2018 · 206 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

@soredake
Copy link
Contributor

soredake commented May 7, 2023

#181762

@Billy19191
Copy link

When will this issue be solved? Hehe

@beto811 beto811 mentioned this issue Jul 31, 2023
@ramikhoualdi
Copy link

I encountered a similar problem: following a system restart for a Windows update, I launched VS Code, only to find it had mysteriously disappeared.😟

Consequently, I had to undertake the task of re-downloading and reinstalling it.

@mfariacastro
Copy link

Same thing just happened to me. Need to uninstall and reinstall in a restricted environment (where I have to bother a system admin to do it). Seems that there should be a better way of handling updates.

@mcamprecios
Copy link

Same happened here. I'm using the new app location to launch it, but seems weird.

It would be great to get a response.

@oburt
Copy link

oburt commented Oct 3, 2023

Just happened to me as well with the "code.exe" shortcut has been changed or moved error message. Looked in the C:\Users{username}\AppData\Local\Programs\Microsoft VS Code_ and found the app like above and opening it from there worked OK. Do not recall a restart for Windows updates or forcing a shutdown.

@luca-ferreri
Copy link

Thist just happened to me (and it is already the second time).

@Trother555
Copy link

Still happening

@dkoerner
Copy link

dkoerner commented Mar 8, 2024

Still happening

Same here.

@einarwar
Copy link

Happened for me too today.

@mikiSpoko200
Copy link

Yup, just happened to me as well.

@RaccoonOfNoStreet
Copy link

Happened again today

@mshahitxtav
Copy link

I ran into same issue today. Thankfully, reinstalling it restores it to last known state so that's one good thing, but surely would appreciate if it was fixed, especially since it's been known for almost 6 years now.

@TimWeFabricate
Copy link

And again (:

@saeeedtorabi
Copy link

POSSIBLE WORKAROUND

Well, I've noticed it twice now as well. For me, the ./bin directory that contains code.exe got renamed to '_' and an empty bin directory got created. I put the original back (or maybe I moved the files into _ and renamed it back, I forget) and it seemed to work fine. I've verified that the resulting code.exe file does have the new date and version resource, and it does display the latest release notes when run, so I would suspect the bug is lurking in the final code at the end of the auto-update process.

And yes, I'm always leaving my system on overnight, so it does that. Annoying, but I have come to expect it. I'd love to see a solution, though.

I encountered the issue today and the above solution worked for me. I just copied code.exe from _ folder to its parent folder and now the shortcut works fine!

@el-f
Copy link

el-f commented Jul 11, 2024

Happened to me today.
Reinstalling worked fine without any data/settings loss. deleted the _ folder after.
Still irks me that this is still an issue 6 years after it was first reported lol.

@boris-schwarz
Copy link

boris-schwarz commented Jul 12, 2024

Just had this issue today.

I opened VS Code, dragged in a folder from my OneDrive where I wanted to search in some old code, didn't find what I was looking and closed VS Code again. A system dialog appeared but I hit ESC too fast and now VS Code is gone.

After re-installing it, all the extensions and settings were still there, so no big loss.

Microsoft Windows 11 Pro
10.0.22631 Build 22631

@borjamunozf
Copy link

Happened for at least 3 developers in company this last 2 weeks.

VScode just dissapeared after some update. They had to reinstall vscode, extensions & settings recovered.

Please, this is not serious...

@Rob-McKay
Copy link

This has happened to me on macOS Sonoma for the last 6 updates!

@MaxPayneFH
Copy link

MaxPayneFH commented Oct 7, 2024

This just happened to me on Windows 11 x64, even the installer crashes now.

@Hiddenberg
Copy link

WTF, this also happened to me today

@jameso-outthink
Copy link

I was updating Windows 11, then on restart no VS Code

@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

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