无效的供应配置文件签名-STATE_ERROR. VALIDATION_ERROR 90165

我试图上传一个存档到应用程序商店连接,突然得到以下错误:

供应配置文件签名无效。捆绑包中包含的供应配置文件不能用于向 iOS 应用商店提交应用程序,除非它有苹果的有效签名。有关更多信息,请访问 iOS 开发者门户。使用错误代码 STATE _ ERROR。用于 ID 的验证 _ ERROR. 90165..。

我正在使用“自动管理签名”,并已经上传了一个存档昨天为同一个应用程序没有问题。

enter image description here

13835 次浏览

For me, It got resolved when I created the AppStore provisioning profile again and deleted the old one.

The issue was caused by two expired Apple certificates1.

Solution is to

  1. Go to Certificates, Identifiers & Profiles
  2. Open the provision profile
  3. Press Edit in the top right
  4. Press Save without making any changes This will regenerate the profile with the correct CAs.

Now delete the ~/Library/MobileDevice/Provisioning Profiles folder and let xcode redownload the profiles again.


1 https://twitter.com/JI/status/1514043544897425408

Regenerate the Provisioning Profile, you can keep the same certificates.

Resolve with following steps

  1. Regenerate Provisioning Profiles Go to developer.apple.com => Certificates, Identifiers & Profiles => Profiles => click on the profile => Click on EDIT => SAVE again (to ensure it regenerates the Provisioning Profile)

  2. Delete locally saved Provisioning file:

    rm -rf ~/Library/MobileDevice/Provisioning\ Profiles

  3. Then in Xcode accounts, download Profiles again. either from Xcode => Preferences => Accounts or Runner => Targets => Signing & Capabilities => Prov Profile => Download profiles.

I had been deploying till yesterday. The builds worked fine, all of a sudden today, I started running into this issue as well. Nothing else worked for me. The following steps resolved the issue for me:

  1. Creating a new Apple Distribution Certificate. (you can follow the steps on the dev portal - developer.apple.com)
  2. Download you certificate onto your system
  3. you can keep using 'Automatically manage signing'
  4. Clean Build Folder
  5. Archive
  6. Validate
  7. Distribute -> Upload worked!

Not everyone's certificate can expire at the same time. This may have something to do with apple.

1- Delete All profiles file. /Users/X/Library/MobileDevice/Provisioning Profiles

2- Open Xcode and wait 2 second. Xcode can download profiles automatic. You don't need to do anything.

Note that you don't have an expired certificate before that. If there is an expired one, edit it and save it again. will give you a new date.

enter image description here

For me helps:

  1. Exit Xcode
  2. rm -rf ~/Library/MobileDevice/Provisioning\ Profiles/
  3. Execute Xcode and let it rebuild the profiles again.

This is what worked for me.

  1. Sign into https://developer.apple.com/.
  2. Locate Profiles on the Left Pane
  3. Select Profiles and click on the blue + button to Register a New Provisioning Profile.
  4. Under Distribution select App Store.
  5. Hit continue on the top right.
  6. On the next screen select the apple ID for which this this profile needs to be created.
  7. Hit Continue on the top right...
  8. Select the certificate to be included with this Profile
  9. Hit continue
  10. Give the Profile a helpful name and click generate
  11. Download it...
  12. Once downloaded, double click to install it locally for xcode. You should now be able to distribute valid binaries to the app store

Solution:-

  1. Just get Xcode to re-download the provision profiles by deleting everything here: ~/Library/MobileDevice/Provisioning Profiles
  2. Open Xcode Preferences, navigate to Accounts, and click Download Manual Profiles

Apple has updated its WWDR certificates https://developer.apple.com/support/expiration/ Some certificates expired in January and some in April of 2022 depending on what version of xCode you had. With that being said, any provisioning profile downloaded before April of 2022 was signed with a now expired WWDR. That's why you'd need to regenerate your provisioning profiles.

For those using fastlane, adding force: true to your get_provisioning_profile call will reset the expiration date.

get_provisioning_profile( # Create or get provisioning profile
output_path: "./builds",  # change to whatever works for you
force: true,
filename: "AppStore_" + ENV["APP_IDENTIFIER"] + ".mobileprovision" # Rename the local provisioning profile
)

See: https://docs.fastlane.tools/actions/get_provisioning_profile/

>     [Getting this error on uploading app on Test Flight. DOn't worry Just follow these steps]
>     [1] Go to Xcode preference
>     [2] Open Accounts tab
>     [3] Click on manage Certificates
>     [4] At bottom 'Apple Distribution Certificates' ,there is your expire certificate. Just delete it and try to upload again
>
>     App upload to Test Flight successfully.
>
>
>       [1]: https://i.stack.imgur.com/Pjxkg.png