electron/forge

App refuse to signed code object is not signed at all

wogno opened this issue · 2 comments

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

7.4.0

Electron version

v32.0.1

Operating system

MacOS 14.5 (23F79)

Last known working Electron Forge version

No response

Expected behavior

TO MAKE AND PUBLISHED WORK WELL

Actual behavior

An unhandled rejection has occurred inside Forge:
Error: Failed to display codesign info on your application with code: 1

Appname.app: code object is not signed at all

Failed to codesign your application with code: 1

appName.app: code object is not signed at all
In architecture: x86_64

AppName.app: code object is not signed at all
at /Users/xxx/node_modules/@electron/packager/node_modules/@electron/notarize/src/check-signature.ts:46:11
at Generator.next ()
at fulfilled (/Users/xxxx/App/node_modules/@electron/packager/node_modules/@electron/notarize/lib/check-signature.js:28:58)
at processTicksAndRejections (node:internal/process/task_queues:95:5)

Steps to reproduce

I just add nucleus and sign app with notorize, my forge config

import type { ForgeConfig } from '@electron-forge/shared-types';
import { MakerSquirrel } from '@electron-forge/maker-squirrel';
import { MakerZIP } from '@electron-forge/maker-zip';
import { MakerDeb } from '@electron-forge/maker-deb';
import { MakerRpm } from '@electron-forge/maker-rpm';
import { MakerDMG} from '@electron-forge/maker-dmg'
import { VitePlugin } from '@electron-forge/plugin-vite';
import { FusesPlugin } from '@electron-forge/plugin-fuses';
import { FuseV1Options, FuseVersion } from '@electron/fuses';
import path from 'path';

const config: ForgeConfig = {
buildIdentifier: 'xxx.xxx.xxx',
packagerConfig: {
asar: true,
appVersion: "0.0.1",
icon: ${process.cwd()}/assets/icons/icon.icns,
appBundleId: 'xxx.xxx.xx',
osxSign: {
identity: 'Developer ID Application: xxxx',
optionsForFile: (filePath: string) => {
return {
entitlements: ${process.cwd()}/entitlements.mac.plist,
hardenedRuntime: true,
};
},
},
osxNotarize: {
 
appleApiIssuer: process.env.APPLE_API_ISSUER,
appleApiKey: process.env.APPLE_API_KEY,
appleApiKeyId: process.env.APPLE_API_KEY_ID,

}

},
rebuildConfig: {},
makers: [new MakerSquirrel({
setupIcon: ${process.cwd()}/assets/icons/icon.ico,
}),
new MakerZIP({}, ['darwin']),

new MakerRpm({}), new MakerDeb({}),
new MakerDMG({
name: 'App name',
appPath: 'src/main.ts',
icon: ${process.cwd()}/assets/icons/icon.icns,
}),
],
plugins: [
new VitePlugin({
// build can specify multiple entry builds, which can be Main process, Preload scripts, Worker process, etc.
// If you are familiar with Vite configuration, it will look really familiar.
build: [
{
// entry is just an alias for build.lib.entry in the corresponding file of config.
entry: 'src/main.ts',
config: 'vite.main.config.ts',
},
{
entry: 'src/preload.ts',
config: 'vite.preload.config.ts',
},
],
renderer: [
{
name: 'main_window',
config: 'vite.renderer.config.ts',
},
],
}),
// Fuses are used to enable/disable various Electron functionality
// at package time, before code signing the application
new FusesPlugin({
version: FuseVersion.V1,
[FuseV1Options.RunAsNode]: false,
[FuseV1Options.EnableCookieEncryption]: true,
[FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false,
[FuseV1Options.EnableNodeCliInspectArguments]: false,
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true,
[FuseV1Options.OnlyLoadAppFromAsar]: true,
}),
],

publishers: [
{
name: '@electron-forge/publisher-nucleus',
config: {
host: process.env.NUCLEUS_HOST, // This should be set securely
appId: '1',
channelId: process.env.NUCLEUS_CHANNEL_ID, // This should be set securely
token: process.env.NUCLEUS_TOKEN // This should be set securely
}
}
]
};

export default config;

Additional information

No response

update electron-forge-cli version (7.4.0 to 7.5.0) resolve my question.

maybe this cause by @electron/packager

Closing as this is resolved in 7.5.0