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 · 107 comments
Open

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

moward opened this issue May 4, 2021 · 107 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
Contributor

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
Contributor

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
Contributor

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
Contributor

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
Contributor

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?

@MaxCastella
Copy link

Hi,

Version: 1.69.0-insider (system setup) running elevated

  • Does Toggle Developer Tools command fails? YES
  • Does Help > Open Process Explorer returns an empty window? YES
  • Are you running the application under AppLocker? : YES
  • Errors in AppLocker Event Log? YES
    • %PROGRAMFILES%\MICROSOFT VS CODE INSIDERS\CODE - INSIDERS.EXE was prevented from running.
  • Does the issue happen with user data directory under %LOCALAPPDATA%? YES

Version: 1.69.0-insider (user setup) running elevated

  • Does Toggle Developer Tools command fails? YES
  • Does Help > Open Process Explorer returns an empty window? YES
  • Are you running the application under AppLocker? : YES
  • Errors in AppLocker Event Log? YES
    • %OSDRIVE%\USERS<userID>\APPDATA\LOCAL\PROGRAMS\MICROSOFT VS CODE INSIDERS\CODE - INSIDERS.EXE was prevented from running.
  • Does the issue happen with user data directory under %LOCALAPPDATA%? YES

Version: 1.69.0-insider (user setup) running non-elevated

  • Does Toggle Developer Tools command fails? NO
  • Does Help > Open Process Explorer returns an empty window? NO
  • Are you running the application under AppLocker? : YES
  • Errors in AppLocker Event Log? YES
    • %OSDRIVE%\USERS<userID>\APPDATA\LOCAL\TEMP\1__PSSCRIPTPOLICYTEST_MSQBRZZO.OLX.PS1 was prevented from running.
    • %OSDRIVE%\USERS<userID>\APPDATA\LOCAL\TEMP\1__PSSCRIPTPOLICYTEST_BUSQ1QRH.KML.PSM1 was prevented from running.
    • %OSDRIVE%\USERS<userID>\DOCUMENTS\WINDOWSPOWERSHELL\MICROSOFT.POWERSHELL_PROFILE.PS1 was prevented from running.
    • %OSDRIVE%\USERS<userID>.VSCODE-INSIDERS\EXTENSIONS\MS-VSCODE.POWERSHELL-PREVIEW-2022.6.3\MODULES\POWERSHELLEDITORSERVICES\POWERSHELLEDITORSERVICES.PSD1 was prevented from running.
  • Does the issue happen with user data directory under %LOCALAPPDATA%? YES

Version: 1.69.0-insider (user setup) running elevated with --no-sandbox

  • Does Toggle Developer Tools command fails? NO
  • Does Help > Open Process Explorer returns an empty window? NO
  • Are you running the application under AppLocker? : YES
  • Errors in AppLocker Event Log? NO
  • Does the issue happen with user data directory under %LOCALAPPDATA%? N/A

Hope this helps.

@deepak1556
Copy link
Contributor

This is helpful info, thanks @JustGuybrush . Running as elevated under applocker is not supported by the runtime, refs: https://bugs.chromium.org/p/chromium/issues/detail?id=740132. There seems to be a workaround implemented in the Edge browser https://textslashplain.com/2021/01/07/sandboxing-vs-elevated-browsing-as-administrator. If others in this issue are also running under similar setup then we will have to think about backporting the workaround for VSCode.

@MaxCastella
Copy link

MaxCastella commented Jul 4, 2022

Thanks @deepak1556. Sadly, AppLocker is mandatory in my company.

@deepak1556
Copy link
Contributor

@JustGuybrush in #122951 (comment) you had also tried to run the application as non-elevated. Is it not possible to use this mode by default ? Can you also provide context on why the application needs to be launched as elevated ?

@MaxCastella
Copy link

MaxCastella commented Jul 4, 2022

I use vscode to develop and debug PowerShell scripts. And because of AppLocker, PowerShell is run in Constrained Language Mode, disabling a lot of needed features. https://devblogs.microsoft.com/powershell/powershell-constrained-language-mode/

@JtMotoX
Copy link

JtMotoX commented Jul 16, 2022

I am also getting this error when trying to preview markdown with the new Visual Studio Code Server with serve-local.

Seems to work fine when running the server on macOS but getting this error when running on Ubuntu.

@galogm
Copy link

galogm commented Aug 9, 2022

I killed existing related processes, this works again for me.

ps aux | grep -i vscode | less
pkill -f vscode

I encountered this problem after upgrading vscode server and solved it by killing all existing vscode-server processes and restarting vscode all over.

In my case, this seems to be related to some conflicts between the upgrade operation and the previous processes.

@haugerbr
Copy link
Member

haugerbr commented Aug 9, 2022

@deepak1556 I get the following error when trying to launch the insiders build as an administrator.

image

@elvinagam
Copy link

Same issue on Ubuntu VSCode

@jcward
Copy link

jcward commented Oct 21, 2022

@elvinagam - did you try closing all vscode instances as noted here? For me, killall code - restart, and it started working again.

@elvinagam
Copy link

@jcward thanks for the heads up.

Looks like one has to close/restart all VSCode instances to make it work. Feels weird..

@cloudwitch
Copy link

Just had this issue. I closed two code windows, then quickly opened up another one that had a markdown preview already open and was unable to load the preview exactly like issue 128649. I closed the preview, opened a new one, same issue. Restarted code a few times, same error.

Finally I closed Code, ran ps -ef | grep -i code did not return any running instances. I let it sit for about 20 seconds, launched Code again, and was able to load the preview.

I'm on Ubuntu 22.04, installing from the apt repo, not using a Snap. Non-insiders.

Version: 1.73.0
Commit: 8fa188b2b301d36553cbc9ce1b0a146ccb93351f
Date: 2022-11-01T15:44:09.336Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Linux x64 5.15.0-52-generic
Sandboxed: No

@p3t3r5
Copy link

p3t3r5 commented Dec 1, 2022

In our company we have VSCode installed on networkdrive . Without --no-sandbox parameter VSCode won't start at all, even from context menu. It's a good workaround if it's possible to put the parameter in argv.json.

@mjbvz mjbvz added webview Webview issues and removed info-needed Issue requires more information from poster labels Dec 5, 2022
@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?

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