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

Can’t launch VScode - hangs in citrix environment #146923

Closed
brocawernicke opened this issue Apr 6, 2022 · 10 comments
Closed

Can’t launch VScode - hangs in citrix environment #146923

brocawernicke opened this issue Apr 6, 2022 · 10 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@brocawernicke
Copy link

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

  • VS Code Version: 1.66.0
  • OS Version: Windows 10 Enterprise 20H2

Steps to Reproduce:

  1. PS D:> code --verbose

[6300:0407/004202.981:ERROR:gpu_process_host.cc(977)] GPU process launch failed: error_code=18
[6300:0407/004202.981:WARNING:gpu_process_host.cc(1288)] The GPU process has crashed 9 time(s)
[6300:0407/004202.981:FATAL:gpu_data_manager_impl_private.cc(448)] GPU process isn't usable. Goodbye.

@chewiiieee
Copy link

Similar problem with failing to launch directly from elevated command prompt. Normal command prompt works fine. I have Citrix installed, but I'm not using it.

C:\Users\XXXXX\AppData\Local\Programs\Microsoft VS Code>code

C:\Users\XXXXX\AppData\Local\Programs\Microsoft VS Code>
[23032:0425/124359.819:ERROR:gpu_process_host.cc(977)] GPU process launch failed: error_code=18
[23032:0425/124359.848:ERROR:gpu_process_host.cc(977)] GPU process launch failed: error_code=18
[23032:0425/124359.892:ERROR:gpu_process_host.cc(977)] GPU process launch failed: error_code=18
[23032:0425/124359.906:ERROR:gpu_process_host.cc(977)] GPU process launch failed: error_code=18
[23032:0425/124359.937:ERROR:gpu_process_host.cc(977)] GPU process launch failed: error_code=18
[main 2022-04-25T16:44:00.060Z] window#load: attempt to load window (id: 1)
[main 2022-04-25T16:44:00.112Z] update#setState idle
[23032:0425/124400.146:ERROR:gpu_process_host.cc(977)] GPU process launch failed: error_code=18
[main 2022-04-25T16:44:00.182Z] ExtensionHostStarterWorker created
[23032:0425/124400.184:ERROR:gpu_process_host.cc(977)] GPU process launch failed: error_code=18
[23032:0425/124400.200:ERROR:gpu_process_host.cc(977)] GPU process launch failed: error_code=18
[23032:0425/124400.320:ERROR:gpu_process_host.cc(977)] GPU process launch failed: error_code=18
[23032:0425/124400.320:FATAL:gpu_data_manager_impl_private.cc(448)] GPU process isn't usable. Goodbye.

@chewiiieee
Copy link

chewiiieee commented Apr 25, 2022

VSCode About:

Version: 1.66.2 (user setup)
Commit: dfd34e8
Date: 2022-04-11T07:46:01.075Z
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0
OS: Windows_NT x64 10.0.19044

@chewiiieee
Copy link

chewiiieee commented Apr 25, 2022

Also maybe worth mentioning that I tried launching VSCode elevated from a shortcut, powershell 5 & 7 sessions...none of them worked and all did basically the same thing with the outline for the VSCode app window briefly flashing on screen before it dies.

Rerunning with --verbose --disable-extensions produced the following:

Also maybe worth mentioning that I tried launching VSCode elevated from a shortcut, powershell 5 & 7 sessions...none of them worked and all did basically the same thing with the outline for the VSCode app window briefly flashing on screen before it dies.

Rerunning with --verbose --disable-extensions produced the following:

PS C:\Users\XXXXXX\AppData\Local\Programs\Microsoft VS Code> .\Code.exe --verbose --disable-extensions
PS C:\Users\XXXXXX\AppData\Local\Programs\Microsoft VS Code> cess launch failed: error_code=18
[31872:0425/151518.317:ERROR:gpu_process_host.cc(977)] GPU process launch failed: error_code=18
[31872:0425/151518.344:ERROR:gpu_process_host.cc(977)] GPU process launch failed: error_code=18
[31872:0425/151518.387:ERROR:gpu_process_host.cc(977)] GPU process launch failed: error_code=18
[31872:0425/151518.400:ERROR:gpu_process_host.cc(977)] GPU process launch failed: error_code=18XXXX\AppData\Roaming\Cod
[main 2022-04-25T19:15:18.401Z] [File Watcher (node.js)] Request to start watching: c:\Users\XXXXXX\AppData\Roaming\Code\User (excludes: ),c:\Users\XXXXXX\AppData\Roaming\Code\User\settings.json (excludes: )
[main 2022-04-25T19:15:18.424Z] Starting VS CodeuXXXXXX\AppData\Local\Programs\Microsoft VS Code\resources\app
[main 2022-04-25T19:15:18.424Z] from: c:\Users\XXXXXX\AppData\Local\Programs\Microsoft VS Code\resources\app
[main 2022-04-25T19:15:18.424Z] args: {
_: [],false,
diff: false,
add: false,,
goto: false,: false,
'new-window': false,e,
'reuse-window': false,
wait: false,
help: false,ions': false,
'list-extensions': false,
'show-versions': false,
'pre-release': false,
version: false,
verbose: true,
status: false,: false,
'prof-startup': false,e,
'no-cached-data': false,lse,
'prof-v8-extensions': false,
'disable-extensions': true,
'disable-gpu': false,un-as-node': false,
'ms-enable-electron-run-as-node': false,
telemetry: false,lse,
debugRenderer: false,nication: false,
logExtensionHostCommunication: false,
'skip-release-notes': false,
'skip-welcome': false,alse,
'disable-telemetry': false,
'disable-updates': false,
'disable-keytar': false,': false,
'disable-workspace-trust': false,
'disable-crash-reporter': false,8ed-4af8-9763-92793677618c',
'crash-reporter-id': '6b884c66-18ed-4af8-9763-92793677618c',
'skip-add-to-recently-opened': false,
'unity-launch': false,
'open-url': false,e,
'file-write': false,
'file-chmod': false,lse,
'driver-verbose': false,
force: false,: false,
'do-not-sync': false,
trace: false,nv': false,
'force-user-env': false,: false,
'force-disable-user-env': false,
'open-devtools': false,
__sandbox: false,: false,
'no-proxy-server': false,
'no-sandbox': false,
nolazy: false,r-accessibility': false,
'force-renderer-accessibility': false,
'ignore-certificate-errors': false,
'allow-insecure-localhost': false,
'disable-dev-shm-usage': false,AppData\Roaming\Code\logs\20220425T151302'
logsPath: 'C:\Users\XXXXXX\AppData\Roaming\Code\logs\20220425T151518'
}main 2022-04-25T19:13:02.310Z] Resolving machine identifier...
[main 2022-04-25T19:15:18.428Z] Resolving machine identifier...af2426faeaa076e4b5174d020672540969ec067d40a173513c5a82eea
[main 2022-04-25T19:15:18.429Z] Resolved machine identifier: 6faf2426faeaa076e4b5174d020672540969ec067d40a173513c5a82eeaebfad 2022-04-25T19:13:02.322Z] Main->SharedProcess#connect
[main 2022-04-25T19:15:18.431Z] Main->SharedProcess#connectprocess launch failed: error_code=18
[31872:0425/151518.439:ERROR:gpu_process_host.cc(977)] GPU process launch failed: error_code=18
[31872:0425/151518.451:ERROR:gpu_process_host.cc(977)] GPU process launch failed: error_code=18pData\Roaming\Code\User'
[main 2022-04-25T19:15:18.464Z] [File Watcher (node.js)] Started watching: 'c:\Users\XXXXXXX\AppData\Roaming\Code\User'
[31872:0425/151518.465:ERROR:gpu_process_host.cc(977)] GPU process launch failed: error_code=18
[main 2022-04-25T19:15:18.468Z] [File Watcher (node.js)] Started watching: 'c:\Users\XXXXXXX\AppData\Roaming\Code\User\settings.json'-25T19:13:02.381Z] windowsManager#open pathsToOpen [
[main 2022-04-25T19:15:18.474Z] StorageMainService: creating global storage
[main 2022-04-25T19:15:18.482Z] lifecycle (main): phase changed (value: 2)
[main 2022-04-25T19:15:18.484Z] windowsManager#open
[main 2022-04-25T19:15:18.486Z] windowsManager#open pathsToOpen [
{
workspace: { id: '62723dece33e5e015573e80e69aa7b6a', uri: [h] },
type: 2,4-25T19:13:02.384Z] windowsManager#doOpenFolderOrWorkspace {
exists: trueace: {
} workspace: { id: '62723dece33e5e015573e80e69aa7b6a', uri: [h] },
] type: 2,
[main 2022-04-25T19:15:18.487Z] windowsManager#doOpenFolderOrWorkspace {
folderOrWorkspace: {
workspace: { id: '62723dece33e5e015573e80e69aa7b6a', uri: [h] },
type: 2,
exists: trueT19:13:02.390Z] IPC Object URL: Registered new channel vscode:1fe3b413-75ae-44be-8ee6-09833ce261c7.
},n 2022-04-25T19:13:02.398Z] window#validateWindowState: validating window state on 2 display(s) { mode: 0, x: 380, y
filesToOpen: undefinedht: 1688 }
}main 2022-04-25T19:13:02.403Z] window#validateWindowState: multi-monitor working area { x: 0, y: 0, width: 3072, height
[main 2022-04-25T19:15:18.489Z] IPC Object URL: Registered new channel vscode:c2e26876-6923-4fc7-b8f3-7ee95740548c.
[main 2022-04-25T19:15:18.489Z] window#validateWindowState: validating window state on 2 display(s) { mode: 0, x: 380, y: 116, width: 1544, height: 1688 }ndow#load: attempt to load window (id: 1)
[main 2022-04-25T19:15:18.490Z] window#validateWindowState: multi-monitor working area { x: 0, y: 0, width: 3072, height: 1688 }22-04-25T19:13:02.610Z] windowsManager#open used window count 1 (workspacesToOpen: 0, foldersToOpen: 1, emptyToR
[main 2022-04-25T19:15:18.490Z] window#ctor: using window state { mode: 0, x: 380, y: 116, width: 1544, height: 1688 }
[main 2022-04-25T19:15:18.598Z] window#load: attempt to load window (id: 1)
[main 2022-04-25T19:15:18.633Z] StorageMainService: creating workspace storage (62723dece33e5e015573e80e69aa7b6a)
[main 2022-04-25T19:15:18.634Z] windowsManager#open used window count 1 (workspacesToOpen: 0, foldersToOpen: 1, emptyToRestore: 0, emptyToOpen: 0)720Z] [File Watcher (node.js)] Started watching: 'c:\Users\XXXXXXX\AppData\Roaming\Code\User\s
[main 2022-04-25T19:15:18.635Z] lifecycle (main): phase changed (value: 3)
[main 2022-04-25T19:15:18.649Z] update#setState idle)] GPU process launch failed: error_code=18
[main 2022-04-25T19:15:18.650Z] resolveShellEnv(): skipped (Windows)
[31872:0425/151518.679:ERROR:gpu_process_host.cc(977)] GPU process launch failed: error_code=18
[main 2022-04-25T19:15:18.715Z] ExtensionHostStarterWorker created launch failed: error_code=18
[31872:0425/151518.717:ERROR:gpu_process_host.cc(977)] GPU process launch failed: error_code=18oodbye.
[31872:0425/151518.719:FATAL:gpu_data_manager_impl_private.cc(448)] GPU process isn't usable. Goodbye.

