macOS 'The application cannot be opened' error fix
Quick answer for advanced users: this is almost always a code signing or quarantine flag issue. Here's how to nuke it.
Quick answer for advanced users
Open Terminal and run: xattr -d com.apple.quarantine /path/to/App.app then try launching again. If that fails, run sudo codesign --force --deep --sign - /path/to/App.app. That fixes 90% of these errors.
Why this happens
macOS 10.15 Catalina and later (including Monterey, Ventura, Sonoma, Sequoia) added stricter Gatekeeper checks for all apps. When you download an app from outside the Mac App Store — or even from a trusted developer site — macOS slaps a quarantine attribute on it. The first time you try to open it, Gatekeeper checks the app's code signature against Apple's notarization service. If the signature is missing, expired, or the app was modified after signing, you get the 'The application cannot be opened' error. The culprit here is almost always a corrupted download, a moved app bundle, or an unsigned application that didn't get properly notarized.
I've seen this exact error on at least 50 machines over the last four years. It happens most often with older apps that the developer never updated for Apple Silicon or for newer macOS versions. Also happens when you copy an app from a Time Machine backup or another Mac — the quarantine flag gets duplicated but the code signature context doesn't.
Fix steps
- First, check the app's quarantine status in Terminal. Run this command:
xattr -l /Applications/ProblemApp.app
Look forcom.apple.quarantinein the output. If it's there, that's the problem. - Remove the quarantine flag with:
xattr -d com.apple.quarantine /Applications/ProblemApp.app
Replace the path with your app's actual location. Drag the app icon into the Terminal window to get the correct path — saves typos. - Try launching the app again. Hold the Control key and click the app icon, then select 'Open' from the context menu. macOS will ask for confirmation once — click 'Open' again. That bypasses the initial Gatekeeper check.
- Still broken? Re-sign the app manually. Run:
sudo codesign --force --deep --sign - /Applications/ProblemApp.app
This signs the app with an ad-hoc signature. It won't pass Apple's notarization, but it'll let you run the app locally. You'll need to enter your admin password. - If the app still won't open, check it in System Settings > Privacy & Security. Scroll to the 'Security' section. You'll see a message like '“ProblemApp” was blocked from use because it is not from an identified developer.' Click 'Open Anyway' next to that message. This is effectively the same as removing the quarantine flag, but through the GUI.
- Last resort — redownload the app. Sometimes the download gets corrupted. Delete the app, empty the Trash, and download a fresh copy from the developer's site. Then repeat steps 1-3.
Alternative fix if you can't use Terminal
Some users — especially in corporate environments — can't use Terminal due to MDM restrictions. If that's you, try this: drag the app to a USB drive, then drag it back. That strips the quarantine flag on some macOS versions. Or right-click the app, select 'Show Package Contents', browse into Contents/MacOS, and double-click the executable binary inside. That launches the binary directly, bypassing Gatekeeper entirely. It won't create a proper app bundle experience, but it proves the app itself works.
Prevention tip
Don't download macOS apps from random file-sharing sites or torrents. Stick to the developer's official website or the Mac App Store. If you're a developer distributing unsigned apps, tell your users to run the xattr -d command after download. For your own machine, you can disable Gatekeeper entirely (not recommended for daily use) with sudo spctl --master-disable, but I wouldn't do that unless you're testing software. The quarantine flag gets stripped automatically if you open the app through the 'Open' context menu — that's the cleanest method.
Pro tip from years of field work: if the error says 'is damaged and can't be opened' instead of just 'cannot be opened', it's not a quarantine issue — it's a corrupted binary. Redownload it from a different mirror. Don't waste time with code signing.
Was this solution helpful?