microsoft / vscode

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

VSCode hangs when opening folder in Ubuntu 24.04 #211762

Open guyrt opened 5 months ago

guyrt commented 5 months ago

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

Steps to Reproduce:

  1. Fresh install ubuntu and vscode (both installed today - code from apt-get)
  2. open code in any folder like "code ."
  3. VSCode hangs.

Last lines in the verbose logs:

[44656:0430/204913.934951:INFO:CONSOLE(655)] "%cTRACE color: #888 CommandService#executeCommand _setContext", source: vscode-file://vscode-app/snap/code/157/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (655)
[44656:0430/204913.935581:INFO:CONSOLE(655)] "%cTRACE color: #888 [File Watcher (node.js)] stopping file watcher (/XXX/.git/refs/remotes/origin/main (excludes: <none>, includes: ["**/.git/objects/**/**","**/.git/subtree-cache/**/**","**/node_modules/*/**/**","**/.hg/store/**/**"], correlationId: <none>))", source: vscode-file://vscode-app/snap/code/157/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (655)
[44656:0430/204913.946089:INFO:CONSOLE(655)] "%cTRACE color: #888 [File Watcher (node.js)] Request to start watching: /XXX/.git/refs/remotes/origin/main (excludes: <none>, includes: ["**/.git/objects/**/**","**/.git/subtree-cache/**/**","**/node_modules/*/**/**","**/.hg/store/**/**"], correlationId: <none>)", source: vscode-file://vscode-app/snap/code/157/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (655)
[44656:0430/204913.946653:INFO:CONSOLE(655)] "%cTRACE color: #888 [File Watcher (node.js)] ignoring a path for watching who's stat info failed to resolve: /XXX/.git/refs/remotes/origin/main (error: Error: ENOENT: no such file or directory, stat '/XXX/.git/refs/remotes/origin/main')", source: vscode-file://vscode-app/snap/code/157/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (655)
[44656:0430/204913.959913:INFO:CONSOLE(655)] "%cTRACE color: #888 [mainThreadSecretState] Getting password for vscode.github-authentication extension:  github.auth", source: vscode-file://vscode-app/snap/code/157/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (655)

I tried with folders that aren't tracked in git.

n7tae commented 5 months ago

This is happening with my two fresh Ubuntu 24.04 installs (laptop and desktop). I have tried snap install and apt install. Both fail in the same way: open a folder then click just about anywhere and it locks up vscode.

kmcintyre commented 5 months ago

Same experience here.

n7tae commented 5 months ago

I did finally figure out that for me, opening a folder that contained a .git directory was the problem. If I moved the .git dir to a different name before trying to open it, the folder opened fine. Of course the git info for that folder was not available.

After that, I decided to go back to Ubuntu 24.04. This time VSCode worked fine. I can't say for sure why it's now working, but I did do something different this time when installing 24.04: This time, I followed my laptop's manufacturer's advice and turned off the "Install 3rd party software for for graphics and wifi...". Then after 24.04 was up I added the specified ppa to download drivers from my manufacturer. After that, I installed VSCode.

Yesterday, I did sudo snap refresh and it upgraded VSCode to 1.89 and it's working fine as well.

hurryman2212 commented 5 months ago

No update?

EDIT:

