gpt4 book ai didi

electron - `electron-builder` mac 中代码签名错误失败

转载 作者:行者123 更新时间:2023-12-03 12:22:28 25 4
gpt4 key购买 nike

我有一个简单的构建脚本来构建/打包 electron应用。 electron-builder失败并出现下面给出的堆栈跟踪。

/Users/vkiranmaniya/Projects/Electron/GSTPro/node_modules/app-builder-lib/templates/entitlements.mac.plist 
/Users/vkiranmaniya/Projects/Electron/GSTPro/dist/mac/GSTPro.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework /Users/vkiranmaniya/Projects/Electron/GSTPro/dist/mac/GSTPro.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework: errSecInternalComponent at ChildProcess.exithandler (child_process.js:294:12) at ChildProcess.emit (events.js:198:13) at maybeClose (internal/child_process.js:982:16) at Socket.stream.socket.on (internal/child_process.js:389:11) at Socket.emit (events.js:198:13) at Pipe._handle.close (net.js:606:12) From previous event: at module.exports.execFileAsync (/Users/vkiranmaniya/Projects/Electron/GSTPro/node_modules/app-builder-lib/electron-osx-sign/util.js:41:10) at /Users/vkiranmaniya/Projects/Electron/GSTPro/node_modules/app-builder-lib/electron-osx-sign/sign.js:172:17 From previous event: at signApplicationAsync (/Users/vkiranmaniya/Projects/Electron/GSTPro/node_modules/app-builder-lib/electron-osx-sign/sign.js:127:6) at /Users/vkiranmaniya/Projects/Electron/GSTPro/node_modules/app-builder-lib/electron-osx-sign/sign.js:338:14 at process._tickCallback (internal/process/next_tick.js:68:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! com.trinityinfosystem.gstpro@1.0.0 pack: electron-builder --dir
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the com.trinityinfosystem.gstpro@1.0.0 pack script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/vkiranmaniya/.npm/_logs/2019-08-21T18_22_24_504Z- debug.log`

这里是 build配置在 package.json
"build": {
"appId": "com.trinityinfosystem.gstpro",
"productName": "GSTPro",
"copyright": "Copyright © 2018"
}

直到我拒绝访问我的钥匙串(keychain)才发生这种情况,之后它开始抛出错误。有什么摆脱困境的想法吗?

最佳答案

作为临时解决方案,您可以运行 export CSC_IDENTITY_AUTO_DISCOVERY=false运行前npm run pack脚本。它将做的是禁用 Electron 生成器自动从您的钥匙串(keychain)中获取签名证书。但是,您将从 builder 获得此信息 skipped macOS application code signing reason=, see https://electron.build/code-signing CSC_IDENTITY_AUTO_DISCOVERY=false但是您仍然可以在构建后运行和测试应用程序。

关于electron - `electron-builder` mac 中代码签名错误失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57597633/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com