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

Unable to run sandboxed process when run as elevated under applocker #122951

Open
moward opened this issue May 4, 2021 · 121 comments
Open

Unable to run sandboxed process when run as elevated under applocker #122951

moward opened this issue May 4, 2021 · 121 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug chromium Issues and items related to Chromium sandbox Running VSCode in a node-free environment webview Webview issues windows VS Code on Windows issues workbench-run-as-admin Issues concerning running as administrator

Comments

@moward
Copy link

moward commented May 4, 2021

  • VS Code Version: 1.56.0-insider (user setup)
  • OS Version: Windows_NT x64 10.0.19042
  • Electron: 12.0.4
  • Chrome: 89.0.4389.114
  • Node.js: 14.16.0
  • V8: 8.9.255.24-electron.0

Steps to Reproduce:

  1. Open a markdown file, and click the "Open preview to the side" button
  2. The preview window is blank, and an error notification pops up in the bottom right:

Error loading webview: Error: Could not register service workers: TypeError: Failed to register a ServiceWorker for scope ('vscode-webview://36f8a74c-37c6-4d60-9d4c-87414f69ebcc/') with script ('vscode-webview://36f8a74c-37c6-4d60-9d4c-87414f69ebcc/service-worker.js?platform=electron&id=36f8a74c-37c6-4d60-9d4c-87414f69ebcc&vscode-resource-origin=https%3A%2F%2F36f8a74c-37c6-4d60-9d4c-87414f69ebcc.vscode-webview-test.com'): ServiceWorker cannot be started.

The same thing happens for other WebViews, like opening an extension from the Extensions sidebar, or using the "Issue Reporter".

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

@vscodebot
Copy link

vscodebot bot commented May 4, 2021

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@mjbvz
Copy link
Collaborator

mjbvz commented May 4, 2021

Which specific insider build are you on? Please share the commit number. This should be in the about panel

@moward
Copy link
Author

moward commented May 4, 2021

Here you go:

Version: 1.56.0-insider (user setup)
Commit: 85f8ebf
Date: 2021-05-04T08:04:43.323Z

@mjbvz
Copy link
Collaborator

mjbvz commented May 4, 2021

Thanks. Unfortunately I can't reproduce this issue with that build

Can you try launching VS Code by running code-insiders --verbose from the command line. This will print more detailed logs that may help me investigate what is going on

@deepak1556
Copy link
Contributor

ServiceWorker cannot be started can happen in the following situations,

  1. |script_url| is on a different origin from |scope|
  2. Fetching |script_url| fails.
  3. |script_url| fails to parse or its top-level execution fails.

Based on the error message 1) and 2) are satisfied, very likely we are hitting 3) given the TypeError.

Lets check the webview devtools console log for any script errors thrown, if not we would have to expose a way to pause serviceworker execution on start to debug further, a similar feature provided by chrome://serviceworker-internals/

@moward
Copy link
Author

moward commented May 5, 2021

I see this stack appear before the error message:

[5660:0505/094114.425:INFO:CONSOLE(627)] "%c  ERR color: #f33 Cannot read property 'resource' of undefined: TypeError: Cannot read property 'resource' of undefined
	at c.deserializeWebviewPanel (c:\Users\mahowa\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\markdown-language-features\dist\extension.js:1:107435)
	at s.$deserializeWebviewPanel (c:\Users\mahowa\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:88:68958)
	at l._doInvokeHandler (c:\Users\mahowa\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:91:12836)
	at l._invokeHandler (c:\Users\mahowa\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:91:12520)
	at l._receiveRequest (c:\Users\mahowa\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:91:11187)
	at l._receiveOneMessage (c:\Users\mahowa\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:91:9973)
	at c:\Users\mahowa\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:91:8074
	at fire (c:\Users\mahowa\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:57:1836)
	at S.fire (c:\Users\mahowa\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:65:15497)
	at c:\Users\mahowa\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:106:29764
	at fire (c:\Users\mahowa\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:57:1836)
	at S.fire (c:\Users\mahowa\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:65:15497)
	at t._receiveMessage (c:\Users\mahowa\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:65:20755)
	at c:\Users\mahowa\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:65:17641
	at fire (c:\Users\mahowa\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:57:1836)
	at acceptChunk (c:\Users\mahowa\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:65:12862)
	at c:\Users\mahowa\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:65:12210
	at Socket.v (c:\Users\mahowa\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:106:13195)
	at Socket.emit (events.js:315:20)
	at addChunk (internal/streams/readable.js:309:12)
	at readableAddChunk (internal/streams/readable.js:284:9)
	at Socket.Readable.push (internal/streams/readable.js:223:10)
	at Pipe.onStreamRead (internal/stream_base_commons.js:188:23)", source: file:///C:/Users/mahowa/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
...
[5660:0505/094114.703:INFO:CONSOLE(627)] "%cDEBUG background: #eee; color: #888 Webview(8b913105-9191-43c8-a617-1606ad761eae): did post message on 'focus'", source: file:///C:/Users/mahowa/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[5660:0505/094114.706:INFO:CONSOLE(1728)] "[Embedded Page] Webview fatal error: Error: Could not register service workers: TypeError: Failed to register a ServiceWorker for scope ('vscode-webview://8b913105-9191-43c8-a617-1606ad761eae/') with script ('vscode-webview://8b913105-9191-43c8-a617-1606ad761eae/service-worker.js?platform=electron&id=8b913105-9191-43c8-a617-1606ad761eae&vscode-resource-origin=https%3A%2F%2F8b913105-9191-43c8-a617-1606ad761eae.vscode-webview-test.com'): ServiceWorker cannot be started.", source: file:///C:/Users/mahowa/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js (1728)
[5660:0505/094114.707:INFO:CONSOLE(735)] "Error loading webview: Error: Could not register service workers: TypeError: Failed to register a ServiceWorker for scope ('vscode-webview://8b913105-9191-43c8-a617-1606ad761eae/') with script ('vscode-webview://8b913105-9191-43c8-a617-1606ad761eae/service-worker.js?platform=electron&id=8b913105-9191-43c8-a617-1606ad761eae&vscode-resource-origin=https%3A%2F%2F8b913105-9191-43c8-a617-1606ad761eae.vscode-webview-test.com'): ServiceWorker cannot be started.", source: file:///C:/Users/mahowa/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js (735)
[5660:0505/094114.710:INFO:CONSOLE(627)] "%cDEBUG background: #eee; color: #888 Webview(8b913105-9191-43c8-a617-1606ad761eae): did post message on 'focus'", source: file:///C:/Users/mahowa/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js (627)

I'm not sure if this is a Markdown-specific issue though. I can also try uninstalling and re-installing if you'd like.

@bpasero
Copy link
Member

bpasero commented May 5, 2021

Interesting, this looks a lot like the #120157 I saw earlier but then could not reproduce anymore.

@mjbvz
Copy link
Collaborator

mjbvz commented May 5, 2021

@moward It happens for all webviews though, not just markdown previews, correct?

@moward
Copy link
Author

moward commented May 5, 2021

Image file previews are also broken. Do these use WebViews? I see an empty window but no error notification and don't see anything in the verbose logs. Also, I just upgraded a different machine to 85f8ebf and am now seeing the same problem there. 🙁

@haugerbr
Copy link
Member

haugerbr commented May 6, 2021

I have noticed this issue on the stable build of 1.56.0 that was just released. I have found it only happens if I run vscode as administrator. I noticed because I couldn't read the release notes 😂

Error loading webview: Error: Could not register service workers: TypeError: Failed to register a ServiceWorker for scope ('vscode-webview://vs_code_release_notes/') with script ('vscode-webview://vs_code_release_notes/service-worker.js?platform=electron&id=vs_code_release_notes&vscode-resource-origin=https%3A%2F%2Fvs_code_release_notes.vscode-webview-test.com'): ServiceWorker cannot be started.

@moward
Copy link
Author

moward commented May 6, 2021

You're absolutely right, @haugerbr. I always run as administrator and forgot to consider that. I just tried running without elevated permissions and the WebViews work

@haugerbr
Copy link
Member

haugerbr commented May 6, 2021

@mjbvz @bpasero can you try to repro using the info I posted. I have a feeling you that may start seeing more issues like this opened because I'm sure there are other people who need vscode to run as admin and while vscode can still be used, it degrades the experience significantly.

