How to Fix “The Application Can’t Be Opened” on Mac


Few things are more frustrating than a vague error message, especially if it prevents you from running a game or an app you’ve just installed. macOS likes to throw these errors at you from time to time, in the name of system security. So what can you do about it?

What the Error Looks Like

I encountered this error myself just a few weeks ago, with a game I bought on itch.io. When you’ve just made a purchase and are keen to get started with a new app, the last thing you want is to be confronted by this confusing error message:

A macOS error message reading “The application Double Trip.app can’t be opened.“

That’s it: macOS gives you an “OK” button to close the error, after which you can either try again or give up. Unfortunately, trying again will not help; you’ll need to know the following trick to get your app up and running.

You should only ever see this error the first time you run an app. Once you’ve fixed it, it shouldn’t ever affect the same app again.

How to Fix This Annoying Error

Start by opening a terminal app. The default that comes with macOS is Terminal (Applications > Utilities > Terminal), which is fine, although there are better alternatives.

Related


The Default Mac Terminal is Boring, Try These 6 Apps Instead

Don’t settle for boring when there are so many excellent macOS Terminal alternatives out there.

When you run Terminal, you should see a blank window looking something like this:

A new terminal window on macOS showing a prompt at the user’s home directory.

Exactly what you’ll see depends on your username and computer name, but the prompt at the beginning of the line should have a tilde (~) near the end of it. This represents your home directory, which is the default location.

Now, use the cd command to change your current directory to /Applications:

        cd /Applications

Type this command and press Enter to run it. You should notice that your prompt changes to read “/Applications” near the end:

A macOS terminal showing the result of changing directory to /Applications.

Next, locate the relevant app folder within your Applications directory. This should be the name of your app with “.app” at the end, and may include spaces. If you’re not sure of the name, try listing the contents of the Applications directory first:

        ls
A terminal in macOS listing the contents of the Applications directory.

In my case, the problematic app is called Double Trip and I can see Double Trip.app listed in the first column. To get more info about the file, type:

        ls -ld 

So, in my case, that was ls -ld Double\ Trip.app:

A macOS terminal showing a long listing for a specific file, with permission letters at the beginning.

You have two options to deal with spaces in the filename. First, you can quote the full name, e.g. ls -ld “Double Trip.app”. Second, you can escape each space by placing a backslash just before it, e.g. ls -ld Double\ Trip.app.

What you’re looking for here is an “x” instead of each hyphen at the beginning of the line. So instead of “drw-rw-rw-” you want to be seeing “drwxrwxrwx” alongside the filename. This indicates the folder is executable and will, therefore, work correctly. If you see the dashes instead, you can be certain this is the cause of the problem.

With confirmation of the problem, you can proceed to fix it. Run this command:

        chmod +x Double\ Trip.app

The “chmod” stands for “change mode” and the “+x” means “make executable.”

Now try running your application. If this was the only problem, then your app should open and run as intended—congratulations. If not, you may see a different error message.

Why Does an App Folder Need to Be Executable?

On macOS, an application is stored in a directory—the app folder, or package—which macOS presents as if it were a file. For example, in Finder, you’ll just see the app name and its icon, and double-clicking will start the app rather than opening its folder.

Related


How to Open a Mac App Package (And Why You’d Want To)

What’s in the box?

Like any file, you need the appropriate permissions to read it or write to it. The third type of permission is “execute,” which has special meaning for directories; essentially, it lets you enter them and view the files inside them.

Without this execute permission, an app simply fails to run. If you’re looking for someone to blame, look first at the app distributor who should have ensured the app folder was executable in the first place, then at Apple, who really should have a better error message for this case!

This error is similar to another that commonly causes problems when running a new app: “App Is Damaged and Can’t Be Opened.” In that case, the cause is Apple’s quarantine system, and the solution is a very different workaround.

Related


How to Fix “App Is Damaged and Can’t Be Opened” on Mac

Apple’s tight security protocols strike again.

Fortunately, you should rarely experience any other kind of bug, although there are ways to fix crashing Mac apps. You’re more likely to encounter older apps that haven’t been updated, including old games on Steam with no 64-bit support.

By admin

Deixe um comentário

O seu endereço de email não será publicado. Campos obrigatórios marcados com *