Skip to content

Make for target dmg fails after Mac OS update to 12.3.1 #2831

@singhshashi

Description

@singhshashi

Pre-flight checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project uses.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Electron Forge version

6.0.0-beta.61

Electron version

15.3.0

Operating system

macOS 12.3.1 Arm 64

Last known working Electron Forge version

6.0.0-beta.61

Expected behavior

I recently applied the OS update recommended by MacOS. The current version of the OS is 12.3.1.

Before the update, the build was working fine as expected.

Actual behavior

After the update, the build fails with the following message:

✔ Resolving Forge Config
We need to package your application before we can make it
✔ Preparing to Package Application for arch: arm64
✔ Preparing native dependencies: 2 / 2
✔ Packaging Application
Making for the following targets: dmg, zip
✖ Making for target: dmg - On platform: darwin - For arch: arm64

An unhandled error has occurred inside Forge:
An error occured while making for target: dmg
Command failed: bless --folder /Volumes/Trici --openfolder /Volumes/Trici
bless: The 'openfolder' is not supported on Apple Silicon devices.


Error: Command failed: bless --folder /Volumes/Trici --openfolder /Volumes/Trici
bless: The 'openfolder' is not supported on Apple Silicon devices.


    at makeError (/Users/shashi/projects/trici-desktop-mac/node_modules/appdmg/node_modules/execa/index.js:174:9)
    at /Users/shashi/projects/trici-desktop-mac/node_modules/appdmg/node_modules/execa/index.js:278:16
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Steps to reproduce

Update the macOS to the latest version and that should cause it to break.

Other libraries have reported same issue:
tauri-apps/tauri#3719
create-dmg/create-dmg#127

Additional information

Command used:

electron-forge publish --arch=arm64

const fs = require('fs');
const packageJson = require('./package.json');

const { version } = packageJson;

const config = {
  hooks: {
  },
  packagerConfig: {
    name: 'Trici',
    executableName: 'Trici',
    asar: false,
    icon: path.resolve(__dirname, 'resources', 'images', 'trici_icon'),
    appBundleId: 'com.gettrici.trici',
    usageDescription: {
      Camera:
        'Access is needed by certain built-in fiddles in addition to any custom fiddles that use the Camera',
      Microphone:
        'Access is needed by certain built-in fiddles in addition to any custom fiddles that use the Microphone',
    },
    appCategoryType: 'public.app-category.developer-tools',
    osxSign: {
      identity: 'Developer ID Application: Shashi Singh (XXXXXXXXX)',
      hardenedRuntime: true,
      'gatekeeper-assess': false,
      entitlements: 'build/entitlements.plist',
      'entitlements-inherit': 'build/entitlements.plist',
      'signature-flags': 'library',
    },
    extendInfo: {
    	"LSUIElement": true
    },
  },
  makers: [
    {
      name: '@electron-forge/maker-dmg',
      config:{
       	format: 'ULFO'
      }
    },
    {
      name: '@electron-forge/maker-zip',
    }
  ],
  publishers: [
      {
          name: '@electron-forge/publisher-s3',
          platforms: ['darwin'],
          config: {
            bucket: 'bucket.gettrici.com',
            folder: 'darwin-x64',
            accessKeyId: 'XXXXxxxxxx',
            secretAccessKey:'xxxxxxxxxxxxxxxx',
            region:'ap-south-1'
          }
      }
  ],
};

function notarizeMaybe() {
  if (process.platform !== 'darwin') {
    return;
  }


  if (!process.env.APPLE_ID || !process.env.APPLE_ID_PASSWORD) {
    console.warn(
      'Should be notarizing, but environment variables APPLE_ID or APPLE_ID_PASSWORD are missing!',
    );
    return;
  }

  config.packagerConfig.osxNotarize = {
    appBundleId: 'com.gettrici.trici',
    appleId: process.env.APPLE_ID,
    appleIdPassword: process.env.APPLE_ID_PASSWORD,
    ascProvider: 'XXXXXXX',
  };
}

notarizeMaybe();

// Finally, export it
module.exports = config;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions