question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Apps Installed into /Applications on OSX Always Damaged

See original GitHub issue

After completing a build (app is fully signed) and uploading to a server I’m able to download the dmg and copy the app to the /Applications directory successfully. However, when attempting to run the app I receive the error message App is Damaged Can’t Be Opened with the options to cancel or move to trash.

If I change the install path to my specific user’s Applications directory in the config such as:

"osx": {
      "identity": "{my developer ID string}",
      "contents": [
        {
          "x": 410,
          "y": 220,
          "type": "link",
          "path": "/Users/myusername/Applications"
        },
        {
          "x": 130,
          "y": 220,
          "type": "file"
        }
      ]
    },

And go through the same process of upload/download and install I’m able to successfully run the application. It seems like there’s something going on with permissions for the root /Applications directory which brings up two questions:

  1. Is there a way to allow the app to run in the default /Applications directory with a setting or additional config?

  2. If that is not possible is there a way to specify to install in the User’s directory dynamically? I’ve tried setting path to $HOME/Applications but it did not work unfortunately.

Any insight you can offer would be greatly appreciated. Thanks!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ivanovitcommented, Jul 28, 2016

We had the same issue but we didn’t want to ask our users to restart their machines(also we didn’t have a mechanism to notify them). So we decided to add a symlink Electron -> AppName. Not the best option but this is our solution for now. This symlink can be created in the afterPack build option.


var Promise = require("bluebird"),
      fs = Promise.promisifyAll(require("fs"));

devMetadata: {
            build: {
                afterPack: function (params) {
                    var currentExecutable = params.options.productName,
                        appName = params.options.productName + ".app",
                        oldExecutable = path.join(params.appOutDir, appName, "Contents", "MacOS", "Electron");
                    return fs.symlinkAsync(currentExecutable, oldExecutable);
                }
            }
        }
1reaction
ccnokescommented, May 18, 2016

I’m having the same issue as @ractoon but restarting my computer did not clear it up, and unlike the issue in the electron-packager (https://github.com/electron-userland/electron-packager/issues/323 and here http://www.openradar.me/23614087), the CFBundleExecutable name didn’t change between builds. Am I missing something? I thought it was a server configuration issue because the dmg works directly off of our CI server but not when downloaded from a remote IIS server. Is that similar to what you were experiencing @ractoon?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix App “is damaged and can't be opened. You should ...
The first thing you should do to try and remedy the “app damaged” error message is to re-download the app to the Mac,...
Read more >
Fix: App Is Damaged and Cannot Be Opened on Mac
Your Mac may sometimes throw an annoying error message that says the app you're trying to launch is damaged and can't be opened....
Read more >
6 Fix “Application is Damaged, can't be used to install macOS ...
Method 1: Delete and Reinstall macOS System Installers​​ The simplest way to eliminate the Error, “This copy of the Install macOS . app...
Read more >
How to Fix “App Is Damaged and Can't Be Opened” on Mac
macOS takes an overzealous approach to security, with features like Gatekeeper attempting to limit software to the Mac App Store and System ...
Read more >
Safely open apps on your Mac - Apple Support
If your Mac is set to allow apps from the App Store and identified developers, and you try to install an app that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found