macos - Electron.js 应用程序公证失败,您的 Apple ID 帐户已附加到其他提供商
问题描述
我正在尝试在 Mac 上公证我的 electron.js 应用程序。代码签名成功,然后将.app
文件发送到服务器进行公证,但随后该过程失败并出现错误(以下添加错误)。
从网上搜索,我发现这个问题与ascProvider
字段有关。我将ProviderShortName
with 命令xcrun altool --list-providers -u <APPLEID> -p <APP_PASSWORD>
添加到ascProvider
,它应该已经修复了错误,但公证过程仍然失败。
是否有任何其他可能性来解决此错误?
我从公证中得到的错误
Your Apple ID account is attached to other providers. You will need to specify which provider you intend to submit content to. Please contact us if you have questions or need help. (1627)
2021-03-01 15:00:17.378 altool[48448:1515802] *** Error: Unable to notarize app.
2021-03-01 15:00:17.378 altool[48448:1515802] *** Error: code 1627 (Your Apple ID account is attached to other providers. You will need to specify which provider you intend to submit content to. Please contact us if you have questions or need help. (1627))
我notarizing.js
的是这样的
require('dotenv').config();
const { notarize } = require('electron-notarize');
const fs = require('fs');
const path = require('path');
exports.default = async function notarizing(params) {
const { electronPlatformName, appOutDir } = params;
if (electronPlatformName !== 'darwin') {
return;
}
console.log('afterSign hook triggered', params.targets);
// Same appId in electron-builder.
let appId = 'my.app.com'
let appPath = path.join(params.appOutDir, `${params.packager.appInfo.productFilename}.app`);
if (!fs.existsSync(appPath)) {
throw new Error(`Cannot find application at: ${appPath}`);
}
console.log(`Notarizing ${appId} found at ${appPath}`);
try {
await notarize({
appBundleId: appId,
appPath: appPath,
appleId: process.env.APPLEID,
appleIdPassword: process.env.APPLEIDPASS,
ascProvider: process.env.APPLEPROVIDER,
});
} catch (error) {
console.error(error);
}
console.log(`Done notarizing ${appId}`);
};
解决方案
推荐阅读
- javascript - 程序动态选择
- python - 如何向 Python 中的特定线程抛出异常?
- dart - tts 未绑定(文本到语音)
- python - 在 Python 中使用 VS Code 进行远程 SSH 开发 - 挂起“启动 Jupyter 服务器”
- excel - 使用 PSExcel 模块编辑 CSV
- python - 如何在 python 中为 pygame 打开不同目录中的图像
- database - 如何合并两个 Firebird 数据库
- data-visualization - 显示实例标签和分数的 COCO API
- python - 4 for循环优化
- android - android中正确的样式MaterialButton