Xcode16 XCodeBuild命令出現(xiàn)的報錯問題

升級Xcode16后打包機出現(xiàn)了個問題,現(xiàn)在解決了,在此記錄下,順便幫助有需要的人
之前打包機都是用XCodeBuild工具編譯,其中exportArchive步驟命令是

xcodebuild -exportArchive \
           -archivePath ${ARCHIVE_PATH} \
           -exportPath "${IPA_PATH}" \
           -exportOptionsPlist ${EXPORT_METHOD_PLIST_PATH} \
           -allowProvisioningUpdates YES

這條命令在Xcode15時都是好的; 升級了Xcode16后,遇到了個問題,會導(dǎo)致兩個報錯

1.編譯步驟報錯,具體log如下

** ARCHIVE SUCCEEDED **

/var/folders/ch/1mvd9gz11cn8zy9h254qz2600000gn/T/jenkins6531487518988891980.sh: line 194: -allowProvisioningUpdates: command not found
+++++++++++++++++ipa+++++++++++++++++
2024-10-10 18:20:35.630 xcodebuild[58030:2528109] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path "/var/folders/ch/1mvd9gz11cn8zy9h254qz2600000gn/T/xxxxxx_2024-10-10_18-20-35.623.xcdistributionlogs".
2024-10-10 18:20:35.724 xcodebuild[58030:2528191]  DVTDeveloperAccountManager: Failed to load credentials for xxxxxxxxxx: Error Domain=DVTDeveloperAccountCredentialsError Code=0 "Invalid credentials in keychain for xxxxxxxxxx, missing Xcode-Username" UserInfo={NSLocalizedDescription=Invalid credentials in keychain for xxxxxxxxxx, missing Xcode-Username}
2024-10-10 18:20:35.733 xcodebuild[58030:2528191]  DVTDeveloperAccountManager: Failed to load credentials for F38D3CD7-C794-4F88-93ED-4FDDD8EDF72B: Error Domain=DVTDeveloperAccountCredentialsError Code=0 "Invalid credentials in keychain for F38D3CD7-C794-4F88-93ED-4FDDD8EDF72B, missing Xcode-Username" UserInfo={NSLocalizedDescription=Invalid credentials in keychain for F38D3CD7-C794-4F88-93ED-4FDDD8EDF72B, missing Xcode-Username}
2024-10-10 18:20:35.742 xcodebuild[58030:2528191]  DVTDeveloperAccountManager: Failed to load credentials for ***@***.com: Error Domain=DVTDeveloperAccountCredentialsError Code=0 "Invalid credentials in keychain for ***@***.com, missing Xcode-Token" UserInfo={NSLocalizedDescription=Invalid credentials in keychain for ***@***.com, missing Xcode-Token}
2024-10-10 18:20:40.521 xcodebuild[58030:2528195]  IDEDistribution: Failed to log in with account "(null)" while checking for an App Store Connect account (Error Domain=DVTServicesAccountBasedSessionErrorDomain Code=0 "Unable to log in with account ''." UserInfo={NSLocalizedFailureReason=Unable to log in with account ''., NSLocalizedRecoverySuggestion=The login details for account '' were rejected., DVTDeveloperAccountErrorAccount=<DVTAppleIDBasedDeveloperAccount: 0x600002d92a80; username=''>, NSUnderlyingError=0x600002758ab0 {Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired. Please log in." UserInfo={payload={
    creationTimestamp = "2024-10-10T10:20:40Z";
    httpCode = 200;
    protocolVersion = QH65B2;
    requestUrl = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action";
    responseId = "12827504-3d86-4601-bcf7-efc0dccb0655";
    resultCode = 1100;
    resultString = "Your session has expired. Please log in.";
    userLocale = "en_US";
    userString = "Your session has expired. Please log in.";
}, NSLocalizedDescription=Your session has expired. Please log in.}}})
2024-10-10 18:20:40.760 xcodebuild[58030:2528195]  IDEDistribution: Failed to log in with account "(null)" while checking for an App Store Connect account (Error Domain=DVTServicesAccountBasedSessionErrorDomain Code=0 "Unable to log in with account ''." UserInfo={NSLocalizedFailureReason=Unable to log in with account ''., NSLocalizedRecoverySuggestion=The login details for account '' were rejected., DVTDeveloperAccountErrorAccount=<DVTAppleIDBasedDeveloperAccount: 0x600002de7e80; username=''>, NSUnderlyingError=0x6000027842d0 {Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired. Please log in." UserInfo={payload={
    creationTimestamp = "2024-10-10T10:20:40Z";
    httpCode = 200;
    protocolVersion = QH65B2;
    requestUrl = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action";
    responseId = "e49c99d0-861c-4d80-9cd7-8430bcdfa6a6";
    resultCode = 1100;
    resultString = "Your session has expired. Please log in.";
    userLocale = "en_US";
    userString = "Your session has expired. Please log in.";
}, NSLocalizedDescription=Your session has expired. Please log in.}}})
2024-10-10 18:20:41.053 xcodebuild[58030:2528195]  IDEDistribution: Failed to log in with account "(null)" while checking for an App Store Connect account (Error Domain=DVTServicesAccountBasedSessionErrorDomain Code=0 "Unable to log in with account '***@***.com'." UserInfo={NSLocalizedFailureReason=Unable to log in with account '***@***.com'., NSLocalizedRecoverySuggestion=The login details for account '***@***.com' were rejected., DVTDeveloperAccountErrorAccount=<DVTAppleIDBasedDeveloperAccount: 0x600002de7b80; username='***@***.com'>, NSUnderlyingError=0x6000027a4780 {Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired. Please log in." UserInfo={payload={
    creationTimestamp = "2024-10-10T10:20:41Z";
    httpCode = 200;
    protocolVersion = QH65B2;
    requestUrl = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action";
    responseId = "5819c66e-bd35-4af3-ae6a-0e66193fa2bb";
    resultCode = 1100;
    resultString = "Your session has expired. Please log in.";
    userLocale = "en_US";
    userString = "Your session has expired. Please log in.";
}, NSLocalizedDescription=Your session has expired. Please log in.}}})
error: exportArchive The operation couldn’t be completed. Unable to log in with account ''.

error: exportArchive Provisioning profile "iOS Team Store Provisioning Profile: com.xxxx.xxxxx" doesn't include signing certificate "Apple Distribution: xxxxxxxxxxx".

** EXPORT FAILED **

2. Xcode-settings-accounts欄目中會出現(xiàn)一堆空白的報錯賬戶,具體如下

630f07a9-bb2e-4f5b-a872-0fc7bb7a88d2.png

解決辦法

一開始怎么都不能解決,谷歌也沒搜到相同的問題,最后去問蘋果工程師,給出了解決方法:
終端執(zhí)行命令: defaults delete com.apple.dt.Xcode DVTDeveloperAccountManagerAppleIDLists
這個會把所有的Xcode開發(fā)賬號全部刪掉,然后再重新登錄開發(fā)者賬號,就會發(fā)現(xiàn)問題解決了.猜想升級Xcode16后應(yīng)該是哪個賬戶報錯了導(dǎo)致的這個問題,刪掉就好了

新的問題

上面的問題解決后,又出現(xiàn)了新的問題,每次打包都會失敗,報錯配置文件不包括簽名證書,而且開發(fā)者賬號也會被退出登錄,報錯如下:

** ARCHIVE SUCCEEDED **

2024-11-08 16:19:54.360 xcodebuild[36487:6743710] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path "/var/folders/ch/1mvd9gz11cn8zy9h254qz2600000gn/T/***.xcdistributionlogs".
error: exportArchive No Accounts

error: exportArchive Provisioning profile "iOS Team Store Provisioning Profile: com.***" doesn't include signing certificate "Apple Distribution: *** Co Ltd (***)".

** EXPORT FAILED **

解決辦法

~/Library/MobileDevice/Provisioning Profiles目錄下都是配置文件,刪掉文件夾
刪除緩存
重登陸開發(fā)者賬號,并下載各種配置

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末壕吹,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子耳贬,更是在濱河造成了極大的恐慌,老刑警劉巖顷蟆,帶你破解...
    沈念sama閱讀 218,755評論 6 507
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件腐魂,死亡現(xiàn)場離奇詭異,居然都是意外死亡削樊,警方通過查閱死者的電腦和手機兔毒,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,305評論 3 395
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來迅脐,“玉大人豪嗽,你說我怎么就攤上這事£侵瑁” “怎么了?”我有些...
    開封第一講書人閱讀 165,138評論 0 355
  • 文/不壞的土叔 我叫張陵成榜,是天一觀的道長蹦玫。 經(jīng)常有香客問我刘绣,道長挣输,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 58,791評論 1 295
  • 正文 為了忘掉前任停士,我火速辦了婚禮完丽,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘蜻底。我一直安慰自己聘鳞,他們只是感情好,可當(dāng)我...
    茶點故事閱讀 67,794評論 6 392
  • 文/花漫 我一把揭開白布站楚。 她就那樣靜靜地躺著鸡典,像睡著了一般枪芒。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上舅踪,一...
    開封第一講書人閱讀 51,631評論 1 305
  • 那天抽碌,我揣著相機與錄音,去河邊找鬼货徙。 笑死,一個胖子當(dāng)著我的面吹牛赏迟,可吹牛的內(nèi)容都是我干的蠢棱。 我是一名探鬼主播甩栈,決...
    沈念sama閱讀 40,362評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼糕再,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了殴蹄?” 一聲冷哼從身側(cè)響起猾担,我...
    開封第一講書人閱讀 39,264評論 0 276
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎妓蛮,沒想到半個月后圾叼,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,724評論 1 315
  • 正文 獨居荒郊野嶺守林人離奇死亡构挤,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,900評論 3 336
  • 正文 我和宋清朗相戀三年惕鼓,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片箱歧。...
    茶點故事閱讀 40,040評論 1 350
  • 序言:一個原本活蹦亂跳的男人離奇死亡矾飞,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出呀邢,到底是詐尸還是另有隱情洒沦,我是刑警寧澤,帶...
    沈念sama閱讀 35,742評論 5 346
  • 正文 年R本政府宣布价淌,位于F島的核電站申眼,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏蝉衣。R本人自食惡果不足惜括尸,卻給世界環(huán)境...
    茶點故事閱讀 41,364評論 3 330
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望病毡。 院中可真熱鬧濒翻,春花似錦剪验、人聲如沸肴焊。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,944評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽娶眷。三九已至似嗤,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間届宠,已是汗流浹背烁落。 一陣腳步聲響...
    開封第一講書人閱讀 33,060評論 1 270
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留豌注,地道東北人伤塌。 一個月前我還...
    沈念sama閱讀 48,247評論 3 371
  • 正文 我出身青樓,卻偏偏與公主長得像轧铁,于是被迫代替她去往敵國和親每聪。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 44,979評論 2 355

推薦閱讀更多精彩內(nèi)容