electron-builder: Mac App Store build is broken after upgrading to electron-builder@24
- Electron-Builder Version: 24.5.2 and 24.4.0
- Node Version: 18
- Electron Version: 25.2.0
- Electron Type (current, beta, nightly): current
- Target: MAS (Mac App Store)
I’ve tested a few times and confirmed that upgrading from electron-builder@23.6.0 to electron-builder@24.5.2 broke Mac App Store build. Builds created with electron-builder@24.5.2 would show up as “Not Available for Testing” and then got rejected by App Review.
It is likely related to https://github.com/electron-userland/electron-builder/issues/7471 and https://github.com/electron-userland/electron-builder/pull/7491.
Electron: 25.2.0.
entitlements.mas.plist and entitlements.mas.inherit.plist are not specified in the config, but they exist in the build-resources directory.
Here’s my configuration:
const opts: CliOptions = {
publish: 'always',
targets: platform.createTarget(targetTypes, ...archs),
config: {
appId: 'com.webcatalog.translatium',
// https://github.com/electron-userland/electron-builder/issues/3730
buildVersion: process.platform === 'darwin' ? appVersion : undefined,
productName: 'Translatium',
files: [
'!docs/**/*',
'!popclip/**/*',
'!test/**/*',
// Ignore C build files
// https://github.com/electron/universal/issues/41#issuecomment-1074159565
// fix "Can't reconcile two non-macho files"
'!node_modules/**/*.{c,mk,a,o,h,Makefile}',
],
directories: {
buildResources: 'build-resources',
},
protocols: {
name: 'Translatium',
schemes: ['translatium'],
},
appx: {
identityName: 'WebCatalogLtd.Translatium',
publisher: 'CN=C2673AF2-2F8A-4FAF-AC59-112BBCFB3423',
backgroundColor: '#43a047',
languages: Object.values(DisplayLanguage),
showNameOnTiles: true,
},
mac: {
darkModeSupport: true,
// https://github.com/electron/electron/issues/15958#issuecomment-447685065
// alternative solution for
// app.requestSingleInstanceLock in signed mas builds (Mac App Store)
extendInfo: {
LSMultipleInstancesProhibited: true,
},
},
mas: {
category: 'public.app-category.travel',
provisioningProfile: process.env.FORCE_DEV
? 'build-resources/embedded-development.provisionprofile' // mas-dev
: 'build-resources/embedded.provisionprofile',
darkModeSupport: true,
entitlements: 'build-resources/entitlements.mas.plist',
entitlementsInherit: 'build-resources/entitlements.mas.inherit.plist',
entitlementsLoginHelper:
'build-resources/entitlements.mas.login-helper.plist',
},
},
};
CC: @mmaietta
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 16 (7 by maintainers)
@mmaietta Thanks for the hint! I’ve found the issue, it’s a regression in
@electron/osx-sign.Here’s the fix: https://github.com/electron/osx-sign/pull/292
Temporary patch:
Alright, try v24.6.2
Will attempt to look into this tonight! Apologies folks. Looks like an additional unit test may be needed.
[EDIT]: I think I found the issue. Should have a patch release out shortly