Skip to content

Instantly share code, notes, and snippets.

@zx0r
Last active April 27, 2025 14:21
Show Gist options
  • Save zx0r/bfb03caf6a7d6bcd86037978d416e19a to your computer and use it in GitHub Desktop.
Save zx0r/bfb03caf6a7d6bcd86037978d416e19a to your computer and use it in GitHub Desktop.
Fix Code Signing Issues in VSCode/VSCodium on macOS
# Step-by-Step Guide to Fix Code Signing Issues in VSCode/VSCodium on macOS
# This guide provides step-by-step instructions to resolve the code-signing error in VSCodium, which appears as:

codium
# [0427/140803.667468:ERROR:codesign_util.cc(109)] SecCodeCheckValidity: Error Domain=NSOSStatusErrorDomain Code=-67062 "(null)" (-67062)

brew list --cask vscodium
# ==> App
# ~/Applications/VSCodium.app (2,235 files, 364.8MB)
# ==> Binary
# /usr/local/bin/codium -> /Users/<user>/Applications/VSCodium.app/Contents/Resources/app/bin/codium (1.1KB)

# Step 1: Update Homebrew and Upgrade Installed Casks
brew update && brew upgrade

# Step 2: Remove Existing VSCodium Installation
brew uninstall --cask vscodium

# (Optional): 
# rm -rf $HOME/Applications/VSCodium.app
# rm -rf $HOME/Library/Application\ Support/VSCodium
# rm -rf $HOME/Library/Caches/com.visualstudio.code.oss

# Step 3: Reinstall VSCodium
brew install --cask vscodium

# Step 4: Confirm that VSCodium is installed correctly
codium --version
# If you see the error `SecCodeCheckValidity: Error Domain=NSOSStatusErrorDomain`, proceed to the next steps.

# Step 5: Check the CLI Symbolic Link
ls -l $(which codium)
# lrwx------  1 <user>  admin  70 <date> /usr/local/bin/codium -> /Users/<user>/Applications/VSCodium.app/Contents/Resources/app/bin/codium

# If the path is incorrect, check the actual installation location with:
brew list --cask vscodium

# Step 6: macOS may fail to verify the app's signature
sudo codesign --force --deep --sign - "$HOME/Applications/VSCodium.app"

# Step 7: Verify the Signature
codesign -dv --verbose=4 $HOME/Applications/VSCodium.app

# Step 8 (Optional): Remove Extended Attributes
# xattr -l $HOME/Applications/VSCodium.app
# xattr -r -d com.apple.quarantine $HOME/Applications/VSCodium.app
# xattr -r -d com.apple.macl $HOME/Applications/VSCodium.app

# Step 9: Grant Terminal Full Disk Access
# Sometimes, macOS security restrictions can prevent the Terminal from executing certain commands or modifying applications. 
# To grant full disk access to Terminal:
# 1. Open **System Settings** (or **System Preferences** on older macOS versions).
# 2. Navigate to **Privacy & Security** > **Full Disk Access**.
# 3. Click the lock icon in the bottom-left corner to make changes.
# 4. Find **Terminal** in the list and enable the checkbox next to it.
#    - If **Terminal** is not listed, click the **+** button, go to `/System/Applications/Utilities/` and select `Terminal.app`.
# 5. Close the settings window to apply the changes.
# After granting full disk access, retry the steps above.

# Step 10: Verify that the application works correctly
codium --version
# 1.99.32704
# 49c135149981f1416257ad8fad6c355ef9dad22d
# x64

# Conclusion
# If the application works without errors, the issue is resolved. 
# If the problem persists, double-check the steps or consult the VSCodium documentation.
# Happy coding!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment