microsoft / vscode

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

Search using Workspace #123276

Closed JordiOrriols closed 3 years ago

JordiOrriols commented 3 years ago

Issue Type: Bug

I cannot search using workspaces. It works if I open the folder directly, but not with workspaces. It's not just me, the whole team has the problem.

This has been broken more or less 2 months ago.

I get the error:

spawn /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg EACCESS

VS Code version: Code 1.55.2 (Universal) (3c4e3df9e89829dce27b7b5c24508306b151f30d, 2021-04-13T09:36:32.643Z) OS version: Darwin x64 19.6.0

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-8557U CPU @ 1.70GHz (8 x 1700)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|3, 3, 3| |Memory (System)|16.00GB (0.45GB free)| |Process Argv|--crash-reporter-id b283f12b-1ff3-430e-9d4f-2208f0bf3820| |Screen Reader|no| |VM|0%|
Extensions (23) Extension|Author (truncated)|Version ---|---|--- aws-toolkit-vscode|ama|1.24.0 cform|aws|0.0.24 vscode-eslint|dba|2.1.20 docs-markdown|doc|0.2.89 githistory|don|0.6.16 cloudformation-yaml-snippets|dst|3.14.0 gitlens|eam|11.4.1 prettier-vscode|esb|6.3.2 go|gol|0.24.2 workspacesort|ici|1.6.0 vscode-cfn-lint|kdd|0.18.1 dotenv|mik|1.0.1 vscode-docker|ms-|1.12.1 remote-containers|ms-|0.166.1 vscode-typescript-tslint-plugin|ms-|1.3.3 debugger-for-chrome|msj|4.12.12 vscode-react-native|msj|1.4.2 vscode-groovy-lint|Nic|1.4.0 vscode-versionlens|pfl|1.0.9 vscode-commons|red|0.0.6 vscode-xml|red|0.16.0 vscode-yaml|red|0.18.0 vscode-stylelint|sty|0.86.0
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 pythonvspyt639:30291489 pythontb:30283811 vspre833cf:30267465 pythonptprofiler:30281270 vshan820:30294714 pythondataviewer:30285071 vscus158cf:30286554 ```
abernix commented 3 years ago

Does https://github.com/microsoft/vscode-remote-release/issues/5010 (which is using the Remote - SSH, but possibly similar as you're also using Remote stuff it seems?) sound like the same problem you're having?

roblourens commented 3 years ago

Please check the permissions on all your workspace folders, one of them probably has bad permissions. I just had a similar report, now I can't find the issue anywhere.

If that's not it, check the permissions on /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg

JordiOrriols commented 3 years ago

I'm not using remote, even I have installed the extension.

For the permissions on ripgrep I have:

-rwxr-xr-x 1 jorriols #### ####### Apr 13 12:17 /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg

For the workspace, just in case I applied chmod -R 755 . to my workspace. But this not fixed the issue.

I tried to reinstall vscode several times, even with the Insiders version without success.

I don't know why, but this only fails with workspaces, opening the folders separately it works, even the enclosing folder (witch should include all files on the workspace).

roblourens commented 3 years ago

Can you try removing the folders in the workspace one by one to see whether one causes the issue? You can also follow the steps here to get search logs to see whether there is anything useful there https://github.com/microsoft/vscode/wiki/Search-Issues

pseudocubic commented 3 years ago

I have the same issue and it is not related to specific folders for me, but any workspace that has more than one folder.

To test this I used a clean install with no modified settings or extensions installed. I created two new folders each with one text file with some ASCII text, and added them individually to my workspace, and attempted to search for the word "test", which does not exist in either of the files, and it gave me the same error.

This is intermittent; sometimes the search will succeed, sometimes not.

If I reduce the folders down to just one in the workspace, search always succeeds.

Below is an example of when a search fails from the console when running the Insiders build with code --verbose:

[main 2021-05-26T21:44:53.656Z] menubarService#updateMenubar 1
[21660:0526/154457.990919:INFO:CONSOLE(627)] "%cTRACE color: #888 KeybindingService#dispatch Enter undefined", source: file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[21660:0526/154457.993106:INFO:CONSOLE(627)] "%cTRACE color: #888 SearchService#search {"_reason":"searchView","folderQueries":[{"folder":{"$mid":1,"fsPath":"/Users/test/test1","external":"file:///Users/test/test1","path":"/Users/test/test1","scheme":"file"},"folderName":"test1","fileEncoding":"utf8","disregardIgnoreFiles":true,"disregardGlobalIgnoreFiles":true,"ignoreSymlinks":false},{"folder":{"$mid":1,"fsPath":"/Users/test/test2","external":"file:///Users/test/test2","path":"/Users/test/test2","scheme":"file"},"folderName":"test2","fileEncoding":"utf8","disregardIgnoreFiles":true,"disregardGlobalIgnoreFiles":true,"ignoreSymlinks":false}],"usingSearchPaths":false,"onlyOpenEditors":false,"maxResults":10000,"type":2,"contentPattern":{"pattern":"test","isRegExp":false,"isCaseSensitive":false,"isWordMatch":false,"wordSeparators":"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?"},"previewOptions":{"matchLines":1,"charsPerLine":1000},"usePCRE2":false,"userDisabledExcludesAndIgnoreFiles":true}", source: file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[21660:0526/154457.999486:INFO:CONSOLE(627)] "%cDEBUG background: #eee; color: #888 SearchService#search provideTextSearchResults test, {"folder":"file:///Users/test/test1","excludes":[],"includes":[],"useIgnoreFiles":false,"useGlobalIgnoreFiles":false,"followSymlinks":true,"encoding":"utf8","maxFileSize":17179869184,"maxResults":10000,"previewOptions":{"matchLines":1,"charsPerLine":1000},"usePCRE2":false}", source: file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[21660:0526/154457.999548:INFO:CONSOLE(627)] "%cDEBUG background: #eee; color: #888 SearchService#search /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg --hidden --ignore-case --max-filesize '17179869184' --no-ignore --follow --crlf --fixed-strings --no-config --no-ignore-global --json -- 'test' '.'
 - cwd: /Users/test/test1", source: file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[21660:0526/154458.057930:INFO:CONSOLE(627)] "%cDEBUG background: #eee; color: #888 SearchService#search provideTextSearchResults test, {"folder":"file:///Users/test/test2","excludes":[],"includes":[],"useIgnoreFiles":false,"useGlobalIgnoreFiles":false,"followSymlinks":true,"encoding":"utf8","maxFileSize":17179869184,"maxResults":10000,"previewOptions":{"matchLines":1,"charsPerLine":1000},"usePCRE2":false}", source: file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[21660:0526/154458.057997:INFO:CONSOLE(627)] "%cDEBUG background: #eee; color: #888 SearchService#search /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg --hidden --ignore-case --max-filesize '17179869184' --no-ignore --follow --crlf --fixed-strings --no-config --no-ignore-global --json -- 'test' '.'
 - cwd: /Users/test/test2", source: file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[21660:0526/154458.069608:INFO:CONSOLE(26)] "%cTRACE color: #888 profile not validated fish fish", source: file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js (26)
[21660:0526/154458.079535:INFO:CONSOLE(26)] "%cTRACE color: #888 profile not validated pwsh pwsh", source: file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js (26)
[21660:0526/154458.098583:INFO:CONSOLE(62)] "%c[IPC Library: Search] %cError: spawn /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg EACCES
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) color: blue color: ", source: file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js (62)
[21660:0526/154458.098647:INFO:CONSOLE(627)] "%cDEBUG background: #eee; color: #888 SearchService#search Error: spawn /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg EACCES", source: file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[21660:0526/154458.099658:INFO:CONSOLE(627)] "%cTRACE color: #888 SearchService#search: 102ms", source: file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[21660:0526/154458.099716:INFO:CONSOLE(627)] "%cTRACE color: #888 SearchService#searchError: spawn /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg EACCES", source: file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[21660:0526/154500.168802:INFO:CONSOLE(26)] "%cTRACE color: #888 profile not validated fish fish", source: file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js (26)
[21660:0526/154500.169278:INFO:CONSOLE(26)] "%cTRACE color: #888 profile not validated pwsh pwsh", source: file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js (26)

From inside vscode with log level set to Trace:

[2021-05-26 15:54:24.003] [renderer1] [trace] KeybindingService#dispatch ⌘A editor.action.selectAll
[2021-05-26 15:54:24.004] [renderer1] [trace] CommandService#executeCommand editor.action.selectAll
[2021-05-26 15:54:24.006] [renderer1] [trace] Command 'editor.action.selectAll' was handled by 'code-editor'.
[2021-05-26 15:54:34.122] [renderer1] [trace] KeybindingService#dispatch Enter undefined
[2021-05-26 15:54:34.128] [renderer1] [trace] SearchService#search {"_reason":"searchView","folderQueries":[{"folder":{"$mid":1,"fsPath":"/Users/test/test1","external":"file:///Users/test/test1","path":"/Users/test/test1","scheme":"file"},"folderName":"test1","fileEncoding":"utf8","disregardIgnoreFiles":true,"disregardGlobalIgnoreFiles":true,"ignoreSymlinks":false},{"folder":{"$mid":1,"fsPath":"/Users/test/test2","external":"file:///Users/test/test2","path":"/Users/test/test2","scheme":"file"},"folderName":"test2","fileEncoding":"utf8","disregardIgnoreFiles":true,"disregardGlobalIgnoreFiles":true,"ignoreSymlinks":false}],"usingSearchPaths":false,"onlyOpenEditors":false,"maxResults":10000,"type":2,"contentPattern":{"pattern":"test","isRegExp":false,"isCaseSensitive":false,"isWordMatch":false,"wordSeparators":"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?"},"previewOptions":{"matchLines":1,"charsPerLine":1000},"usePCRE2":false,"userDisabledExcludesAndIgnoreFiles":true}
[2021-05-26 15:54:34.135] [renderer1] [debug] SearchService#search provideTextSearchResults test, {"folder":"file:///Users/test/test1","excludes":[],"includes":[],"useIgnoreFiles":false,"useGlobalIgnoreFiles":false,"followSymlinks":true,"encoding":"utf8","maxFileSize":17179869184,"maxResults":10000,"previewOptions":{"matchLines":1,"charsPerLine":1000},"usePCRE2":false}
[2021-05-26 15:54:34.136] [renderer1] [debug] SearchService#search /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg --hidden --ignore-case --max-filesize '17179869184' --no-ignore --follow --crlf --fixed-strings --no-config --no-ignore-global --json -- 'test' '.'
 - cwd: /Users/test/test1
[2021-05-26 15:54:34.184] [renderer1] [debug] SearchService#search provideTextSearchResults test, {"folder":"file:///Users/test/test2","excludes":[],"includes":[],"useIgnoreFiles":false,"useGlobalIgnoreFiles":false,"followSymlinks":true,"encoding":"utf8","maxFileSize":17179869184,"maxResults":10000,"previewOptions":{"matchLines":1,"charsPerLine":1000},"usePCRE2":false}
[2021-05-26 15:54:34.184] [renderer1] [debug] SearchService#search /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg --hidden --ignore-case --max-filesize '17179869184' --no-ignore --follow --crlf --fixed-strings --no-config --no-ignore-global --json -- 'test' '.'
 - cwd: /Users/test/test2
[2021-05-26 15:54:34.232] [renderer1] [debug] SearchService#search Error: spawn /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg EACCES
[2021-05-26 15:54:34.232] [renderer1] [trace] SearchService#search: 97ms
[2021-05-26 15:54:34.232] [renderer1] [trace] SearchService#searchError: spawn /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg EACCES

The permissions on /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg are:

-rwxr-xr-x 1 test staff 9011648 May 26 00:00 rg

Vscode Info:

Version: 1.57.0-insider (Universal) Commit: a18ea9c9ec25c59e599ba3c2eb668315546dd269 Date: 2021-05-26T05:13:32.401Z Electron: 12.0.9 Chrome: 89.0.4389.128 Node.js: 14.16.0 V8: 8.9.255.25-electron.0 OS: Darwin x64 20.4.0

roblourens commented 3 years ago

What happens if you run those same commands manually in a terminal? (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg --hidden --ignore-case --max-filesize '17179869184' --no-ignore --follow --crlf --fixed-strings --no-config --no-ignore-global --json -- 'test' '.' in cwd: /Users/test/test1)

pseudocubic commented 3 years ago
❯ /Applications/Visual\ Studio\ Code\ -\ Insiders.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg --hidden --ignore-case --max-filesize '17179869184' --no-ignore --follow --crlf --fixed-strings --no-config --no-ignore-global --json -- 'test' '.'
{"data":{"elapsed_total":{"human":"0.004089s","nanos":4088880,"secs":0},"stats":{"bytes_printed":0,"bytes_searched":0,"elapsed":{"human":"0.000000s","nanos":0,"secs":0},"matched_lines":0,"matches":0,"searches":0,"searches_with_match":0}},"type":"summary"}
wilrodriguez commented 3 years ago

I'm getting this error on Version 1.57 any time that I try and search anything in my workspace. I don't have the issue with single repos, or even in a workspace with only one repo, but across multiple, I get it every time.

System info:

Version: 1.57.0 (Universal) Commit: b4c1bd0a9b03c749ea011b06c6d2676c8091a70c Date: 2021-06-09T17:22:31.215Z Electron: 12.0.9 Chrome: 89.0.4389.128 Node.js: 14.16.0 V8: 8.9.255.25-electron.0 OS: Darwin x64 19.6.0

Full error from the window log:

[2021-06-14 15:55:49.922] [renderer1] [error] spawn /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg EACCES: Error: spawn /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg EACCES
    at Object.M [as deserializeSearchError] (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2006:5630)
    at file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2009:5041
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2009:3078
wilrodriguez commented 3 years ago

Is there a way to get this issue reopened? I and several of my co-workers are having this issue and it's pretty darn annoying being unable to use our workspace search.

roblourens commented 3 years ago

This is probably related to permissions on these workpaces, could also be that the permissions on the rg binary got messed up for some reason. Can you double check those things and share the search logs? There is really nothing different about running rg in two folders vs one, we spawn one process for each.

pseudocubic commented 3 years ago

As I mentioned in my comment above, it doesn't seem to be permissions related; I created all new folders to test this, ensured that the permissions on each folder was identical, and posted the permissions of the ripgrep binary included with vscode there as well.

I have also tested a rg binary from a different source by replacing the one in the app bundle, with the same result: sometimes the search works, sometimes it does not.

I have also tested this on a completely different Mac with the same results

roblourens commented 3 years ago

Are you on a mac with the M1 chip, or intel?

Assuming it's intel, could you try the intel vscode build instead of Universal? https://code.visualstudio.com/#alt-downloads > "Intel Chip"

I don't have a specific reason to think that would be different but I am very confused.

pseudocubic commented 3 years ago

Intel. I replaced the app bundle with the Intel version just now, and there's no effect on this bug

wilrodriguez commented 3 years ago

So... after an update to 1.57.1 AND a reboot, this is working for me again. My co-workers no longer have the issue either. It's worth noting the reboot was necessary, just upgrading and even reinstalling did not fix it, but the reboot did. I have no idea why.

pseudocubic commented 3 years ago

This morning I tried the following:

I still experience the bug

I also tried doing this from my Admin account (I typically work from within a Standard User account), and also no effect on the bug

I did notice that the search worked the first time right after loading the application after nuking settings and reinstalling the application, but would go back to failing intermittently after that, but that could just be coincidence (small sample size).

Some other small observations

pseudocubic commented 3 years ago

I confirmed that each of the failing searches are all successful if i execute them from the command line rather than from within the vscode search panel.

I looked at the traces of a failing search vs a successful one (without "Use Exclude Settings and Ignore Files" enabled), and they look identical in the logs.

wilrodriguez commented 3 years ago

So... our issue could be different. On 1.57.1 the error keeps coming back for me. It works fine after a reboot... sometimes. But then the error eventually comes back again, and then there's some reboots that don't make the issue go away at all. My coworkers are also seeing this same behavior. I wonder if it could be related to our antivirus or something similar. We're using cylance @pseudocubic are you running an AV scanner?

EDIT: I've rebooted a few times, it's now permanently broken again apparently.

pseudocubic commented 3 years ago

I have tested both with and without an antivirus installed (Symantec Endpoint Protection), and it doesn't seem to change the behavior I observe

wilrodriguez commented 3 years ago

I'm now on 1.58.0 and still the problem persists, so that's something too.

wilrodriguez commented 3 years ago

Another bit of interesting behavior I just noticed. I created a new workspace and added all my projects back to it. Global search worked perfectly fine for a few hours and then stopped working and won't come back 😅

roblourens commented 3 years ago

Sorry for not being helpful but I'm stumped. This sort of behavior

Global search worked perfectly fine for a few hours and then stopped working and won't come back

Really points towards something external to me. I should have mentioned antivirus earlier since it's so often behind these weird issues. Sounds like that is not in play in your case @pseudocubic? Is this still some corporate managed device though?

pseudocubic commented 3 years ago

Yes it is a managed device, using Jamf. I am at a bit of a loss though what policy would cause this behavior, particularly after I removed the antivirus and the problem keeps persisting.

roblourens commented 3 years ago

It seems like something doesn't want us to spawn multiple instances of rg simultaneously, but is ok with spawning it one by one...

pseudocubic commented 3 years ago
error   13:43:43.431963-0600    kernel  mcxalr{296} [ERROR] msleep waiting for client reply (uid:502 seqid:2264 path:/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg) failed (-1).  Result: -1
error   13:43:43.431982-0600    kernel  mcxalr{297} [ERROR] Unable to check with client for uid=502  path=/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg
default 13:43:43.431987-0600    kernel  mcxalr{298} ** Denying execute for uid=502  path=/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg

This is from the system console when I attempt to search a multifolder workspace

pseudocubic commented 3 years ago

weird breakthrough: if i create a symlink to the ripgrep binary that i installed via homebrew at /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg, replacing the bundled ripgrep binary, search seems to work every time so far

I wonder if we had the ability to set the ripgrep binary path in a setting somewhere if that could fix it?

roblourens commented 3 years ago

Never heard of mcxalr before but it seems to be able to restrict a user's ability to launch some apps. What do you see if you run mcxquery?

pseudocubic commented 3 years ago
com.apple.applicationaccess.new
    whiteList  myusername (User)  always  (
        {   
            "_IsOverride" = 1; 
            appID = {length = 72, bytes = 0xfade0c00 00000048 00000001 00000006 ... 6c617973 00000003 }; 
            bundleID = "com.apple.preference.displays.MirrorDisplays"; 
            displayName = MirrorDisplays; 
            path = "/System/Library/PreferencePanes/Displays.prefPane/Contents/Resources/MirrorDisplays.app"; 
        }, 
        { 
            "_IsOverride" = 1; 
            appID = {length = 52, bytes = 0xfade0c00 00000034 00000001 00000006 ... 69700000 00000003 }; 
            bundleID = "com.apple.controlstrip"; 
            displayName = ControlStrip; 
            path = "/System/Library/CoreServices/ControlStrip.app"; 
        }, 
        { 
            "_IsOverride" = 1; 
            appID = {length = 64, bytes = 0xfade0c00 00000040 00000001 00000006 ... 696f6e00 00000003 }; 
            bundleID = "com.apple.FaceTime.IntentsExtension"; 
            displayName = FaceTimeIntentsExtension; 
            path = "/System/Applications/FaceTime.app/Contents/PlugIns/FaceTimeIntentsExtension.appex/Contents/MacOS/FaceTimeIntentsExtension"; 
        }, 
        { 
            "_IsOverride" = 1; 
            appID = {length = 64, bytes = 0xfade0c00 00000040 00000001 00000006 ... 696f6e00 00000003 }; 
            bundleID = "com.apple.FaceTime.IntentsExtension"; 
            displayName = FaceTimeIntentsExtension; 
            path = "/System/Applications/FaceTime.app/Contents/PlugIns/FaceTimeIntentsExtension.appex/Contents/MacOS/FaceTimeIntentsExtension"; 
        }, 
        { 
            "_IsOverride" = 1; 
            appID = {length = 72, bytes = 0xfade0c00 00000048 00000001 00000006 ... 6c617973 00000003 }; 
            bundleID = "com.apple.preference.displays.MirrorDisplays"; 
            displayName = MirrorDisplays; 
            path = "/System/Library/PreferencePanes/Displays.prefPane/Contents/Resources/MirrorDisplays.app"; 
        }, 
        { 
            "_IsOverride" = 1; 
            appID = {length = 48, bytes = 0xfade0c00 00000030 00000001 00000006 ... 6d650000 00000003 }; 
            bundleID = "com.apple.FaceTime"; 
            displayName = FaceTime; 
            path = "/System/Applications/FaceTime.app"; 
            subApps =         ( 
                { 
                    appID = {length = 64, bytes = 0xfade0c00 00000040 00000001 00000006 ... 696f6e00 00000003 }; 
                    bundleID = "com.apple.FaceTime.IntentsExtension"; 
                    displayName = FaceTimeIntentsExtension; 
                    path = "/System/Applications/FaceTime.app/Contents/PlugIns/FaceTimeIntentsExtension.appex/Contents/MacOS/FaceTimeIntentsExtension"; 
                }, 
                { 
                    appID = {length = 60, bytes = 0xfade0c00 0000003c 00000001 00000006 ... 7567496e 00000003 }; 
                    bundleID = "com.apple.FaceTimeDockTilePlugIn"; 
                    displayName = FaceTime; 
                    path = "/System/Applications/FaceTime.app/Contents/PlugIns/FaceTime.docktileplugin/Contents/MacOS/FaceTime"; 
                }, 
                { 
                    appID = {length = 80, bytes = 0xfade0c00 00000050 00000001 00000006 ... 76696365 00000003 }; 
                    bundleID = "com.apple.FaceTime.FaceTimeNotificationCenterService"; 
                    displayName = FaceTimeNotificationCenterService; 
                    path = "/System/Applications/FaceTime.app/Contents/XPCServices/FaceTimeNotificationCenterService.xpc/Contents/MacOS/FaceTimeNotificationCenterService"; 
                } 
            );
        }, 
        { 
            "_IsOverride" = 1; 
            appID = {length = 52, bytes = 0xfade0c00 00000034 00000001 00000006 ... 69700000 00000003 }; 
            bundleID = "com.apple.controlstrip"; 
            displayName = ControlStrip; 
            path = "/System/Library/CoreServices/ControlStrip.app"; 
        }, 
        { 
            "_IsOverride" = 1; 
            appID = {length = 72, bytes = 0xfade0c00 00000048 00000001 00000006 ... 6c617973 00000003 }; 
            bundleID = "com.apple.preference.displays.MirrorDisplays"; 
            displayName = MirrorDisplays; 
            path = "/System/Library/PreferencePanes/Displays.prefPane/Contents/Resources/MirrorDisplays.app"; 
        }
    )
roblourens commented 3 years ago

Nothing that looks suspicious there, but I don't know what to expect. I get Error 'no data found'.

The Unable to check with client message in the log you posted is suspicious. Seems like something is going wrong.

pseudocubic commented 3 years ago

I think the mcxalr messages are a mislead, I still get those messages with the homebrew-installed ripgrep, but it works fine.

The only thing that has worked consistently is the method of symbolic linking to a binary outside of the app bundle, and it doesn't have to be a binary installed with homebrew; both removing the bundled ripgrep and symbolic linking homebrew-installed ripgrep binary works, or alternatively moving the binary from inside the app bundle to anywhere on my system, and symbolic linking to it, also makes it work.

It therefore seems related to the binary being inside of the vscode app bundle (particularly with the Julia-1.6 error I now see)

pseudocubic commented 3 years ago

It might also be related to how Electron spawns child processes; searching the issues there I saw some things that sound vaguely related but not quite exactly what we are experiencing.

roblourens commented 3 years ago

I think it's got to be some permissions on processes from certain folders. What if you try running vscode from some other folder in your home dir, or some other folder like /vscode?

pseudocubic commented 3 years ago

So far the only place I have gotten it to work is under /usr/local. It does not work inside any home directory or under /Applications. Note that default macOS security settings do not allow creating folders under /, unless SIP is disabled.

I guess this probably means there is a security setting (since we have all checked folder permissions pretty extensively) that blocks multiple calls to the same binary inside of an App bundle in those locations (since a single folder workspace does not experience this issue).

That said, I can't see any Profiles that were added by my organization that would affect this behavior differently than base macOS, so I'm still at a loss on how to make VSCode work from within the /Applications folder, where it belongs

roblourens commented 3 years ago

Have you tried checking with someone in your organization's IT department who would know how devices are configured?

However running vscode from /usr/local might not be a bad workaround, assuming everything else works. How about a symlink from /usr/local to /Applications?