問題現象
最近 CI 構建出現失敗,並報錯:"You must first sign the relevant contracts online. (1048)".
Error: Failed to upload app to Apple's notarization servers
Error:
<main> INFO: Configuring logging...
<main> INFO: Logging level set to eXtreme
<main> DEBUG: SMART-CLIENT: initializing data center locking ops: [authenticateForSession, validateAssets]
<main> DEBUG: SMART-CLIENT: initializing data centers with: [contentdelivery01.itunes.apple.com, contentdelivery02.itunes.apple.com]
<main> INFO: iTMSTransporter : iTunes Store Transporter [2.3.0]
......
<main> INFO: iTMSTransporter Correlation Key: 9c5a693c-xxxxxx-7cxxxxx-0001
<main> DEBUG: SMART-CLIENT: Host HTTP header: contentdelivery01.itunes.apple.com
<main> DBG-X: Apple's web service operation return value:
<main> DBG-X: parameter Errors = [You must first sign the relevant contracts online. (1048)]
<main> DBG-X: parameter EnableJWTForAllCalls = false
<main> DBG-X: parameter ShouldUseFeatures = (null)
<main> DBG-X: parameter RestartClient = false
<main> DBG-X: parameter ErrorCode = 1048
<main> DBG-X: parameter ErrorMessage = You must first sign the relevant contracts online. (1048)
<main> DBG-X: parameter ShouldUseRESTAPIs = false
<main> DBG-X: parameter Success = false
<main> ERROR: You must first sign the relevant contracts online. (1048)
<main> DBG-X: The error code is: 1048
<main> INFO: JSON:{"msg":{"phase":"Upload","count":2,"description":"Operation failed","index":2},"messageType":"VerifyProgress"}
<main> DBG-X: Returning 1
解決方法
登錄你的 Apple Developer 帳戶並轉到 App Store Connect,將看到許可協議已更新的通知。你只需同意更新的協議,就可以進行公證的申請了。