Might be related to system Keyring? I was having this issue with the first ever boot session installed with VSCode and it just freezes whenever I open a folder with .git (I'm not sure whether this issue happens recursively).

But after I rebooted it, it suddenly asked for Keyring password, and after I typed it, it works just fine. I don't know. Maybe the Keyring thing is just happned because it was the first run after the first reboot, after VSCode installation, and it was with something else and solved because the reboot has replaced the outdated service for that root cause.

liheyuan commented 5 months ago

Same experience even if I open a folder that does not contain .git

Try disable wayland, this may work

https://github.com/microsoft/vscode/issues/212430

messenjer commented 5 months ago

Yes, for me it works when I restart the laptop, after a fresh ubuntu install.

thediveo commented 4 months ago

have vscode 1.90 snap installed, but doesn't work

(this wayland transition is a total BS show, many other programs also broken on Ubuntu 24.04, and Canomical has the gall to call this LTS ... long-term sh...)

augustogava commented 3 months ago

Same here, freeze, For me happens when starting React/Next project and having a dotnet backend already started by rider.

Ubuntu 24.04, / wayland Version: 1.91.1 Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729 Date: 2024-07-09T22:08:12.169Z Electron: 29.4.0 ElectronBuildId: 9728852 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Linux x64 6.8.0-38-generic

deepak1556 commented 3 months ago

Please check if issue is present with latest insiders https://code.visualstudio.com/insiders

Viicos commented 2 months ago

Please check if issue is present with latest insiders https://code.visualstudio.com/insiders

This is still an issue with insiders (b1c0a14d)

kristian-trandem-uke commented 2 months ago

I had these problems last week, but today it works after I did an Ubuntu update and machine restart! :smiley:

Has the problem been solved?

liheyuan commented 2 months ago

I had these problems last week, but today it works after I did an Ubuntu update and machine restart! 😃

Has the problem been solved?

Yes, I tried 2 other app that were not compatible before (virtualbox, nextchat), and they all worked fine after upgrading to the latest Ubuntu 24.04. It seems that Ubuntu fixed this problem, finally ..

liheyuan commented 2 months ago

It seems mutter ralated pkg fix this problem

mutter (46.2-1ubuntu0.24.04.1) noble; urgency=medium

[ Daniel van Vugt ]

hktari commented 1 month ago

I believe this issue is related to vscode git extension, because vscode hangs when I try to connect to a repository using the git extension

anrub commented 1 month ago

I believe this issue is related to vscode git extension, because vscode hangs when I try to connect to a repository using the git extension

Looks like that, in my case it hangs at this point in the log: Checking if encryption is available...

[88468:0827/212931.066403:INFO:CONSOLE(660)] "%cTRACE color: #888 [mainThreadSecretState] Getting password for vscode.github-authentication extension:  github.auth", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (660)
[main 2024-08-27T19:29:31.066Z] [EncryptionMainService] Checking if encryption is available...
liheyuan commented 1 month ago

Upgrade to latest Ubuntu 24.04.1 will solve those problem, see https://github.com/microsoft/vscode/issues/212430

hktari commented 1 month ago

i'm running linux mint

On Wed, 28 Aug 2024 at 04:03, Coder4 @.***> wrote:

Upgrade to latest Ubuntu 24.04.1 will solve those problem, see #212430 https://github.com/microsoft/vscode/issues/212430

— Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode/issues/211762#issuecomment-2313942478, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFL5IV3RRHXSOL2UIAJINDZTUVWJAVCNFSM6AAAAABHBNEBOWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJTHE2DENBXHA . You are receiving this because you commented.Message ID: @.***>

liheyuan commented 1 month ago

i'm running linux mint On Wed, 28 Aug 2024 at 04:03, Coder4 @.> wrote: Upgrade to latest Ubuntu 24.04.1 will solve those problem, see #212430 <#212430> — Reply to this email directly, view it on GitHub <#211762 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFL5IV3RRHXSOL2UIAJINDZTUVWJAVCNFSM6AAAAABHBNEBOWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJTHE2DENBXHA . You are receiving this because you commented.Message ID: @.>

Mint is also a release based on Debian. You can check when this package will have a corresponding Mint upgrade.

mutter (46.2-1ubuntu0.24.04.1) noble; urgency=medium

[ Daniel van Vugt ]

New upstream release 46.2 (LP: #2068598) Fixed mouse clicks falling through to the window behind (LP: #2026194) ...

hktari commented 1 month ago

thanks for the reply. I understand

edit: until mint gets an upgrade, running vscode Version: 1.92.2 does the trick

bkerler commented 1 month ago

I believe this issue is related to vscode git extension, because vscode hangs when I try to connect to a repository using the git extension

Looks like that, in my case it hangs at this point in the log: Checking if encryption is available...

[88468:0827/212931.066403:INFO:CONSOLE(660)] "%cTRACE color: #888 [mainThreadSecretState] Getting password for vscode.github-authentication extension:  github.auth", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (660)
[main 2024-08-27T19:29:31.066Z] [EncryptionMainService] Checking if encryption is available...

Fix is to use "password-store": "basic" in ~/.vscode/argv.json ... or start code with --password-store="basic"

moritztim commented 1 month ago

I believe this issue is related to vscode git extension, because vscode hangs when I try to connect to a repository using the git extension

Looks like that, in my case it hangs at this point in the log: Checking if encryption is available...

[88468:0827/212931.066403:INFO:CONSOLE(660)] "%cTRACE color: #888 [mainThreadSecretState] Getting password for vscode.github-authentication extension:  github.auth", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (660)
[main 2024-08-27T19:29:31.066Z] [EncryptionMainService] Checking if encryption is available...

Fix is to use "password-store": "basic" in ~/.vscode/argv.json ... or start code with --password-store="basic"

Careful! This is not recommended, so if you are gonna use it, make sure to stop using it asap, if the issue gets fixed. See docs

this fallback strategy is, at best, obfuscation, and should only be used if you are accepting of the risk that any process on the system could, in theory, decrypt your stored secrets.

gorghino commented 3 weeks ago

This happens on my workstation with 22.04.5 LTS. It hangs during Checking if encryption is available... for many seconds. I'm not using wayland.

Version: 1.93.1 Commit: 38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40 Date: 2024-09-11T17:20:05.685Z Electron: 30.4.0 ElectronBuildId: 10073054 Chromium: 124.0.6367.243 Node.js: 20.15.1 V8: 12.4.254.20-electron.0 OS: Linux x64 6.8.0-45-generic

eckPathtech commented 1 week ago

Same issue. Try to disable wayland by editing '/etc/gdm3/custom.conf' with uncomment WaylandEnable=false but it not worked.

I solved it by remove my version and install again but this time using apt install. Basically : sudo apt auto-remove code then follow the procedure "2. Installing VS Code Using APT on Ubuntu "

Good luck

IftikharZahid commented 18 hours ago

Facing same issue for last two weeks. let'st try to remove and install it again.

Same issue. Try to disable wayland by editing '/etc/gdm3/custom.conf' with uncomment WaylandEnable=false but it not worked.

I solved it by remove my version and install again but this time using apt install. Basically : sudo apt auto-remove code then follow the procedure "2. Installing VS Code Using APT on Ubuntu "

Good luck