Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App refuse to signed code object is not signed at all #213

Open
wogno opened this issue Oct 1, 2024 · 0 comments
Open

App refuse to signed code object is not signed at all #213

wogno opened this issue Oct 1, 2024 · 0 comments

Comments

@wogno
Copy link

wogno commented Oct 1, 2024

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

ALTA HOME.app: code object is not signed at all

Failed to codesign your application with code: 1

at /Users/XXXXP/node_modules/@electron/packager/node_modules/@electron/notarize/src/check-signature.ts:46:11
at Generator.next ()
at fulfilled (/xxxxx/@electron/packager/node_modules/@electron/notarize/lib/check-signature.js:28:58)
at processTicksAndRejections (node:internal/process/task_queues:95:5)

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants