Invalid Provisioning Profile Signature - STATE_ERROR.VALIDATION_ERROR.90165
XcodeApp Store-ConnectXcode Problem Overview
I am trying to upload an archive to App Store Connect, and suddenly am getting the following error:
> Invalid Provisioning Profile Signature. The provisioning profile included in the bundle cannot be used to submit apps to the iOS App Store until it has a valid signature from Apple. For more information, visit the iOS Developer Portal. With error code STATE_ERROR.VALIDATION_ERROR.90165 for id ...
I am using "Automatically manage signing" and have uploaded an archive just yesterday for the same app with no issue.
Xcode Solutions
Solution 1 - Xcode
The issue was caused by two expired Apple certificates1.
Solution is to
- Go to Certificates, Identifiers & Profiles
- Open the provision profile
- Press
Edit
in the top right - 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.
Solution 2 - Xcode
For me helps:
- Exit Xcode
rm -rf ~/Library/MobileDevice/Provisioning\ Profiles/
- Execute Xcode and let it rebuild the profiles again.
Solution 3 - Xcode
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.
Solution 4 - Xcode
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.
Solution 5 - Xcode
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:
- Creating a new Apple Distribution Certificate. (you can follow the steps on the dev portal - developer.apple.com)
- Download you certificate onto your system
- you can keep using 'Automatically manage signing'
- Clean Build Folder
- Archive
- Validate
- Distribute -> Upload worked!
Solution 6 - Xcode
This is what worked for me.
- Sign into https://developer.apple.com/.
- Locate Profiles on the Left Pane
- Select Profiles and click on the blue + button to Register a New Provisioning Profile.
- Under Distribution select App Store.
- Hit continue on the top right.
- On the next screen select the apple ID for which this this profile needs to be created.
- Hit Continue on the top right...
- Select the certificate to be included with this Profile
- Hit continue
- Give the Profile a helpful name and click generate
- Download it...
- Once downloaded, double click to install it locally for xcode. You should now be able to distribute valid binaries to the app store
Solution 7 - Xcode
Regenerate the Provisioning Profile, you can keep the same certificates.
Resolve with following steps
-
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)
-
Delete locally saved Provisioning file:
rm -rf ~/Library/MobileDevice/Provisioning\ Profiles
-
Then in Xcode accounts, download Profiles again. either from Xcode => Preferences => Accounts or Runner => Targets => Signing & Capabilities => Prov Profile => Download profiles.
Solution 8 - Xcode
For me, It got resolved when I created the AppStore provisioning profile again and deleted the old one.
Solution 9 - Xcode
Solution:-
- Just get Xcode to re-download the provision profiles by deleting everything here: ~/Library/MobileDevice/Provisioning Profiles
- Open Xcode Preferences, navigate to Accounts, and click Download Manual Profiles
Solution 10 - Xcode
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/
Solution 11 - Xcode
> [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