@mjbvz
Copy link
Collaborator

mjbvz commented May 6, 2021

Seems to work fine for me as an administrator:

Screen Shot 2021-05-06 at 12 15 07 PM

Any extra details about how VS Code is installed or what the permissions are like on your machine?

@mjbvz mjbvz added info-needed Issue requires more information from poster webview Webview issues windows VS Code on Windows issues labels May 6, 2021
@haugerbr
Copy link
Member

haugerbr commented May 6, 2021

@mjbvz I am an admin on the machine itself and vscode was installed through the windows installer. I am actually unable to open developer tools which is unfortunate because I was trying to get a better error message for you if one exists. I also tried submitting a bug though a non admin vscode instance so there would be more system information but I couldn't get it to post to github.

@deepak1556
Copy link
Contributor

@haugerbr can you launch with code.cmd --no-sandbox and check if it helps. If not, can you attach the output of code.cmd --verbose

@haugerbr
Copy link
Member

haugerbr commented May 6, 2021

@deepak1556 the code --no-sandbox didnt seem to change anything. The below error is repeated infinitely in verbose mode after opening a webview. I redacted configURIPath since I don't think it's relavent and it contains information I don't want shown but it's worth noting that it is a VSCode workspace file.

[main 2021-05-06T21:03:56.021Z] IPC Object URL: Removed channel vscode:ca9cd48f-1175-4975-9ccd-234bfcc00750.
[main 2021-05-06T21:03:56.022Z] Lifecycle#window.on('closed') - window ID 1
[main 2021-05-06T21:03:56.022Z] Lifecycle#onWillShutdown.fire()
[main 2021-05-06T21:03:56.024Z] IPC Object URL: Removed channel vscode:c9cf8323-7048-437c-b08c-1ed3694d61a7.
[main 2021-05-06T21:03:56.057Z] Lifecycle#app.on(window-all-closed)
[main 2021-05-06T21:03:56.057Z] Lifecycle#app.on(before-quit)
[main 2021-05-06T21:03:56.057Z] Lifecycle#onBeforeShutdown.fire()
[main 2021-05-06T21:03:56.058Z] [WindowsStateHandler] onBeforeShutdown {
  lastActiveWindow: {
    workspaceIdentifier: {
      id: 'ab9313a30fade07ac323ad606ba08fe7',
      configURIPath: '<redacted>'
    },
    folder: undefined,
    backupPath: 'C:\\Users\\brianhau\\AppData\\Roaming\\Code\\Backups\\ab9313a30fade07ac323ad606ba08fe7',
    remoteAuthority: undefined,
    uiState: [Object: null prototype] {
      mode: 0,
      x: 128,
      y: 0,
      width: 1024,
      height: 690
    }
  },
  lastPluginDevelopmentHostWindow: {
    workspaceIdentifier: undefined,
    folder: undefined,
    backupPath: undefined,
    remoteAuthority: undefined,
    uiState: { mode: 0, x: 128, y: 0, width: 1024, height: 690 }
  },
  openedWindows: []
}
[main 2021-05-06T21:03:56.061Z] Lifecycle#app.on(will-quit)
[4436:0506/140356.085:INFO:CONSOLE(627)] "%cDEBUG background: #eee; color: #888 Webview(vs_code_release_notes): did post message on 'focus'", source: file:///C:/Users/brianhau/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[4436:0506/140356.086:INFO:CONSOLE(627)] "%cDEBUG background: #eee; color: #888 Webview(vs_code_release_notes): did post message on 'focus'", source: file:///C:/Users/brianhau/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
Error occurred in handler for 'GUEST_VIEW_MANAGER_CALL': Error: Invalid guestInstanceId: 3
    at getGuestForWebContents (electron/js2c/browser_init.js:189:6386)
    at electron/js2c/browser_init.js:189:5451
    at electron/js2c/browser_init.js:189:1716
    at electron/js2c/browser_init.js:205:579
    at Object.<anonymous> (electron/js2c/browser_init.js:165:10005)
    at Object.emit (events.js:315:20)