@deepak1556
Copy link
Collaborator

VSCode does not support launching as elevated due to the application sandbox from the runtime. @brocawernicke are you also running the application as elevated ?

@deepak1556 deepak1556 added the info-needed Issue requires more information from poster label Apr 26, 2022
@chewiiieee
Copy link

chewiiieee commented Apr 26, 2022

Ok, thanks deepak for that.

If I can't launch VSCode with admin privileges how do I debug Powershell scripts or anything for that matter that has OS APIs that demand elevated privileges to run? I've gone looking and I've search VSCode settings to see if maybe the debugging session can simply be elevated and I can't find any "admin" or "elevated" related settings. Searching online points to a bunch of dated articles with little value.

"Run as admin" is a really basic and common Windows OS level feature and whether it supported or not, VSCode should simply not be dying on it. Not ever. Not really sure what level of information is being logged to the console but it sure doesn't appear like a proper exception identifying the error.
Is there no feature check system early on where you can add a "if running as Admin" and putting up a message saying "Running VSCode with elevated privileges is unsupported" ?

@vscodenpa
Copy link

Hey @deepak1556, this issue might need further attention.

@brocawernicke, you can help us out by closing this issue if the problem no longer exists, or adding more information.

@vscodenpa
Copy link

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Aug 25, 2022
@deepak1556 deepak1556 reopened this Aug 25, 2022
@deepak1556 deepak1556 removed the info-needed Issue requires more information from poster label Aug 25, 2022
@deepak1556
Copy link
Collaborator

Can you try launching with --disable-gpu-sandbox with latest stable version 1.73

@deepak1556 deepak1556 added the info-needed Issue requires more information from poster label Dec 7, 2022
@rogererens
Copy link

I always used .\code --no-sandbox to overcome the error message.
Using the option --disable-gpu-sandbox seems to work here, too.

@deepak1556
Copy link
Collaborator

Please continue to use those flags if elevation is required.

Merging to #122951

@github-actions github-actions bot locked and limited conversation to collaborators Jan 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

6 participants