Visual Studio Code can't be opened because "Apple cannot check it for malicious software"

MacosVisual Studio-CodeMacos Catalina

Macos Problem Overview


I have downloaded Visual Studio Code for the first time but I keep getting message below:

apple error message when clicking on VSC app

> "Visual Studio Code" can't be opened because Apple cannot check it for malicious software. > > This software needs to be updated. Contact the developer for more information.

My MacBook is up to date, and I even updated the latest version of VSC on their website (September 2019 (version 1.39); there is none for October) but it still gave me the same message.

Looking into their FAQ, I read about reinstalling VS Code. I did that but it still doesn't work.

Macos Solutions


Solution 1 - Macos

macOS Catalina requires apps to be notarized by Apple. Your version of Visual Studio Code is yet to be updated by Microsoft for the new OS.

Please try the following:

> Right-click on the app and select Open.

If this did not work, remove the quarantine extended attribute that’s set on the app:

  1. Move the app to the Applications folder
  2. Open Terminal.app, then paste and execute the following command:

xattr -d com.apple.quarantine /Applications/Visual\ Studio\ Code.app

Solution 2 - Macos

If Right Click > Open doesn't open Visual Studio Code:

Another alternative can be simply navigating to System Preferences > Security & Privacy.

In the General tab, navigate and click Open Anyway button next to ("Visual Studio Code" was blocked from use because it is not from an identified source).

Security & Privacy

Solution 3 - Macos

The official issue for this is microsoft/vscode issue 74782 "Investigate: macOS notarization"

But, as noted in January 2020 iteration for VSCode 1.42:

> Extremely disappointed to see that #74782 won't be fixed until early February.

(it was supposed to be possibly done for January)

> First it was supposed to be fixed in November, then in December, and now it slips all the way to February.
This, for a feature (app notarization) first announced in 2018, for an operating system (Catalina) that has been available in beta for > six months and which went Gold in October, and which anyone who has purchased a new Mac since has no choice but to run.

> Yes, I realize there is a workaround to install on macOS Catalina, but I don't want to install a non-hardened app. Every other app I've needed / wanted to install on my new Mac was hardened and notarized on a timely basis.

Edit: Feb. 2020, now that VSCode 1.42 has been released, vscode commit c196df9 from João Moreno is supposed to solve this issue; from PR 86588.
João adds:

> Starting next week, insider builds should be properly notarized. ✔️

("insider builds" for the next 1.43 version)

VSCode 1.43 does mention:

> ## Notarized macOS Builds

> Visual Studio Code for macOS is finally notarized, so you should no longer see the following dialog:

> Notarization

> Read the investigation issue and Apple's developer documentation for more details.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJennifer EspinozaView Question on Stackoverflow
Solution 1 - MacosTzarView Answer on Stackoverflow
Solution 2 - MacosMikoView Answer on Stackoverflow
Solution 3 - MacosVonCView Answer on Stackoverflow