Error occurred in handler for 'GUEST_VIEW_MANAGER_CALL': Error: Invalid guestInstanceId: 3
    at getGuestForWebContents (electron/js2c/browser_init.js:189:6386)
    at electron/js2c/browser_init.js:189:5451
    at electron/js2c/browser_init.js:189:1716
    at electron/js2c/browser_init.js:205:579
    at Object.<anonymous> (electron/js2c/browser_init.js:165:10005)
    at Object.emit (events.js:315:20)
Error occurred in handler for 'GUEST_VIEW_MANAGER_CALL': Error: Invalid guestInstanceId: 3
    at getGuestForWebContents (electron/js2c/browser_init.js:189:6386)
    at electron/js2c/browser_init.js:189:5451
    at electron/js2c/browser_init.js:189:1716
    at electron/js2c/browser_init.js:205:579
    at Object.<anonymous> (electron/js2c/browser_init.js:165:10005)
    at Object.emit (events.js:315:20)
Error occurred in handler for 'GUEST_VIEW_MANAGER_CALL': Error: Invalid guestInstanceId: 3
    at getGuestForWebContents (electron/js2c/browser_init.js:189:6386)
    at electron/js2c/browser_init.js:189:5451
    at electron/js2c/browser_init.js:189:1716
    at electron/js2c/browser_init.js:205:579
    at Object.<anonymous> (electron/js2c/browser_init.js:165:10005)
    at Object.emit (events.js:315:20)
Error occurred in handler for 'GUEST_VIEW_MANAGER_CALL': Error: Invalid guestInstanceId: 3
    at getGuestForWebContents (electron/js2c/browser_init.js:189:6386)
    at electron/js2c/browser_init.js:189:5451
    at electron/js2c/browser_init.js:189:1716
    at electron/js2c/browser_init.js:205:579
    at Object.<anonymous> (electron/js2c/browser_init.js:165:10005)
    at Object.emit (events.js:315:20)
[4436:0506/140356.097:INFO:CONSOLE(627)] "%cDEBUG background: #eee; color: #888 Webview(vs_code_release_notes): did post message on 'focus'", source: file:///C:/Users/brianhau/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
Error occurred in handler for 'GUEST_VIEW_MANAGER_CALL': Error: Invalid guestInstanceId: 3
    at getGuestForWebContents (electron/js2c/browser_init.js:189:6386)
    at electron/js2c/browser_init.js:189:5451
    at electron/js2c/browser_init.js:189:1716
    at electron/js2c/browser_init.js:205:579
    at Object.<anonymous> (electron/js2c/browser_init.js:165:10005)
    at Object.emit (events.js:315:20)
[4436:0506/140356.099:INFO:CONSOLE(627)] "%cDEBUG background: #eee; color: #888 Webview(vs_code_release_notes): did post message on 'focus'", source: file:///C:/Users/brianhau/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[main 2021-05-06T21:03:56.137Z] StorageMainService: closed global storage```

@deepak1556 deepak1556 added the workbench-run-as-admin Issues concerning running as administrator label May 6, 2021
@deepak1556
Copy link
Contributor

the code --no-sandbox didnt seem to change anything

Are you also unable to open devtools with the flag ? Just to confirm, did you make sure any open instances of vscode was exited before performing the above operation ?

Error occurred in handler for 'GUEST_VIEW_MANAGER_CALL': Error: Invalid guestInstanceId: 3

This is indeed related to webview management but it is very likely just a side-effect of the actual bug which we haven't deduced yet.

Can you also provide the output of code --verbose --vmodule=*/content/*=3,*/component/*=3,*/sandbox/*=3

@StanKirilov
Copy link
Member

StanKirilov commented May 7, 2021

For me using code --no-sandbox solved the problem and I can see the Markdown Preview on one of my machines (running on VM). On other machines - it doesn't help at all.

@deepak1556
Copy link
Contributor

On other machines - it doesn't help at all.

@StanKirilov Can you run with code --no-sandbox --user-data-dir <specify-some-absolute-directory-path-here>

@ooeygui

This comment has been minimized.

@mjbvz

This comment has been minimized.

@mjbvz
Copy link
Collaborator

mjbvz commented May 7, 2021

@StanKirilov is at MS, so we can ask for more detailed logs/traces if needed. @deepak1556 What would help us investigate this issue?

@deepak1556 deepak1556 changed the title Can't open any webviews on windows when run as elevated Unable to run sandboxed process when run as elevated under applocker Dec 7, 2022
@deepak1556 deepak1556 removed this from the On Deck milestone Dec 12, 2022
@p3t3r5
Copy link

p3t3r5 commented Jan 3, 2023

Wy not add 'no-sanbox' to SUPPORTED_ELECTRON_SWITCHES? We cann not run VSCode (windows) installed on networkdrive without --no-sandbox... Is a some issue or not? It is possible to fix VSCode (sandboxed) to run from networkdrive?

@p3t3r5
Copy link

p3t3r5 commented May 15, 2023

Last Insider Version 1.79.0-insider 9084e08 x64
Installed as portable (with data folder) on networkdrive. Before last update, we could open VSCodeInsider with --no-sandbox parameter. After update it is not possible to open VSCodeInsider

@deepak1556
Copy link
Contributor

@p3t3r5 please check #182070 you might need to add the host to the new allowlist setting.

@p3t3r5
Copy link

p3t3r5 commented May 15, 2023

@p3t3r5 please check #182070 you might need to add the host to the new allowlist setting.

We have no problems working with projects located on networkdrive (mapped or not).
We have problems to open VSCode located on networkdrive (mapped or not).
We can open VSCode 1.78.2 with --no-sanbox. VSCodeInsider 1.79.0 (last build) shows message shortly "The window teminated unexpectedly (reason: 'launch-failed, code: '18'" and closes itself.

@litong2
Copy link

litong2 commented Jun 14, 2023

I am on version 1.79.1 and get "The window teminated unexpectedly (reason: 'launch-failed, code: '18'" when running code --no-sandbox in admin command prompt.

@haugerbr
Copy link
Member

haugerbr commented Jun 14, 2023

@litong2 adding --no-sandbox and then getting that error will be fixed when they release 1.79.2 for #184687 which will hopefully be tomorrow.

@erikadanis0312
Copy link

Upgraded to 1.79.2 and im still getting the same error.

@Infarinato
Copy link

Infarinato commented Jun 26, 2023

Upgraded to 1.79.2 and im still getting the same error.

I’m not. But I suspect you’ll need to use the —highly annoying--no-sandbox --disable-gpu-sandbox workaround… 🙄

@p3t3r5
Copy link

p3t3r5 commented Aug 29, 2023

I'm happy to have new argument in argv.json (disable-chromium-sandbox) :D but warning on edit persists: "Property disable-chromium-sandbox is not allowed."

@sahps
Copy link

sahps commented Sep 4, 2023

I'm running what I thought was a standard install. Version 1.18.1 (user setup). Not using UNC paths or accessing data on a network. The machine is domain-joined. If I try and run as an admin I get the "code 18" error as discussed at #185057

Verbose console output
[main 2023-09-04T11:15:12.023Z] PolicyConfiguration#initialize
[main 2023-09-04T11:15:12.025Z] PolicyConfiguration#updatePolicyDefinitions [
  'http.proxy',
  'http.proxyStrictSSL',
  'http.proxyKerberosServicePrincipal',
  'http.proxyAuthorization',
  'http.proxySupport',
  'http.systemCertificates',
  'telemetry.telemetryLevel',
  'telemetry.enableTelemetry',
  'update.mode',
  'update.channel',
  'update.enableWindowsBackgroundUpdates',
  'update.showReleaseNotes'
]
[main 2023-09-04T11:15:12.027Z] NativePolicyService#_updatePolicyDefinitions - Found 1 policy definitions
[main 2023-09-04T11:15:12.030Z] [File Watcher (node.js)] Request to start watching: c:\Users\user.name\AppData\Roaming\Code\User (excludes: <none>, includes: <all>),c:\Users\user.name\AppData\Roaming\Code\User\settings.json (excludes: <none>, includes: <all>)
[main 2023-09-04T11:15:12.031Z] NativePolicyService#_onDidPolicyChange - Updated policy values: {}
[main 2023-09-04T11:15:12.031Z] PolicyConfiguration#update [ 'update.mode' ]
[main 2023-09-04T11:15:12.041Z] Starting VS Code
[main 2023-09-04T11:15:12.042Z] from: c:\Program Files\Microsoft VS Code\resources\app
[main 2023-09-04T11:15:12.042Z] args: {
  _: [],
  diff: false,
  merge: false,
  add: false,
  goto: false,
  'new-window': false,
  'reuse-window': false,
  wait: false,
  help: false,
  'list-extensions': false,
  'show-versions': false,
  'pre-release': false,
  version: false,
  verbose: true,
  status: false,
  'prof-startup': false,
  'no-cached-data': false,
  'prof-v8-extensions': false,
  'disable-extensions': false,
  'disable-gpu': false,
  'disable-chromium-sandbox': false,
  'ms-enable-electron-run-as-node': false,
  telemetry: false,
  debugRenderer: false,
  'enable-smoke-test-driver': false,
  logExtensionHostCommunication: false,
  'skip-release-notes': false,
  'skip-welcome': false,
  'disable-telemetry': false,
  'disable-updates': false,
  'disable-keytar': false,
  'disable-workspace-trust': false,
  'disable-crash-reporter': false,
  'crash-reporter-id': 'd3cd63b1-4b41-4f4a-b105-cd982f6333af',
  'skip-add-to-recently-opened': false,
  'unity-launch': false,
  'open-url': false,
  'file-write': false,
  'file-chmod': false,
  force: false,
  'do-not-sync': false,
  trace: false,
  'force-user-env': false,
  'force-disable-user-env': false,
  'open-devtools': false,
  'disable-gpu-sandbox': false,
  '__enable-file-policy': false,
  'enable-coi': false,
  'no-proxy-server': false,
  'no-sandbox': false,
  nolazy: false,
  'force-renderer-accessibility': false,
  'ignore-certificate-errors': false,
  'allow-insecure-localhost': false,
  'disable-dev-shm-usage': false,
  'profile-temp': false,
  logsPath: 'C:\\Users\\user.name\\AppData\\Roaming\\Code\\logs\\20230904T121512'
}
[main 2023-09-04T11:15:12.042Z] Resolving machine identifier...
[main 2023-09-04T11:15:12.042Z] Resolved machine identifier: 99b47c228839f905f764065af7f0b0948087264693cbc43469f75fb2dd7b24df
[main 2023-09-04T11:15:12.043Z] Main->SharedProcess#connect
[main 2023-09-04T11:15:12.043Z] PolicyConfiguration#updatePolicyDefinitions [
  'terminal.integrated.automationProfile.linux',
  'terminal.integrated.automationProfile.osx',
  'terminal.integrated.automationProfile.windows',
  'terminal.integrated.profiles.windows',
  'terminal.integrated.profiles.osx',
  'terminal.integrated.profiles.linux',
  'terminal.integrated.useWslProfiles',
  'terminal.integrated.inheritEnv',
  'terminal.integrated.persistentSessionScrollback',
  'terminal.integrated.showLinkHover',
  'terminal.integrated.ignoreProcessNames'
]
[main 2023-09-04T11:15:12.043Z] PolicyConfiguration#updatePolicyDefinitions [
  'terminal.integrated.defaultProfile.linux',
  'terminal.integrated.defaultProfile.osx',
  'terminal.integrated.defaultProfile.windows'
]
[main 2023-09-04T11:15:12.047Z] PolicyConfiguration#update []
[main 2023-09-04T11:15:12.047Z] PolicyConfiguration#update []
[main 2023-09-04T11:15:12.052Z] StorageMainService: creating application storage
[main 2023-09-04T11:15:12.055Z] ElectronURLListener: waiting for window to be ready to handle URLs...
[main 2023-09-04T11:15:12.055Z] lifecycle (main): phase changed (value: 2)
[main 2023-09-04T11:15:12.055Z] windowsManager#open
[main 2023-09-04T11:15:12.056Z] windowsManager#open pathsToOpen [
  {
    backupPath: 'C:\\Users\\user.name\\AppData\\Roaming\\Code\\Backups\\1693824130872',
    remoteAuthority: undefined
  }
]
[main 2023-09-04T11:15:12.056Z] windowsManager#doOpenEmpty {
  restore: true,
  remoteAuthority: undefined,
  filesToOpen: undefined,
  forceNewWindow: true
}
[main 2023-09-04T11:15:12.057Z] IPC Object URL: Registered new channel vscode:26fc8e76-2540-4841-a0c8-39557808a3e6.
[main 2023-09-04T11:15:12.057Z] window#validateWindowState: validating window state on 3 display(s) { mode: 0, x: 694, y: 412, width: 960, height: 1040 }
[main 2023-09-04T11:15:12.057Z] window#validateWindowState: multi-monitor working area { x: 0, y: 0, width: 3440, height: 1400 }
[main 2023-09-04T11:15:12.057Z] window#ctor: using window state { mode: 0, x: 694, y: 412, width: 960, height: 1040 }
[main 2023-09-04T11:15:12.101Z] window#load: attempt to load window (id: 1)
[main 2023-09-04T11:15:12.115Z] windowsManager#open used window count 1 (workspacesToOpen: 0, foldersToOpen: 0, emptyToRestore: 1, emptyToOpen: 0)
[main 2023-09-04T11:15:12.116Z] lifecycle (main): phase changed (value: 3)
[main 2023-09-04T11:15:12.119Z] resolveShellEnv(): skipped (Windows)
[main 2023-09-04T11:15:12.120Z] update#setState idle
Renderer process launch-failed - see https://www.electronjs.org/docs/tutorial/application-debugging for potential debugging information.
[main 2023-09-04T11:15:12.157Z] CodeWindow: renderer process gone (reason: launch-failed, code: 18)
Renderer process launch-failed - see https://www.electronjs.org/docs/tutorial/application-debugging for potential debugging information.
[main 2023-09-04T11:15:12.221Z] CodeWindow: renderer process gone (reason: launch-failed, code: 18)
[main 2023-09-04T11:15:12.225Z] [File Watcher (node.js)] Started watching: 'c:\Users\user.name\AppData\Roaming\Code\User'
[main 2023-09-04T11:15:12.226Z] [File Watcher (node.js)] Started watching: 'c:\Users\user.name\AppData\Roaming\Code\User\settings.json'
[main 2023-09-04T11:15:12.292Z] [File Watcher (node.js)] [raw] ["change"] globalStorage
[main 2023-09-04T11:15:12.292Z] [File Watcher (node.js)] [CHANGED] c:\Users\user.name\AppData\Roaming\Code\User\globalStorage
[main 2023-09-04T11:15:12.293Z] [File Watcher (node.js)] [raw] ["change"] globalStorage
[main 2023-09-04T11:15:12.293Z] [File Watcher (node.js)] [CHANGED] c:\Users\user.name\AppData\Roaming\Code\User\globalStorage
[main 2023-09-04T11:15:12.371Z] [File Watcher (node.js)] >> normalized [CHANGED] c:\Users\user.name\AppData\Roaming\Code\User\globalStorage
[main 2023-09-04T11:15:12.371Z] User data changed
[main 2023-09-04T11:15:14.616Z] IPC Object URL: Removed channel vscode:26fc8e76-2540-4841-a0c8-39557808a3e6.
[main 2023-09-04T11:15:14.617Z] Lifecycle#window.on('closed') - window ID 1
[main 2023-09-04T11:15:14.617Z] Lifecycle#onWillShutdown.fire()
[main 2023-09-04T11:15:14.620Z] Lifecycle#onWillShutdown - begin 'instanceLockfile'
[main 2023-09-04T11:15:14.620Z] storageMainService#onWillShutdown()
[main 2023-09-04T11:15:14.621Z] Lifecycle#onWillShutdown - begin 'applicationStorage'
[main 2023-09-04T11:15:14.621Z] Lifecycle#onWillShutdown - begin 'extHostStarter'
[main 2023-09-04T11:15:14.621Z] Lifecycle#app.on(window-all-closed)
[main 2023-09-04T11:15:14.621Z] Lifecycle#app.on(before-quit)
[main 2023-09-04T11:15:14.622Z] Lifecycle#onBeforeShutdown.fire()
[main 2023-09-04T11:15:14.622Z] [WindowsStateHandler] onBeforeShutdown {
  lastActiveWindow: {
    workspaceIdentifier: undefined,
    folder: undefined,
    backupPath: 'C:\\Users\\user.name\\AppData\\Roaming\\Code\\Backups\\1693824130872',
    remoteAuthority: undefined,
    uiState: [Object: null prototype] {
      mode: 0,
      x: 694,
      y: 412,
      width: 960,
      height: 1040
    }
  },
  lastPluginDevelopmentHostWindow: undefined,
  openedWindows: []
}
[main 2023-09-04T11:15:14.623Z] Lifecycle#app.on(will-quit) - begin
[main 2023-09-04T11:15:14.625Z] Lifecycle#onWillShutdown - end 'extHostStarter'
[main 2023-09-04T11:15:14.637Z] [File Watcher (node.js)] Request to stop watching: c:\Users\user.name\AppData\Roaming\Code\User,c:\Users\user.name\AppData\Roaming\Code\User\settings.json
[main 2023-09-04T11:15:14.638Z] [File Watcher (node.js)] stopping file watcher on c:\Users\user.name\AppData\Roaming\Code\User
[main 2023-09-04T11:15:14.638Z] [File Watcher (node.js)] stopping file watcher on c:\Users\user.name\AppData\Roaming\Code\User\settings.json
[main 2023-09-04T11:15:14.643Z] Lifecycle#onWillShutdown - end 'instanceLockfile'
[main 2023-09-04T11:15:14.647Z] StorageMainService: closed application storage
[main 2023-09-04T11:15:14.647Z] Lifecycle#onWillShutdown - end 'applicationStorage'
[main 2023-09-04T11:15:14.648Z] Lifecycle#app.on(will-quit) - after fireOnWillShutdown
[main 2023-09-04T11:15:14.648Z] Lifecycle#app.on(will-quit) - calling app.quit()

Edit: --no-sandbox --disable-gpu-sandbox is a workaround.

@rhewy
Copy link

rhewy commented Sep 7, 2023

Although I can get VSCode to launch with the command line options given above on a VDI image, how can I make that the default so that no matter how an end-user opens VSCode the switches above are applied. Right now, I just tweak the shortcut.

The reason I ask is that I have Azure Data Studio on the same VDI and it opens fine every time. So, somehow they were able to set that as the default.

@zEdS15B3GCwq
Copy link

zEdS15B3GCwq commented Sep 14, 2023

Just a heads-up that 1.82.1 now needs code --no-sandbox --disable-gpu-sandbox --user-data-dir=/tmporsomethingsimilar to run, previous versions ran with only --no-sandbox supplied. System install on Win11 with applocker, running in administrator user's elevated prompt. I used an empty folder for user data dir as I'm only running it as admin to allow a system-wide update.

@amalic
Copy link

amalic commented Sep 28, 2023

I am having the same issue as described in #128649 on OS-X in Version 1.82.2

@dawidK5
Copy link

dawidK5 commented Sep 30, 2023

On Windows 11 (v1.82.2) with standard install, there is a workaround:

  1. Pin vscode to the taskbar.
  2. Right click the icon there -> New Window.
  3. For that session the WebViews load fine, I didn't see any warnings/errors.

@drakeredwind01
Copy link

I was having this problem as well.

reproduce:
fresh install of vscode,
install plugin "Graphviz Interactive Preview"
used Fullscreen (IDK if this mattered)
added to the document, when I put in "" for "\n" in 'label="" ' immediately got the error bellow (null function or function signature mismatch):
image_2024-02-21_085417977
tried refreshing after completing "\n" label error remained
fixed after close and restart
tried again only put in "" immediate error
put in "\n" restarted, "Graphviz Interactive Preview" window will not open.
tried to restart as admin no change.
tried fix read about on GitHub (pin to start and open new window) no change
still can't open "Graphviz Interactive Preview"

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 chromium Issues and items related to Chromium sandbox Running VSCode in a node-free environment webview Webview issues windows VS Code on Windows issues workbench-run-as-admin Issues concerning running as administrator
Projects
None yet
Development

No branches or pull requests