简体   繁体   English

执行 expo build:ios 时,Apple Developer Portal 中的身份验证失败

[英]Failed authentication in Apple Developer Portal when execute expo build:ios

I'm trying to config automatically build iOS apps using Expo through Gitlab-CI .我正在尝试通过 Gitlab-CI 使用 Expo 配置自动构建 iOS 应用程序 This are the commands that I am using:这是我正在使用的命令:

expo login -u expo_user -p expo_pass
expo build:ios --non-interactive --apple-id my_id@domain.com --clear-dist-cert --clear-provisioning-profile --dist-p12-path "path_to_file.p12" --provisioning-profile-path "path_to_file.mobileprovision"

I am already passing the respective values of this env vars:我已经传递了这个环境变量的各自值:

EXPO_APPLE_PASSWORD
EXPO_IOS_DIST_P12_PASSWORD

During the 2nd command execution it launch this logs:在第二次命令执行期间,它启动此日志:

[14:24:23] Trying to authenticate with Apple Developer Portal...
[14:24:25] Authentication with Apple Developer Portal failed!
[14:24:25] Error: Reason: Unknown reason, raw: "<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body>\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>Apple</center>\r\n</body>\r\n</html>\r\n\n"
    at runAction (/expo-cli@3.13.1/src/appleApi/fastlane.ts:28:17)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at Object.authenticate (/expo-cli@3.13.1/src/appleApi/authenticate.ts:46:40)
    at IOSBuilder.getAppleCtx (/expo-cli@3.13.1/src/commands/build/ios/IOSBuilder.js:47:23)
    at IOSBuilder.produceMissingCredentials (/expo-cli@3.13.1/src/commands/build/ios/IOSBuilder.js:123:22)
    at IOSBuilder.prepareCredentials (/expo-cli@3.13.1/src/commands/build/ios/IOSBuilder.js:65:7)
    at IOSBuilder.run (/expo-cli@3.13.1/src/commands/build/ios/IOSBuilder.js:19:7)
    at IOSBuilder.command (/expo-cli@3.13.1/src/commands/build/BaseBuilder.js:55:7)
    at Command.<anonymous> (/expo-cli@3.13.1/src/exp.ts:81:7)

The Apple Developer account that I am using have configured the Two Factor Authentication (2FA) .我使用的 Apple Developer 帐户配置了双因素身份验证 (2FA)

Is this the reason why the expo build:ios command is failing the auth against Apple Portal?这就是 expo build:ios命令无法通过 Apple Portal 的身份验证的原因吗? What am I missing in this commands?我在这个命令中缺少什么?

PS: These commands on my laptop works fine! PS:这些命令在我的笔记本电脑上工作正常!

A similar issue was happening to me in interactive mode on my dev machine.在我的开发机器上以交互模式发生了类似的问题。

One thing that happened to work for me was logging into App Store Connect in an incognito window to trigger the 2FA.碰巧对我有用的一件事是在隐身窗口中登录 App Store Connect 以触发 2FA。 Not sure if it's a coincidence, but it worked!不确定这是否是巧合,但它奏效了!

For reference, I was getting a similar error on the latest expo-cli@4.9.1作为参考,我在最新的expo-cli@4.9.1上遇到了类似的错误

✖ Logging in...
Authentication with Apple Developer Portal failed!
    Error: Apple Service Error -1018. Could Not Complete Request. Your request could not be completed because of an error. Please try again later. Apple servers may be down right
    now, please try again in about 10-20 minutes

Not a very satisfying answer, but it worked for me: Delete your node_modules and then reinstall all your dependencies.不是一个非常令人满意的答案,但它对我node_modules删除您的node_modules ,然后重新安装所有依赖项。

We had no problem last week, but today we kept hitting this error.上周我们没有问题,但今天我们一直遇到这个错误。

This possible fix has zero risk as long as you have a yarn.lock or NPM's equivalent so that you can be sure the versions you download match the originals.只要您拥有yarn.lock或 NPM 的等效文件,此可能的修复程序就具有零风险,这样您就可以确保下载的版本与原始版本匹配。

In addition to the other answers, also ensure that a VPN or site-blocking software is not activated, which was the cause of my issue.除了其他答案之外,还要确保未激活 VPN 或站点阻止软件,这是导致我出现问题的原因。

You Need To Use expo build:ios --clear-credentials it worked fine for me.你需要使用expo build:ios --clear-credentials它对我来说很好用。

As Specified bellow in link.如链接中指定的波纹管。

-c, --clear-credentials Clear all credentials stored on Expo servers. -c, --clear-credentials 清除存储在 Expo 服务器上的所有凭据。

https://forums.expo.io/t/solved-ios-standalone-build-failed/10007/3?u=alihussnain https://forums.expo.io/t/solved-ios-standalone-build-failed/10007/3?u=alihussnain

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Apple Developer Portal 的身份验证失败:Apple Service Error -1018 while expo build:ios - Authentication with Apple Developer Portal failed! Apple Service Error -1018 while expo build:ios 在 Expo build:ios 时使用 Apple Developer Portal 获取错误身份验证失败 - Getting error Authentication with Apple Developer Portal failed while Expo build:ios 无法与 Apple Developer Portal 同步签名身份 - Failed to sync signing identities with Apple Developer Portal 无法将 abc@xyz.de 帐户与 Apple Developer Portal 同步。无法解析 Apple Developer Portal 客户端的转发链接 - Failed to synchronize abc@xyz.de account with Apple Developer Portal.Failed to resolve forward links for Apple Develop Portal client 从Apple Developer Portal删除开发人员证书 - Delete developer certificate from Apple Developer Portal Expo - 有没有办法在没有苹果开发者帐户的情况下将 expo 应用程序构建到 .ipa 文件? - Expo - Is there a way to build an expo app to a .ipa file without an apple developer account? 无法同步 ****.com 团队与 Apple Developer Portal。没有这样的主机是已知的。 (Xamarin 项目)。? - Failed to synchronize ****.com teams with Apple Developer Portal.No such host is known. (Xamarin project).? 如何在不设置 Apple Developer 帐户和团队的情况下构建 iOS 二进制文件? - How to build an iOS binary without setting an Apple Developer account and team? flutter ios 构建失败 - 我需要注册苹果开发者吗? - flutter ios build fail - do i need to enroll apple developer? 如何撤销Apple开发人员门户网站中的分发证书? - How to revoke the Distribution certificate in Apple developer portal?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM