vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Inform user to restart VS Code after it has been updated on Linux

Open frkn-aydn opened this issue 10 years ago • 22 comments

  • VSCode Version: 1.0.0
  • OS Version: 14.4 UBUNTU

Steps to Reproduce:

  1. i just open the VS

i dont see any color on my codes and i see this warning : http://i.hizliresim.com/o31jQ2.png

http://i.hizliresim.com/o31jQ2.png


Edit from @Tyriar:

See https://github.com/Microsoft/vscode/issues/5908#issuecomment-248075263 for more details, this is the error:

Error from the extension host: spawn /usr/share/code-insiders/code-insiders (deleted) ENOENT

frkn-aydn avatar Apr 27 '16 17:04 frkn-aydn

Never seen this error before. Almost seems to me the spawning via Electron just fails with this error.

bpasero avatar Apr 27 '16 19:04 bpasero

Ok. i have last question. How can i fix that problem ? when i open Visual Studio i see this problem and i cant edit any code. Right now i just open and close visual studio few times and problem solved but its temporary solution.

frkn-aydn avatar Apr 27 '16 20:04 frkn-aydn

does it reproduce with our latest insider build? You can give it a try from our insiders release today: http://code.visualstudio.com/Download#insiders

bpasero avatar Apr 28 '16 04:04 bpasero

I am seeing this after updating to 1.1

Edit: It went away after closing everything and launching again.

RyanEwen avatar May 10 '16 13:05 RyanEwen

Can confirm I had the same issue Error from the extension host: spawn /usr/share/code/code (deleted) ENOENT

It went away when I killed any already running processes. Probably should force a killall when a user restarts from an update.

17twenty avatar Jun 07 '16 01:06 17twenty

same here, ubuntu 16.04 just updated vscode today

hoangnguyenba avatar Jun 16 '16 02:06 hoangnguyenba

+1, same issue. just updated the vscode

psquickitprageet avatar Jun 20 '16 06:06 psquickitprageet

Same here, just updated Ubuntu 14.04 to the June release. Went away after full close and reopen.

RAdamMartin avatar Jul 10 '16 19:07 RAdamMartin

Got the same error today after upgrading from 1.3 to 1.3.1 and opening a new window.

Ubuntu 14.04

ryanbowden avatar Jul 13 '16 07:07 ryanbowden

same here.

Distributor ID: elementary OS
Description:    elementary OS Freya
Release:    0.3.2
Codename:   freya

Error from the extension host: spawn /usr/share/code/code (deleted) ENOENT

rafa-acioly avatar Aug 29 '16 13:08 rafa-acioly

+1

Error from the extension host: spawn /usr/share/code/code (deleted) ENOENT

I am on 1.5.1 using Ubuntu 16.04

JMSantos94 avatar Sep 09 '16 22:09 JMSantos94

I solved the problem by re-installing vscode completely.

rafa-acioly avatar Sep 10 '16 13:09 rafa-acioly

The fix would be for the installer to do a killall code as part of the install scripts in the deb. Basically, it's getting sad because things are linking to old binaries/libs that have been replaced.

By all means, respawn code after installing but that would fix the issue.

17twenty avatar Sep 11 '16 10:09 17twenty

I got this error on code 1.5.2 after installing extensions Ruby 0.5.6 and Ruby Language Colorization 0.0.6. My OS is Ubuntu 16.04.

pepemarino avatar Sep 13 '16 06:09 pepemarino

Moving to @Tyriar based on the last comments that this could be a problem with the update from a package. Could it be the update leaves the old running instance around including the extension host and thus the new instance fails to create it?

bpasero avatar Sep 18 '16 07:09 bpasero

If anyone reproduces this again can you check which processes are still running after you exit VS Code?

ps aux | grep code

Tyriar avatar Sep 19 '16 18:09 Tyriar

OK never mind, I just reproduced this:

Error from the extension host: spawn /usr/share/code-insiders/code-insiders (deleted) ENOENT

These are my repro steps:

  1. Open vscode insiders
  2. Update vscode insiders to latest
  3. Open a new folder

I fixed the issue by simply exiting and reopening vscode. This is as designed, you must exit VS Code after updating or you will get a mish-mash of the current and old version which is not designed to work. Possible improvement that could be made:

  • Somehow catch this in a reliable way and present a more useful message indicating to restart VS Code
  • Have the deb/rpm packages inform running instances of VS Code to restart

Tyriar avatar Sep 19 '16 18:09 Tyriar

Error occurs when you have VSCode open whilst installing an update. Simply close all VSCode windows and open them again.

d4nyll avatar Nov 02 '16 15:11 d4nyll

Accepting PRs for this, to fix this I think you'll need to search for where the exception is happening in the code base (somewhere related to reloading the window?) and handle ENOENT by giving a nicer error message. If you get ENOENT and then stat the file and it exists and we're on Linux, it's probably safe to assume this is the case.

Tyriar avatar Apr 20 '17 18:04 Tyriar

The snap package would handle this when the snap is updated: https://github.com/Microsoft/vscode/issues/5458

Tyriar avatar Sep 12 '18 19:09 Tyriar