Electron-forge: osxSign is not supported until Electron Packager 8.6.0

Created on 7 Mar 2017  路  10Comments  路  Source: electron-userland/electron-forge

  • [x] I have read the contribution documentation for this project.
  • [x] I agree to follow the code of conduct that this project follows, as appropriate.
  • [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:
i'm trying to sign my app on mac, as electron-packager documentation says setting osxSign:true should sign app after packaging
here is my config:

"electronPackagerConfig": {
        "name": "SomeAppName",
        "icon": "./res/icon.icns",
        "osxSign": true
      },

for example name and icon properties work correctly but setting osxSign does not do anything

btw running signing command manually works correctly too:

electron-osx-sign "./out/myapp-darwin-x64/myapp.app" --platform=darwin --type=development

can anyone suggest anything?

Console output when you run electron-forge with the environment variable DEBUG=electron-forge:*. (Instructions on how to do so here). Please include the stack trace if one exists.

electron-forge:packager packaging with options { asar: false,
  overwrite: true,
  name: 'Ublend',
  icon: './res/icon.icns',
  osxSign: true,
  afterCopy: [ [Function], [Function], [Function], [Function] ],
  afterExtract: [],
  dir: '/Users/GURO/ublend/ublend-electron-app',
  arch: 'x64',
  platform: 'darwin',
  out: '/Users/GURO/ublend/ublend-electron-app/out',
  electronVersion: '1.4.15',
  quiet: true } +9ms
  electron-forge:lifecycle Process Succeeded: Preparing to Package Application for arch: x64 +12s
  electron-forge:lifecycle Process Started: Compiling Application +2ms
  electron-forge:lifecycle Process Succeeded: Compiling Application +919ms
  electron-forge:lifecycle Process Started: Preparing native dependencies +1ms
  electron-forge:lifecycle Process Succeeded: Preparing native dependencies +104ms
  electron-forge:lifecycle Process Started: Packaging Application +0ms
  electron-forge:lifecycle Process Succeeded: Packaging Application +8s

What command line arguments are you passing?


What does your config.forge data in package.json look like?

 "config": {
    "forge": {
      "make_targets": {
        "win32": [
          "squirrel"
        ],
        "darwin": [
          "dmg","zip"
        ],
        "linux": [
          "deb",
          "rpm"
        ]
      },
      "electronPackagerConfig": {
        "name": "MyApp",
        "icon": "./res/icon.icns",
        "osxSign": true
      },
      "electronWinstallerConfig": {
        "name": ""
      },
      "electronInstallerDebian": {},
      "electronInstallerRedhat": {},
      "github_repository": {
        "owner": "",
        "name": ""
      },
      "windowsStoreConfig": {
        "packageName": ""
      }
    }
  }

Please provide either a failing minimal testcase (with a link to the code) or detailed steps to
reproduce your problem. Using electron-forge init is a good starting point, if that is not the
source of your problem.

Most helpful comment

@onassar Thank you so much for clarifying this. I felt like I was taking crazy pills looking for this. I suppose that's what happens when you have a umbrella framework that is puppeteering all of these other libraries and you have to go spelunking through each library to find what configuration is required.

Anyway, your config worked great. Mine ended up looking like this:

"electronPackagerConfig": {
  "osxSign": {
    "identity": "Developer ID Application: Joshua Pinter (<my_id>)"
  }
}

All 10 comments

As answered on Slack. electron-packager hasn't been released yet with a version that supports osxSign, in the mean time use osx-sign.

/cc @malept Am I correct ^^

That's correct. In fact I found some weirdness this morning related to the API naming change, so it's probably a good thing that I didn't release yet. 馃槹

is this working now or is osx-sign still prefered?

The change in Packager was released in 8.6.0, which was on March 14.

Any update here?
I'm absolutely confused on how to get electron-forge to properly sign the app.

Use osxSign inside forge.config.electronPackagerConfig, see the Electron Packager API docs for details.

Okay great figured it out. For anyone else stumbling on this thread, this is what worked for me:

"osxSign": {
  "identity": "Mac Developer: NAME (ID CODE HERE)"
},

@onassar Thank you so much for clarifying this. I felt like I was taking crazy pills looking for this. I suppose that's what happens when you have a umbrella framework that is puppeteering all of these other libraries and you have to go spelunking through each library to find what configuration is required.

Anyway, your config worked great. Mine ended up looking like this:

"electronPackagerConfig": {
  "osxSign": {
    "identity": "Developer ID Application: Joshua Pinter (<my_id>)"
  }
}

Great to hear @joshuapinter
Ya you're right on. What I find frustrating is that it's _really_ easy to get started with Electron, but _really_ hard to put together all the pieces to deliver a polished (and functional and tested) app. I think it's due to your point: umbrella framework that is doing an amazing job pulling together all the pieces, but alas, still juggling so many things that it requires us to go deep in a lot of different areas.

Good luck :)

For anyone who finds this looking for a package.json config example, the new key is packagerConfig, not electronPackagerConfig, e.g.:

{
  "config": {
    "forge": {
      "packagerConfig": {
        "osxSign": {
          "identity": "Developer ID Application: Company (<id>)"
        }
      }
    }
  }
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

partheseas picture partheseas  路  3Comments

NaridaL picture NaridaL  路  4Comments

chenzhiguo picture chenzhiguo  路  5Comments

Andreybest picture Andreybest  路  3Comments

davidroman0O picture davidroman0O  路  5Comments