Electron.js 应用公证失败,您的 Apple ID 帐户已附加到其他提供商

问题描述

我正在尝试在 Mac 上公证我的 electron.js 应用程序。 代码签名成功,然后将.app文件发送到服务器进行公证,但随后过程失败并出现错误(下面添加错误)。

通过网上搜索,我发现此问题与 ascProvider 字段有关。 我将 ProviderShortName 与命令 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}`);
};

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...