-
-
Notifications
You must be signed in to change notification settings - Fork 40
Troubleshooting Mac OS
There is a common error under Mac OS with apps modified or downloaded from the web.
When trying to run such an app you will see an error poping up telling you something like:
The application "Snap Camera" can't be opened
The actual cause and solution to the problem can vary depending on your system version.
This guide will help you to fix the error.
So make sure to read everything carefully.
Try to open the Snap Camera as described in this article: Open a Mac app from an unidentified developer
- Open the Finder.
- Locate the app.
- Ctrl-Click or right-click on the app.
- Select "Open" from the resultant menu.
If Snap Camera doesn't open continue with the steps below.
We will have to run a few commands on the Terminal application to fix the error.
You need to copy and execute the code highlighted at the end of each step.
First we have to make sure the binary file is executable.
This can be done with the chmod +x
command.
The binary of Snap Camera is located at /Applications/Snap Camera.app/Contents/Mac OS/Snap Camera
.
Run the command:
chmod +x "/Applications/Snap Camera.app/Contents/Mac OS/Snap Camera"
Code signing is a Mac OS feature preventing apps from running if they have been modified.
Since the binary is modified after patching the original signature is no longer valid.
We are going to remove the signature of the app (and eventually re-sign it in the final step down below).
Run the command:
sudo codesign --remove-signature "/Applications/Snap Camera.app"
Since macOS 10.5, files originating from the web are marked with com.apple.quarantine
via extended file attributes.
This can be another reason why the application won't open.
You can check if there are any extended attributes on the binary with the xattr
command e.g.:
xattr "/Applications/Snap Camera.app/Contents/Mac OS/Snap Camera"
We want to remove any extended file attributes of the entire app folder including all files recursively.
Run the command:
sudo xattr -cr "/Applications/Snap Camera.app"
Gatekeeper is a security technology in Mac OS that blocks all apps that are not downloaded from the App Store.
You can check if Gatekeeper is running with the command spctl --status
.
If you want to know if Snap Camera is allowed to run, use the command:
spctl -a "/Applications/Snap Camera.app"
If Gatekeeper is enabled we need to create an exception for Snap Camera.
Run the command:
sudo spctl --add "/Applications/Snap Camera.app"
At this point you should check your security and privacy settings in Mac OS.
The appearance of your "Security & Privacy" settings can differ from the screenshot below.
Pay attention to any additional messages indicating that Snap Camera is blocked.
The option "Allow apps downloaded from Anywhere" is hidden and disabled by default.
If you want to enable the "Anywhere" option you can do so with one of the following Terminal commands.
Be aware that the "Anywhere" setting is global and not limited to Snap Camera.
Depending on your system version you will have to run command a or b (try both of them).
Run command a.)
sudo spctl --master-disable
Run command b.)
sudo spctl --global-disable
If none of the above worked for you we can try one more thing.
Re-signing the application with the codesign
command.
Run the command:
sudo codesign --force --deep --sign - "/Applications/Snap Camera.app"
This should create a valid application signature.
You should now be able to open Snap Camera without an error message poping up.
If the app still won't open then write some hate mails to Apple for their inconsistent operating system.
If you are still having trouble or if you have any questions make sure to read these articles first.
- Extended File Attributes
- How to manage OS X Gatekeeper from the command line
- Open a Mac app from an unidentified developer
- If you can’t open an app on Mac
Check out Community Help for further questions.