microsoft / vscode

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

VSCode crashed with missing com.apple.security.automation.apple-events entitlement #107316

Closed marco-streng closed 4 years ago

marco-streng commented 4 years ago

Steps to Reproduce:

  1. Launch VSCode

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

After clicking on the VSCode icon or running code . on the console VSCode crashes immediately. I can see the icon jumping at the dock for less than a second.

The macOS console is logging the following error:

Prompting policy for hardened runtime; service: kTCCServiceAppleEvents requires entitlement com.apple.security.automation.apple-events but it is missing for ACC:{ID: com.microsoft.VSCode, PID[12775], auid: 501, euid: 501, binary path: '/Applications/Visual Studio Code.app/Contents/MacOS/Electron'}, REQ:{ID: com.apple.appleeventsd, PID[281], auid: 55, euid: 55, binary path: '/System/Library/CoreServices/appleeventsd'}

Thanks for your help!

marco-streng commented 4 years ago

I've tested the insiders build today -> it's running

lucasmotta commented 4 years ago

I am having the exact same issues with VSCode at the moment. Reinstalling it does not seem to help either.

deepak1556 commented 4 years ago

@marco-streng do you still see this issue ? vscode certainly doesn't send any apple events, the entitlement is certainly not required.

@lucasmotta are you seeing the same entitlement error ? If so can you provide the output of following

lucasmotta commented 4 years ago

Hey @deepak1556, that's correct I'm seeing the same error as @marco-streng. It's worth mentioning that I have VScode installed through brew cask, and after a couple tries and restarting my Mac, I got it working again - but I did experience this in the past a couple other times.

Here's the output of the commands you have requested:

--prepared:/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (GPU).app
--validated:/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (GPU).app
--prepared:/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app
--validated:/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app
--prepared:/Applications/Visual Studio Code.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/Current/.
--validated:/Applications/Visual Studio Code.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/Current/.
--prepared:/Applications/Visual Studio Code.app/Contents/Frameworks/Squirrel.framework/Versions/Current/.
--validated:/Applications/Visual Studio Code.app/Contents/Frameworks/Squirrel.framework/Versions/Current/.
--prepared:/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Renderer).app
--validated:/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Renderer).app
--prepared:/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app
--validated:/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app
--prepared:/Applications/Visual Studio Code.app/Contents/Frameworks/Mantle.framework/Versions/Current/.
--validated:/Applications/Visual Studio Code.app/Contents/Frameworks/Mantle.framework/Versions/Current/.
--prepared:/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/Current/.
--validated:/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/Current/.
/Applications/Visual Studio Code.app/: valid on disk
/Applications/Visual Studio Code.app/: satisfies its Designated Requirement
/Applications/Visual Studio Code.app/: accepted
source=Notarized Developer ID
origin=Developer ID Application: Microsoft Corporation (UBF8T346G9)

Thank you! :)

deepak1556 commented 4 years ago

It's worth mentioning that I have VScode installed through brew cask

thanks for the pointer, I don't have idea on how brew handles app installation, we don't officially maintain the code for vscode cask. I will go ahead and close this issue as there is nothing actionable at the moment.

the log looks good, next time you face this issue try to run the same commands and attach the output with new issue ticket. Thanks!