错误 ITMS-90283:配置文件无效。捆绑包中包含的配置文件无效 [缺少代码签名证书]
Posted
技术标签:
【中文标题】错误 ITMS-90283:配置文件无效。捆绑包中包含的配置文件无效 [缺少代码签名证书]【英文标题】:ERROR ITMS-90283: Invalid Provisioning Profile. The provisioning profile included in the bundle is invalid [Missing code-signing certificate] 【发布时间】:2020-03-23 16:56:48 【问题描述】:版本:
电子:5.0.1 电子制造商:21.2.0 电子公证:0.1.1 电子网络包:2.7.4 正在开发:MacOS Catalina 10.15dmg
文件运行良好。但是当我尝试通过 Transporter 进行验证时,出现以下错误。
错误
构建配置
"build":
"appId": "<APP_ID>",
"productName": "<PRODUCT_NAME",
"copyright": "<COMPANY_NAME>",
"afterSign": "scripts/notarize.js",
"directories":
"buildResources": "resources",
"output": "release"
,
"mac":
"hardenedRuntime": true,
"gatekeeperAssess": false,
"category": "public.app-category.developer-tools",
"target": ["mas"],
"icon": "resources/icon.icns",
"identity": "<IDENTITY>",
"provisioningProfile": "build/mac.provisionprofile",
"type": "distribution",
"electronLanguages": ["en"],
"entitlements": "build/mac.plist",
"entitlementsInherit": "build/mac.plist"
,
"mas":
"hardenedRuntime": false,
"provisioningProfile": "build/mas.provisionprofile",
"type": "distribution",
"electronLanguages": ["en"],
"entitlements": "build/entitlements.mas.plist",
"entitlementsInherit": "build/entitlements.mas.inherit.plist"
,
"dmg":
"sign": false,
"contents": [
"x": 130,
"y": 220
,
"x": 410,
"y": 220,
"type": "link",
"path": "/Applications"
]
,
"files": [
"dist/",
"node_modules/",
"app_prod.html",
"main.prod.js",
"main.prod.js.map",
"package.json",
"assets/"
],
"win":
"target": ["nsis"]
,
"linux":
"target": ["deb", "AppImage"],
"category": "Development"
,
notarize.js
require('dotenv').config();
const notarize = require('electron-notarize');
exports.default = async function notarizing(context)
const electronPlatformName, appOutDir = context;
if (electronPlatformName !== 'darwin')
return;
const appName = context.packager.appInfo.productFilename;
return await notarize(
appBundleId: process.env.BUNDLE_ID,
appPath: `$appOutDir/$appName.app`,
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_ID_PASS,
);
;
mac.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>
entitlements.mas.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.application-identifier</key>
<string>APPLICATION_ID</string>
<key>com.apple.developer.team-identifier</key>
<string>TEAM_ID</string>
<key>com.apple.security.application-groups</key>
<array>
<string>BUNDLE_ID</string>
</array>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
<key>com.apple.security.files.downloads.read-write</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.files.all</key>
<true/>
<key>com.apple.security.application-groups</key>
<string>security</string>
</dict>
</plist>
entitlements.mas.inherit.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.inherit</key>
<true/>
</dict>
</plist>
我的证书
构建文件夹
配置文件
另外,Notarization 步骤也通过了。这里有什么遗漏吗?
【问题讨论】:
什么是“运输者”? @NoGrabbing Transporter 应用程序是一个 macOS 工具,可帮助将二进制文件上传到 App Store Connect。 @NoGrabbing 你对这个问题有什么想法吗? 你有想过这个问题吗? @hisnameisjimmy 我放弃了这个。问题在于电子。因此,我们从 AppStore 中提取应用程序并提供从网站下载 .dmg 文件的选项。 【参考方案1】:我有same error message with a newer version of electron。对我来说真正的问题是我有多个x.provisionprofile
s,而不是embedded.provisionprofile
(如电子生成器文档所述),使用了其他一个,因此导致了这个错误。您可以在此处查看完整的源代码和构建设置:
https://github.com/johannesjo/super-productivity
【讨论】:
【参考方案2】:@hugo der hungrige - 感谢您的提示...对于遇到相同问题的其他人...根据那里的许多说明,您有以下 2 个:
embedded.provisionprofile embedded.mas.provisionprofile...设置您的配置,以便“mac”和“mas”都使用相同的 embedded.mas.provisionprofile。
"productName": "alooper",
"appId": "com.gieson.alooper",
"directories":
"buildResources": "buildResources",
"output": "release"
,
"afterSign": "./buildResources/notarize.js",
"mac":
"hardenedRuntime": false,
"gatekeeperAssess": false,
"type": "development",
"target": [
"mas"
],
"artifactName": "$productName-$version-$os.$ext",
"category": "public.app-category.music",
"provisioningProfile": "./embedded.mas.provisionprofile",
"entitlements": "./entitlements.plist",
"icon": "./app/assets/icon/alooper.icns"
,
"mas":
"hardenedRuntime": true,
"type": "distribution",
"target": [
"pkg"
],
"artifactName": "$productName-$version-$os.$ext",
"category": "public.app-category.music",
"provisioningProfile": "./embedded.mas.provisionprofile",
"entitlements": "./entitlements.mas.plist",
"entitlementsInherit": "./entitlements.mas.inherit.plist",
"icon": "./app/assets/icon/alooper.icns"
【讨论】:
以上是关于错误 ITMS-90283:配置文件无效。捆绑包中包含的配置文件无效 [缺少代码签名证书]的主要内容,如果未能解决你的问题,请参考以下文章
无效的捆绑包。捆绑包 xxx 不支持最低操作系统版本 (2020)
AppStore 提交:错误 ITMS-9000:“无效的捆绑结构 - 不允许二进制文件‘MyApp.app/BuildAgent’