推送到 Testflight 时 Azure DevOps 超时 iOS

Timeout in Azure DevOps for iOS when pushing to Testflight

在 Azure DevOps 中,我们有一个发布管道,使用以下扩展插件将我们的 iOS 应用程序的 .ipa 推送到 Testflight: https://github.com/microsoft/app-store-vsts-extension

Apple 最近强制使用 App Store Connect API 密钥。

自从实施 App Store Connect API 密钥后,我们现在面临超时错误(日志如下):

.... 
2021-03-18T18:03:19.8161190Z INFO [2021-03-18 18:03:19.81]: iTunes Transporter successfully finished its job
2021-03-18T18:03:19.8162270Z DEBUG [2021-03-18 18:03:19.81]: [Transporter]: DBG-X: Returning 0
2021-03-18T18:03:19.9485520Z INFO [2021-03-18 18:03:19.94]: -----------------------------------------------------
2021-03-18T18:03:19.9486760Z INFO [2021-03-18 18:03:19.94]: Successfully uploaded package to App Store Connect. It might take a few minutes until it's visible online.
2021-03-18T18:03:19.9487720Z INFO [2021-03-18 18:03:19.94]: -----------------------------------------------------
2021-03-18T18:03:19.9516820Z INFO [2021-03-18 18:03:19.95]: Successfully uploaded the new binary to App Store Connect
2021-03-18T18:03:19.9517800Z INFO [2021-03-18 18:03:19.95]: Creating authorization token for App Store Connect API
2021-03-18T18:03:19.9551310Z INFO [2021-03-18 18:03:19.95]: If you want to skip waiting for the processing to be finished, use the `skip_waiting_for_build_processing` option
2021-03-18T18:03:19.9552840Z INFO [2021-03-18 18:03:19.95]: Note that if `skip_waiting_for_build_processing` is used but a `changelog` is supplied, this process will wait for the build to appear on AppStoreConnect, update the changelog and then skip the remaining of the processing steps.
2021-03-18T18:03:19.9553980Z DEBUG [2021-03-18 18:03:19.95]: App Platform (ios)
2021-03-18T18:03:20.5095270Z INFO [2021-03-18 18:03:20.50]: Waiting for processing on... app_id: 1484478996, app_version: 1.4.0, build_version: 20210318.1844, platform: IOS
2021-03-18T18:03:20.8594870Z WARN [2021-03-18 18:03:20.85]: Read more information on why this build isn't showing up yet - https://github.com/fastlane/fastlane/issues/14997
2021-03-18T18:03:20.8596300Z INFO [2021-03-18 18:03:20.85]: Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues)
2021-03-18T18:03:51.2082280Z INFO [2021-03-18 18:03:51.20]: Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues)
2021-03-18T18:04:21.6151090Z INFO [2021-03-18 18:04:21.61]: Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues)
2021-03-18T18:04:51.9799690Z INFO [2021-03-18 18:04:51.97]: Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues)
2021-03-18T18:05:25.6750520Z INFO [2021-03-18 18:05:25.67]: Waiting for App Store Connect to finish processing the new build (1.4.0 - 20210318.1844) for IOS
2021-03-18T18:05:25.6753650Z WARN [2021-03-18 18:05:25.67]: Build did include information for app, build beta detail and pre release version
2021-03-18T18:05:25.6755640Z WARN [2021-03-18 18:05:25.67]: Fetching a new build with all the information needed
2021-03-18T18:05:27.0157640Z Timeout received: 'Spaceship::AccessForbiddenError', 'This request is forbidden for security reasons - The API key in use does not allow this request'. Retrying after 3 seconds (remaining: 4)...
2021-03-18T18:05:30.3941310Z Timeout received: 'Spaceship::AccessForbiddenError', 'This request is forbidden for security reasons - The API key in use does not allow this request'. Retrying after 3 seconds (remaining: 3)...
2021-03-18T18:05:33.6926250Z Timeout received: 'Spaceship::AccessForbiddenError', 'This request is forbidden for security reasons - The API key in use does not allow this request'. Retrying after 3 seconds (remaining: 2)...
2021-03-18T18:05:37.1249810Z Timeout received: 'Spaceship::AccessForbiddenError', 'This request is forbidden for security reasons - The API key in use does not allow this request'. Retrying after 3 seconds (remaining: 1)...
2021-03-18T18:05:40.4293300Z /Users/runner/.gem-cache/gems/fastlane-2.178.0/fastlane_core/lib/fastlane_core/ui/interface.rb:141:in `user_error!': [!] Could not set changelog: This request is forbidden for security reasons - The API key in use does not allow this request (FastlaneCore::Interface::FastlaneError)
....

作业进程失败并出现以下快速通道错误:

2021-03-18T18:05:40.4539710Z ##[error]Error: The process '/usr/local/lib/ruby/gems/2.7.0/bin/fastlane' failed with exit code 1

  1. 构建被推送到 Testflight。
  2. 发行说明未发布。
  3. 我对用户有应用管理员角色。

我错过了什么?

按照 Paulw11 的建议,我在 API 键上缺少 App Manager 角色。

用这个角色重新生成一个新的 API 密钥后,它起作用了。

注意:用户帐户上的 App Manager 角色是不够的,如果您正在自动化发布部分(变更日志、发行说明等),它将不起作用

很可能您拥有开发人员访问权限的密钥,这就是为什么 -> Could not set changelog: This request is forbidden for security reasons - The API key in use does not allow this request (FastlaneCore::Interface::FastlaneError).

密钥与具有相同角色的普通用户具有相同的访问级别。作为具有开发人员角色的用户,您无法设置更改日志。参见 Program roles - Edit App Store details