提交APP到APP STORE上审核,出错了,使用 xcrun altool --validate-app -f /My/1.0.ipa -t ios --apiKey HMXL9464NW --apiIssuer c72e7e49-7e99-49ub-8db3-16d1d5e09591 --verbose 命令进行校验时报错,信息一大堆,如下:
Last login: Wed May 13 23:13:43 on ttys000
localhost:~ admin$ xcrun altool --validate-app -f /My/1.0.ipa -t ios --apiKey HMXL9464NW --apiIssuer c72e7e49-7e99-49ub-8db3-16d1d5e09591 --verbose
2020-05-13 23:27:43.814 altool[1735:3947350] Verbose logging enabled.
Generated JWT: eyJhbGciOiJFUzI1NiIsImtpZCI6IlhMWEw5NDY0TlciLCJ0eXAiOiJKV1QifQ.eyJleHAiOjE1ODkzODQ4NjQsImlzcyI6ImM3MmU3ZTQ5LTdlOTktNGYwYi04ZGIzLTE2ZDFkNWUwOTU5MSIsImF1ZCI6ImFwcHN0b3JlY29ubmVjdC12MSIsImlhdCI6MTU4OTM4MzY2NH0.dLpxTSQDVqIIIOze4AsGtZUF6xzZml-r2uURFhmax_upMFJgd03RawfDqTuapGn8poIVykeY1Ps7wgCq7b29nw
2020-05-13 23:27:43.818 altool[1735:3947350] *** SESSION AUTH: Webservice call to create a transporter session.
2020-05-13 23:27:43.821 altool[1735:3947368] {
Authorization = "Bearer eyJhbGciOiJFUzI1NiIsImtpZCI6IlhMWEw5NDY0TlciLCJ0eXAiOiJKV1QifQ.eyJleHAiOjE1ODkzODQ4NjQsImlzcyI6ImM3MmU3ZTQ5LTdlOTktNGYwYi04ZGIzLTE2ZDFkNWUwOTU5MSIsImF1ZCI6ImFwcHN0b3JlY29ubmVjdC12MSIsImlhdCI6MTU4OTM4MzY2NH0.dLpxTSQDVqIIIOze4AsGtZUF6xzZml-r2uURFhmax_upMFJgd03RawfDqTuapGn8poIVykeY1Ps7wgCq7b29nw";
}
2020-05-13 23:27:43.847 altool[1735:3947368] jsonURL = https://contentdelivery.itunes.apple.com/WebObjects/MZLabelService.woa/json/MZContentDeliveryService
2020-05-13 23:27:43.848 altool[1735:3947368] jsonRequest as dictionary = {
id = "20200513232743-027";
jsonrpc = "2.0";
method = authenticateForSession;
params = {
Application = altool;
ApplicationBundleId = "com.apple.itunes.altool";
FrameworkVersions = {
"com.apple.itunes.connect.ITunesConnectFoundation" = "4.00 (1181)";
"com.apple.itunes.connect.ITunesPackage" = "4.00 (1181)";
"com.apple.itunes.connect.MZXMLMarshalling" = "4.00 (1181)";
};
HttpHeaders = {
Authorization = "Bearer eyJhbGciOiJFUzI1NiIsImtpZCI6IlhMWEw5NDY0TlciLCJ0eXAiOiJKV1QifQ.eyJleHAiOj...";
};
OSIdentifier = "Mac OS X 10.14.5 (x86_64)";
Version = "4.00 (1181)";
};
}
2020-05-13 23:27:43.848 altool[1735:3947368] Setting request length to: 761
2020-05-13 23:27:45.982 altool[1735:3947368] MZWebServiceAuthenticateForSession connection:didReceiveResponse:: -1
2020-05-13 23:27:45.982 altool[1735:3947368] MZWebServiceAuthenticateForSession connection:didReceiveData:: 60
2020-05-13 23:27:45.982 altool[1735:3947368] *** Error: Server returned an invalid MIME type: text/plain, body: Unauthenticated
Request ID: NOR33SYIJ5ZRFUKIAE6EAPEQBM.0.0
2020-05-13 23:27:45.998 altool[1735:3947368] Web service call (authenticateForSession) result: {
ErrorMessage = "The server returned an invalid response. This may indicate that a network proxy ...";
Errors = (
"The server returned an invalid response. This may indicate that a network proxy ..."
);
}
2020-05-13 23:27:45.998 altool[1735:3947368] {
ErrorMessage = "The server returned an invalid response. This may indicate that a network proxy is interfering with communication, or that Apple servers are having issues. Please try your request again later.";
Errors = (
"The server returned an invalid response. This may indicate that a network proxy is interfering with communication, or that Apple servers are having issues. Please try your request again later."
);
}
2020-05-13 23:27:46.069 altool[1735:3947350] *** Error: Unable to validate archive '/My/1.0.ipa': (
"Error Domain=NSCocoaErrorDomain Code=-1011 \"Authentication failed\" UserInfo={NSLocalizedDescription=Authentication failed, NSLocalizedFailureReason=Failed to authenticate for session: (\n \"Error Domain=ITunesConnectionAuthenticationErrorDomain Code=-26000 \\\"The server returned an invalid response. This may indicate that a network proxy is interfering with communication, or that Apple servers are having issues. Please try your request again later.\\\" UserInfo={NSLocalizedRecoverySuggestion=The server returned an invalid response. This may indicate that a network proxy is interfering with communication, or that Apple servers are having issues. Please try your request again later., NSLocalizedDescription=The server returned an invalid response. This may indicate that a network proxy is interfering with communication, or that Apple servers are having issues. Please try your request again later., NSLocalizedFailureReason=App Store operation failed.}\"\n)}"
)
看这报错信息好像跟网络状态有关,可能是由于代理服务器异常或者苹果服务器异常导致的,拿提示的ITunesConnectionAuthenticationErrorDomain Code=-26000,或者The server returned an invalid response. This may indicate that a network proxy去百度上搜索,没有找到什么实质性的解决办法,考虑到我本机并未使用代理服务器上传,苹果服务器出问题的概率更小,那就有可能是网络原因导致的,可以尝试重置电脑、路由器试试,果然,电脑重置一下就可以上传了。
备忘:还有一个情况,由于其他原因,当时提交APP的时候,我本机设置的时间比实际时间晚两天,重启后我将电脑时间修正了。