#App sandbox not enabled error

4 messages · Page 1 of 1 (latest)

fallen zenith
#

Solution added for future readers...

I'm new to Electron and was struggling to figure out how to get past this error. I'm using Electron (24.0.0) Forge (6.1.1) on MacBook Pro (M1) Ventura and building for Mac App Store (electron-forge make --arch=universal --platform=mas). I had already done most of this, but here are all the steps:

Create certificates:

  • Go to Xcode > Settings > Accounts
  • Sign in to Apple ID for App Store Connect
  • Click + (bottom left of window) > select Apple ID > Continue
  • Go to Xcode > Settings > Accounts > select Apple ID > Team > Your Company > Manage Certificates
  • Click + (bottom left of window) > select Apple Distribution (code signing)
  • Click + (bottom left of window) > select Mac Installer Distribution (package signing)
  • Right click each certificate > Export Certificate > enter password > click Save

Install certificates into keychain:

  • Double click exported/saved certificate profile file (.p12 extension - requires file password)
#

Verify the certificates are installed (from terminal):

> security find-identity -v
  1) 12345 "Apple Distribution: Your Company (XXX)"
  2) 54321 "3rd Party Mac Developer Installer: Your Company (XXX)"
     2 valid identities found

> security find-identity -p codesigning -v
  1) 12345 "Apple Distribution: Your Company (XXX)"
     1 valid identities found

Create provisioning profile:

  • Go to Apple > Developer > Certificates, Identifiers & Profiles > Profiles > create a New Provisioning Profile
  • Download profile to your project and reference it in your osxSign provisioningProfile value
// forge.config.ts
  makers: [new MakerPKG({ identity: '3rd Party Mac Developer Installer: Your Company (XXX)' })],
  packagerConfig: {
    osxSign: {
      identity: 'Apple Distribution: Your Company (XXX)',
      provisioningProfile: path.join(__dirname, 'Your_App_Store.provisionprofile'),
    },
  },
final rover
fallen zenith
#

The app I'm working on is currently Mac only so I'm not familiar with any of the Windows app processes or issues.