microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
160.27k stars 28.08k forks source link

Open file/folder crashes VS Code in Ubuntu 24.04 #213906

Open erosman opened 1 month ago

erosman commented 1 month ago

Does this issue occur when all extensions are disabled?: Yes

Steps to Reproduce:

  1. Launch VS Code with an open folder
  2. Select any of the following from the File menu and VS Code crashes immediately
    • Open File
    • Open Folder
    • Open Workspace from File

The following work:

The following causes a crash:

There could be an issue with the open file due to changes in GNOME 46 Nautilus.

deepak1556 commented 1 month ago

Can you confirm if the issue is present with latest insiders https://code.visualstudio.com/insiders

erosman commented 1 month ago

Can you confirm if the issue is present with latest insiders https://code.visualstudio.com/insiders

There is an error when trying to install.

image

erosman commented 1 month ago

Can someone suggest a workaround for the time being?

papanireal commented 1 month ago

Have the same issue with vscode installed through Ubuntu Snap. Tried the insiders and regular .deb packages and they seem to work fine.

erosman commented 1 month ago

@papanireal Which version of Ubuntu are you using?

papanireal commented 1 month ago

@papanireal Which version of Ubuntu are you using?

24.04

erosman commented 1 month ago

I tried again with the latest .deb and there is still an error.

image

Lexslogic commented 4 weeks ago

Does this issue occur when all extensions are disabled?: Yes

* VS Code Version: 1.89.1

* OS Version: Ubuntu 24.04

Steps to Reproduce:

1. Launch VS Code with an open folder

2. Select any of the following from the File menu and VS Code crashes immediately

* Open File

* Open Folder

* Open Workspace from File

The following work:

* File -> Open Recent

* File -> New Window

The following causes a crash:

* File -> New Window -> Open File -> select a folder to open

* File -> New Window -> Open Folder -> select a folder to open

There could be an issue with the open file due to changes in GNOME 46 Nautilus.

I had the same problem since I updated VSCode today, it was instant closing, not even opening the main menu. What worked for me was uninstalling all vscode and autoremove after. Then, installing it from the official webpage .deb file, with that, I solved it

erosman commented 4 weeks ago

@papanireal @Lexslogic Are you using Gnome 46 Wayland desktop?

I had the same problem since I updated VSCode today, it was instant closing, not even opening the main menu.

Same here after updating the VSCode from snap. Now, I have lost access to VS Code completely. The issue which was reported, extended to a complete failure.

Next ....

Next ...

Error: Dependency is not satisfiable: libglib 2.0-0 (>= 2.37.3)

MySQL Workbench - Dependency Issue You want the deb for ubuntu 22.04, not 23.10.

erosman commented 4 weeks ago

See also:

0xfldr commented 4 weeks ago

I had the same issue for three days, but now the Vscode doesnt even start anymore Please fix ASAP

OS: Ubuntu 24.04 (Xorg)

erosman commented 3 weeks ago

Does the following have any relevance? If so, how can it be fixed?

~/.config/Code/logs/20240607T005226/main.log

2024-06-07 00:52:27.002 [info] update#setState idle 2024-06-07 00:52:27.935 [error] vscode-file: Refused to load resource /snap/code/159/usr/share/code/resources/app/extensions/theme-seti/icons/seti.woff from vscode-file: protocol (original URL: vscode-file://vscode-app/snap/code/159/usr/share/code/resources/app/extensions/theme-seti/icons/seti.woff)

However, there is no /snap/code/159

image

erosman commented 3 weeks ago

From Visual Studio Code crashes on Ubuntu 22.04.4 LTS

This also works (No need to reinstall or downgrade)

code --in-process-gpu

Above works for me too, although ...

$ code --in-process-gpu
Warning: 'in-process-gpu' is not in the list of known options, but still passed to Electron/Chromium.
arewageek commented 3 weeks ago

I got same issues today and have been unable to resolve this. Vs code closes almost immediately I attempt to open it. I haven't installed any new extension since I last used it a few hours ago.

arewageek commented 3 weeks ago

I just resolved mine now. I downloaded the deb file from vscode's site, installed it using: sudo dpkg -i [file_path/file_name.deb]

This solved my isses:

Note: remember to uninstall the previous vscode you have before or after doing this avoid confusions

erosman commented 3 weeks ago

I can also confirm that uninstalling via snap & manually installing code_1.90.0-1717531825_amd64.deb fixes the issue.

sudo dpkg -i code_1.90.0-1717531825_amd64.deb

It seems there is an issue with the snap code installation.

No errors in ~/.config/Code/logs/20240607T130517/main.log

Note: Although I exported my settings and extensions before uninstal, snap uninstall didn't remove the extensions from ~/.vscode and everything was there after manually installing above (which was great).

valiko-ua commented 3 weeks ago

I also had VSCode crash on Ubuntu 24.04 but right now, after installing all the updates from apt-get and snap and rebooting, VSCode works fine. I didn't do any hacks to fix it myself (like disabling wayland, etc).

Version: 1.90.0
Commit: 89de5a8d4d6205e5b11647eb6a74844ca23d2573
Date: 2024-06-04T19:43:07.605Z
Electron: 29.4.0
ElectronBuildId: 9593362
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Linux x64 6.8.0-35-generic snap

Update: VSCode was working fine a day or two with external monitor. Then I unplugged the monitor and VSCode started crashing again. Plugged the monitor back - VSCode works fine :)

thediveo commented 3 weeks ago

nope, snap code (160) (=1.90.0) is a total failure. same for the .deb package. what a fubar.

gerardo-m commented 3 weeks ago

Same problem here:

vscode-file: Refused to load resource /snap/code/159/usr/share/code/resources/app/extensions/theme-seti/icons/seti.woff from vscode-file: protocol (original URL: vscode-file://vscode-app/snap/code/159/usr/share/code/resources/app/extensions/theme-seti/icons/seti.woff)

OliverZott commented 3 weeks ago

Same here, but VS Code crashes immediately when starting it.

ubuntu 24.04 vs code 1.90

illegal-instruction-co commented 3 weeks ago

code --in-process-gpu

I had same issue and it also works for me.

Olorunnisola01 commented 3 weeks ago

If your VSCode crashes immediately you open it. Perhaps you have installed it through the App Center. To solve this issue, Uninstall VSCode from App Center and follow the following steps;

1) First, download and install the GPG key to trust packages from the Microsoft repository: wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg sudo install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/ rm packages.microsoft.gpg

2) Next, add the Visual Studio Code repository to your system's software sources list: echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" | sudo tee /etc/apt/sources.list.d/vscode.list

3) Finally, update your package lists and install Visual Studio Code: sudo apt-get update sudo apt-get install code

Following these 3 simple steps should definitely fix your issue. Have a great time coding with VSCode!

eignatenkov commented 2 weeks ago

just updated the snap version, got 1.90.1 and it doesn't crash anymore